<?
/**
* Parser for the XMI Packages
*
*@author Teoni Valois da Mota Silva
*@name PackageParser
*@package Packages
*@version 0.1.1
*
*/
class PackageParser extends XMIParser{
/**
* PackageParser's Object constructor
*
* @param String $xmiFile
*/
function PackageParser($data){
$this->data = $data['UML:Package'];
}
/**
* PackageParser's Object destructor
*
*/
function __destruct(){
$this->data = null;
}
function getName($packageId){
return $this->data[$packageId]['name'];
}
/**
* Returns the XMI Id of The Package
*
* @param Int $methodId
* @return String
*/
function getXMIId($packageId){
return $this->data[$packageId]['xmi.id'];
}
/**
* Returns the Visibility Status of The Package
*
* @param Int $methodId
* @return String
*/
function getVisibility($packageId){
return $this->data[$packageId]['visibility'];
}
/**
* Returns the Specification Status of The Package
*
* @param Int $methodId
* @return String
*/
function getSpecificationStatus($packageId){
return $this->data[$packageId]['isSpecification'];
}
/**
* Returns the Root Status of The Package
*
* @param Int $methodId
* @return String
*/
function getRootStatus($packageId){
return $this->data[$packageId]['isRoot'];
}
/**
* Returns the Leaf Status of The Package
*
* @param Int $methodId
* @return String
*/
function getLeafStatus($packageId){
return $this->data[$packageId]['isLeaf'];
}
/**
* Returns the Abstract Status of The Package
*
* @param Int $methodId
* @return String
*/
function getAbstractStatus($packageId){
return $this->data[$packageId]['isAbstract'];
}
function getPackage($packageId){
return $this->data[$packageId]['UML:Namespace.ownedElement'][0];
}
}
?>