ClassHierarchy Class Reference
The class hierarchy of the system. More...
Public Member Functions | |
| __construct ($rootClass) | |
| Constructor. | |
| __destruct () | |
| addClassRelationship ($class, $subClassOf) | |
| Add a class to the class hierarchy. | |
| getSuperClasses ($class) | |
| Returns a list of references to the superclasses. | |
| getSubClasses ($class) | |
| Returns a list of references to the subclasses. | |
| isSubClassOf ($subClass, $superClass) | |
| Check if a class if a sub-class of another class. | |
Data Fields | |
| $classes = array() | |
| ClassNode(s) that define the class structure. | |
Detailed Description
The class hierarchy of the system.
This class structure is used by multiple modules to leverage the class structure of a node. It is used to get the super-classes-of, sub-classes-of, labels and descriptions of classes.
- Todo:
- Load this structure from the database system instead of the file system (using include_once).
Definition at line 28 of file ClassHierarchy.php.
Constructor & Destructor Documentation
| __construct | ( | $ | rootClass | ) |
Constructor.
- Parameters:
-
[in] $rootClass Root class of the class hierarchy. This is normally owl:Thing.
Definition at line 43 of file ClassHierarchy.php.
| __destruct | ( | ) |
Definition at line 48 of file ClassHierarchy.php.
Member Function Documentation
| addClassRelationship | ( | $ | class, | |
| $ | subClassOf | |||
| ) |
Add a class to the class hierarchy.
- Parameters:
-
[in] $class URI of the class to add to the hierarchy [in] $subClassOf URI of the super-class of the class being added.
Definition at line 62 of file ClassHierarchy.php.
| getSubClasses | ( | $ | class | ) |
Returns a list of references to the subclasses.
- Parameters:
-
[in] $class URI of the class to get its sub-classes references
- Returns:
- returns a list of references to the subclasses
Definition at line 202 of file ClassHierarchy.php.
| getSuperClasses | ( | $ | class | ) |
Returns a list of references to the superclasses.
- Parameters:
-
[in] $class URI of the class to get its super-classes references
- Returns:
- returns a list of references to the superclasses
Definition at line 152 of file ClassHierarchy.php.
Referenced by isSubClassOf().
| isSubClassOf | ( | $ | subClass, | |
| $ | superClass | |||
| ) |
Check if a class if a sub-class of another class.
- Parameters:
-
[in] $subClass URI of the class to check if it is a sub-class of another class [in] $superClass URI of the super class of the class
- Returns:
- returns TRUE if the class is a sub-class of the super-class; FALSE otherwise
Definition at line 253 of file ClassHierarchy.php.
References getSuperClasses().

Field Documentation
| $classes = array() |
ClassNode(s) that define the class structure.
Definition at line 31 of file ClassHierarchy.php.
The documentation for this class was generated from the following file:
