Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

corelinux::Ontology Class Reference

An Ontology represents a domain semantic network. More...

#include <Ontology.hpp>

List of all members.

Public Methods

 Ontology ( CharCptr )
 Default constructor takes a domain name. More...

virtual ~Ontology ( void )
 Virtual destructor.

bool operator== ( OntologyCref ) const
 Equality operator.

CharCptr getDomainName ( void ) const
 gets the domain name.

MetaClassPtr getClass ( CharCptr ) throw ( NullPointerException )
 Get the metaclass as defined by the name, in this ontology. More...

MetaClassPtr getClass ( UniversalIdentifierCref ) throw ( NullPointerException )
 Get the metaclass as defined by the class id in this ontology. More...

virtual void addMetaType ( MetaTypePtr )
 Add a new metatype to this ontology. More...

virtual void addAsChild ( MetaTypePtr , MetaClassPtr ) throw ( NullPointerException )
 Add a child to a member of the ontology. More...

virtual void addAsChild ( UniversalIdentifierCref , MetaTypePtr ) throw ( NullPointerException )
 Add a child to a member of the ontology. More...

virtual Iterator<MetaClassCptr>* createIterator ( void )
 Create a iterator over all the entries of the ontology. More...

virtual Iterator<MetaClassCptr>* createRootIterator ( void )
 Create a iterator over the roots of the ontology. More...

virtual void destroyIterator ( Iterator<MetaClassCptr> * )
 Destroy the iterator. More...


Static Public Methods

MetaClassPtr getClassFor ( CharCptr, CharCptr ontology=NULLPTR ) throw ( NullPointerException, DescriptorNotFound )
 Get the metaclass as defined by the class and ontology names. More...

MetaClassPtr getClassFor ( UniversalIdentifierCref, CharCptr ontology = NULLPTR ) throw ( NullPointerException, DescriptorNotFound )
 Get the metaclass as defined by the class id and ontology name. More...


Protected Methods

MetaClassPtr getClass ( MetaTypePtr ) const
 Gets the class from the local ontology, or where it exists. More...


Friends

class  MetaSpace


Detailed Description

An Ontology represents a domain semantic network.


Constructor & Destructor Documentation

corelinux::Ontology::Ontology ( CharCptr aDomain )
 

Default constructor takes a domain name.

Parameters:
char   pointer to domain name

corelinux::Ontology::~Ontology ( void ) [virtual]
 

Virtual destructor.


Member Function Documentation

void corelinux::Ontology::addAsChild ( UniversalIdentifierCref aParentId,
MetaTypePtr aChild ) throw ( NullPointerException ) [virtual]
 

Add a child to a member of the ontology.

This does not store the type being added, but only updates the child reference of an existing type

Parameters:
UniversalIdentifier   const reference to add to
MetaType   const pointer to add

void corelinux::Ontology::addAsChild ( MetaTypePtr aParent,
MetaClassPtr aChild ) throw ( NullPointerException ) [virtual]
 

Add a child to a member of the ontology.

This does not store the type being added, but only updates the child reference of an existing type

Parameters:
MetaType   const pointer to add to
MetaType   const pointer to add

void corelinux::Ontology::addMetaType ( MetaTypePtr aMetaType ) [virtual]
 

Add a new metatype to this ontology.

Parameters:
MetaType   const pointer to type
Exceptions:
InvalidType   if domain name is not the same as the ontology

Iterator< MetaClassCptr >* corelinux::Ontology::createIterator ( void ) [virtual]
 

Create a iterator over all the entries of the ontology.

Returns:
Iterator<MetaClassCptr> pointer

Iterator< MetaClassCptr >* corelinux::Ontology::createRootIterator ( void ) [virtual]
 

Create a iterator over the roots of the ontology.

Returns:
Iterator<MetaClassCptr> pointer

void corelinux::Ontology::destroyIterator ( Iterator< MetaClassCptr >* anIterator ) [virtual]
 

Destroy the iterator.

Parameters:
Iterator<MetaClassCptr>   pointer

MetaClassPtr corelinux::Ontology::getClass ( MetaTypePtr aType ) const [protected]
 

Gets the class from the local ontology, or where it exists.

Parameters:
MetaType   const pointer
Returns:
MetaClass const pointer

MetaClassPtr corelinux::Ontology::getClass ( UniversalIdentifierCref aClassId ) throw ( NullPointerException )
 

Get the metaclass as defined by the class id in this ontology.

Parameters:
Char   pointer to class name (i.e. "Integer")
Returns:
MetaClass pointer to resolved class or null
Exceptions:
NullPointerException   if identifier is zero

MetaClassPtr corelinux::Ontology::getClass ( CharCptr aClassName ) throw ( NullPointerException )
 

Get the metaclass as defined by the name, in this ontology.

Parameters:
Char   pointer to class name (i.e. "Integer")
Returns:
MetaClass pointer to resolved class or null if not found
Exceptions:
NullPointerException   if argument is null

MetaClassPtr corelinux::Ontology::getClassFor ( UniversalIdentifierCref aClassId,
CharCptr anOntology = NULLPTR ) throw ( NullPointerException, DescriptorNotFound ) [static]
 

Get the metaclass as defined by the class id and ontology name.

Parameters:
UniversalIdentifier   to class type
Char   pointer to ontology name (i.e. "MySpace") defaults to "corelinux" in implementation
Returns:
MetaClass pointer to resolved class
Exceptions:
NullPointerException   and/or DescriptorNotFoundException if not resolvable

MetaClassPtr corelinux::Ontology::getClassFor ( CharCptr aClassName,
CharCptr anOntology = NULLPTR ) throw ( NullPointerException, DescriptorNotFound ) [static]
 

Get the metaclass as defined by the class and ontology names.

Parameters:
Char   pointer to class name (i.e. "Integer")
Char   pointer to ontology name (i.e. "MySpace") defaults to "corelinux" in implementation
Returns:
MetaClass pointer to resolved class
Exceptions:
NullPointerException   and/or DescriptorNotFoundException if not resolvable

CharCptr corelinux::Ontology::getDomainName ( void ) const
 

gets the domain name.

bool corelinux::Ontology::operator== ( OntologyCref aRef ) const
 

Equality operator.


Friends And Related Function Documentation

class MetaSpace [friend]
 


The documentation for this class was generated from the following files:
This is the CoreLinux++ Framework reference manual
Provided by The CoreLinux Consortium