<?
/**
* Parser for the XMI Classes
*
*@author Teoni Valois da Mota Silva
*@name ClassParser
*@package Classes
*@version 0.1.2
*
*/
class ClassParser extends XMIParser{
/**
* ClassParser's Object constructor
*
* @param String $xmiFile
*/
function ClassParser($data){
$this->data = $data['UML:Class'];
}
/**
* ClassParser's Object destructor
*
*/
function __destruct(){
$this->data = null;
}
/**
* Returns the Name of The Class
*
* @param Int $classId
* @return String
*/
function getName($classId){
return $this->data[$classId]['name'];
}
/**
* Returns the XMI Id of The Class
*
* @param Int $classId
* @return String
*/
function getXMIId($classId){
return $this->data[$classId]['xmi.id'];
}
/**
* Returns the Visibility Status of The Class
*
* @param Int $classId
* @return String
*/
function getVisibility($classId){
return $this->data[$classId]['visibility'];
}
/**
* Returns the Specification Status of The Class
*
* @param Int $classId
* @return String
*/
function getSpecificationStatus($classId){
return $this->data[$classId]['isSpecification'];
}
/**
* Returns the Root Status of The Class
*
* @param Int $classId
* @return String
*/
function getRootStatus($classId){
return $this->data[$classId]['isRoot'];
}
/**
* Returns the Leaf Status of The Class
*
* @param Int $classId
* @return String
*/
function getLeafStatus($classId){
return $this->data[$classId]['isLeaf'];
}
/**
* Returns the Abstract Status of The Class
*
* @param Int $classId
* @return String
*/
function getAbstractStatus($classId){
return $this->data[$classId]['isAbstract'];
}
/**
* Returns the Active Status of The Class
*
* @param Int $classId
* @return String
*/
function getActiveStatus($classId){
return $this->data[$classId]['isActive'];
}
/**
* Returns an array of Classes
*
* @param Int $classId
* @return Array
*/
function getClass($classId){
return $this->data[$classId]['UML:Classifier.feature'];
}
}
?>