com.att.gs.codip.ograph
Class OGBaseOntology

java.lang.Object
  |
  +--com.att.gs.codip.ograph.OGBaseOntology
All Implemented Interfaces:
LogicalResource, OGOntology, OGResource
Direct Known Subclasses:
DAML, OWL, RDFS, XSD

public class OGBaseOntology
extends java.lang.Object
implements OGOntology

An implementaiton of the OGOntology Interface that provides static instances of the OWL Classes and Properties.


Field Summary
protected  OGOntology myImpl
          The internal Ontology implementation.
 
Constructor Summary
OGBaseOntology()
           
 
Method Summary
 void addClass(OGClass theClass)
          Adds the provided class to the ontology.
 void addDatatype(OGDatatype theDatatype)
          Adds the provided data type to the ontology.
 void addImport(OGOntology theImport)
          Adds the provided ontology to the ontology's imports.
 void addLiteral(OGLiteral theLiteral)
          Adds the provided literal to the ontology.
 OGPropInstance addNewPropInstance(OGResource newPropType, OGResource theObject)
          Creates a property instantce and adds it to the resource.
 void addProperty(OGProperty theProperty)
          Adds the provided property to the ontology.
 void addPropInstance(OGPropInstance thePropInstance)
          Adds the provided property instance to the resource.
 void addResource(OGResource theResource)
          Adds the provided resource to the ontology.
 void addType(OGResource theType)
          Adds the given type to the list of multi-types.
 java.util.Iterator classes()
          Provides a iterator for the all of the ontology's classes.
 java.util.Iterator classes(OGResource aType)
          Provides a iterator for only the ontology's classes of the provided type.
 boolean containsClass(java.lang.Object theID)
          Checks for the existence of a Class in this ontology whose ID matches the provided ID.
 boolean containsDatatype(java.lang.Object theID)
          Checks for the existence of a Datatype in this ontology whose ID matches the provided ID.
 boolean containsImport(java.lang.Object theID)
          Looks for an imported ontology in this ontology whose ID matches the provided ID.
 boolean containsLiteral(java.lang.Object theID)
          Looks for a literal in this ontology whose ID matches the provided ID.
 boolean containsProperty(java.lang.Object theID)
          Checks for the existence of a property in this ontology whose ID matches the provided ID.
 boolean containsPropInstance(java.lang.Object theID)
          Checks for the existence of a property in this resource whose ID matches the provided ID.
 boolean containsResource(java.lang.Object theID)
          Looks for a resource in this ontology whose ID matches the provided ID.
 boolean containsType(OGResource theType)
          Type checker for multi-types.
 OGClass createClass()
          Creates a Class in this ontology with a generated unique ID and adds the Class to the ontology.
 OGClass createClass(OGResource aType)
          Creates a Class in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Class to the ontology.
 OGClass createClass(OGResource aType, java.lang.String theID)
          Looks for, and possibilly creates, a Class in this ontology.
 OGClass createClass(java.lang.String theID)
          Looks for, and possibilly creates, a Class in this ontology.
 OGDatatype createDatatype()
          Creates a Datatype in this ontology with a generated unique ID and adds the Datatype to the ontology.
 OGDatatype createDatatype(OGResource aType)
          Creates a Datatype in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Datatype to the ontology.
 OGDatatype createDatatype(OGResource aType, java.lang.String theID)
          Looks for, and possibilly creates, a Datatype in this ontology.
 OGDatatype createDatatype(java.lang.String theID)
          Looks for, and possibilly creates, a Datatype in this ontology.
 OGLiteral createLiteral()
          Creates a Literal in this ontology with a generated unique ID and adds the Literal to the ontology.
 OGLiteral createLiteral(OGResource aType)
          Creates a Literal in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Literal to the ontology.
 OGLiteral createLiteral(OGResource aType, java.lang.String theID)
          Looks for, and possibilly creates, a Literal in this ontology.
 OGLiteral createLiteral(java.lang.String theID)
          Looks for, and possibilly creates, a Literal in this ontology.
 OGLiteral createLiteralByValue(OGResource aType, java.lang.String theValue)
          Looks for, and possibilly creates, a Literal in this ontology.
 OGLiteral createLiteralByValue(java.lang.String theValue)
          Looks for, and possibilly creates, a Literal in this ontology.
 OGProperty createProperty()
          Creates a Property in this ontology with a generated unique ID and adds the Property to the ontology.
 OGProperty createProperty(OGResource aType)
          Creates a Property in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Property to the ontology.
 OGProperty createProperty(OGResource aType, java.lang.String theID)
          Looks for, and possibilly creates, a Property in this ontology.
 OGProperty createProperty(java.lang.String theID)
          Looks for, and possibilly creates, a Property in this ontology.
 OGPropInstance createPropInstance(OGResource aType)
          Creates a Property instance in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Property to the ontology.
 OGPropInstance createPropInstance(OGResource aType, java.lang.String theID)
          Looks for, and possibilly creates, a Property instance in this ontology.
 java.util.Iterator datatypes()
          Provides a iterator for the all of the ontology's data types.
 java.util.Iterator datatypes(OGResource aType)
          Provides a iterator for only the ontology's data types of the provided type.
 OGClass getClass(java.lang.Object theID)
          Looks for a Class in this ontology whose ID matches the provided ID.
 java.util.Collection getClasses(OGResource aType)
          Provides a Collection of the ontology's classes of the provided type.
 java.lang.String getComment()
          Getter method for this resource's comment string.
 OGDatatype getDatatype(java.lang.Object theID)
          Looks for a Datatype in this ontology whose ID matches the provided ID.
 java.util.Collection getDatatypes(OGResource aType)
          Provides a Collection of the ontology's data types of the provided type.
 java.lang.String getID()
          Getter method for the Resources ID.
 OGOntology getImport(java.lang.Object theID)
          Looks for an imported ontology in this ontology whose ID matches the provided ID.
 OGOntology[] getImports()
          Accessor for the read only indexed bean property, "imports"
 java.lang.String getLabel()
          Getter method for this resource's label string.
 OGLiteral getLiteral(java.lang.Object theID)
          Looks for a literal in this ontology whose ID matches the provided ID.
 java.util.Collection getLiterals(OGResource aType)
          Provides a Collection of the ontology's literals of the provided type.
 java.lang.String getLocalName()
          Getter method for this resource's Local Name.
 java.lang.String getNamespace()
          Getter method for this resource's Namespace.
 OGOntology getOntology()
          Getter method for this resource's Ontology.
 java.util.Collection getProperties(OGResource aType)
          Provides a Collection of the ontology's properties of the provided type.
 OGProperty getProperty(java.lang.Object theID)
          Looks for a property in this ontology whose ID matches the provided ID.
 OGPropInstance getPropInstance(java.lang.Object theID)
          Looks for a property of this resource whose ID matches the provided ID.
 OGPropInstance[] getPropInstances()
          Accessor for the read only indexed bean property, "properties"
 java.util.Collection getPropInstances(OGResource aType)
          Provies a Collection for all of the resource's properties that are a particular type.
 OGResource getResource(java.lang.Object theID)
          Looks for a resource in this ontology whose ID matches the provided ID.
 java.util.Collection getResources(OGResource aType)
          Provides a Collection of the ontology's resources of the provided type.
 java.lang.String getSourceURI()
          Getter method for the source URI of this ontology.
 LogicalResource getType()
          Getter method for this resource's type.
 java.lang.String getURI()
          Getter method for this resource's URI.
 java.lang.String getVersionInfo()
          Getter method for the version information of this ontology.
 java.util.Iterator imports()
          Provides a iterator for the all of the ontology's imports.
 boolean isLiteralType()
          Type checker for any literal type.
 boolean isType(LogicalResource theType)
          Type checker, extensions can add support for multi-types.
 java.util.Iterator literals()
          Provides a iterator for the all of the ontology's literals.
 java.util.Iterator literals(OGResource aType)
          Provides a iterator for only the ontology's literals of the provided type.
 OGClass lookupClass(java.lang.Object theID)
          Looks for a matching class in this ontology.
 OGClass lookupClass(java.lang.Object theID, boolean pCreate)
          Looks for, and possibilly creates, a Class in this ontology.
 OGDatatype lookupDatatype(java.lang.Object theID)
          Looks for a matching data type in this ontology.
 OGDatatype lookupDatatype(java.lang.Object theID, boolean pCreate)
          Looks for, and possibilly creates, a Datatype in this ontology.
 OGOntology lookupImport(java.lang.Object theID)
          Looks for an imported ontology by ID.
 OGLiteral lookupLiteral(java.lang.Object theID)
          Looks for a matching literal in this ontology.
 OGLiteral lookupLiteral(java.lang.Object theID, boolean pCreate)
          Looks for, and possibilly creates, a literal in this ontology.
 OGProperty lookupProperty(java.lang.Object theID)
          Looks for a matching property in this ontology.
 OGProperty lookupProperty(java.lang.Object theID, boolean pCreate)
          Looks for, and possibilly creates, a property in this ontology.
 OGPropInstance lookupPropInstance(java.lang.Object theID)
          Looks for a matching property in this resource.
 OGResource lookupResource(java.lang.Object theID)
          Looks for a matching resource in this ontology.
 void morph(java.lang.String URI)
          Base Ontology Methods.
 java.util.Iterator properties()
          Provides a iterator for the all of the ontology's properties.
 java.util.Iterator properties(OGResource aType)
          Provides a iterator for only the ontology's properties of the provided type.
 java.util.Iterator propInstances()
          Provides a iterator for the all of the resource's properties.
 java.util.Iterator propInstances(OGResource aType)
          Looks for a property of this resource that is a particular type.
 void removeClass(OGClass theClass)
          Removes the provided class from the ontology.
 void removeDatatype(OGDatatype theDatatype)
          Removes the provided data type from the ontology.
 void removeImport(OGOntology theImport)
          Removes the provided ontology from the ontology's imports.
 void removeLiteral(OGLiteral theLiteral)
          Removes the provided literal from the ontology.
 void removeProperty(OGProperty theProperty)
          Removes the provided property from the ontology.
 void removePropInstance(OGPropInstance thePropInstance)
          Removes the provided property instance from the resource.
 void removeResource(OGResource theResource)
          Removes the provided resource from the ontology.
 void removeType(OGResource theType)
          Removes the given type from the list of multi-types.
 java.util.Iterator resources()
          Provides a iterator for the all of the ontology's resources.
 java.util.Iterator resources(OGResource aType)
          Provides a iterator for only the ontology's resources of the provided type.
 void setComment(java.lang.String theLabel)
          Setter method for this resource's comment string.
 void setLabel(java.lang.String theLabel)
          Setter method for this resource's label string.
 void setSourceURI(java.lang.String theSourceURI)
          Setter method for the source URI of this ontology.
 void setType(LogicalResource theType)
          Collection Access Methods.
 void setVersionInfo(java.lang.String theVersionInfo)
          Setter method for the version information of this ontology.
 java.util.Iterator types()
          Provides an iterator over the list of multi-types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myImpl

protected OGOntology myImpl
The internal Ontology implementation.

Constructor Detail

OGBaseOntology

public OGBaseOntology()
Method Detail

morph

public void morph(java.lang.String URI)
Base Ontology Methods.

Specified by:
morph in interface OGOntology

getOntology

public OGOntology getOntology()
Description copied from interface: OGResource
Getter method for this resource's Ontology. The Ontology is immutable and is set when the resource is created.

Specified by:
getOntology in interface OGResource

getNamespace

public java.lang.String getNamespace()
Description copied from interface: OGResource
Getter method for this resource's Namespace. The Namespace is immutable and is set when an ontology is built from an RDF model. It is also used when an RDF model is built from the ontology.

Specified by:
getNamespace in interface OGResource

getLocalName

public java.lang.String getLocalName()
Description copied from interface: OGResource
Getter method for this resource's Local Name. The Local Name is immutable and is set when an ontology is built from an RDF model. It is also used when an RDF model is built from the ontology.

Specified by:
getLocalName in interface OGResource

setVersionInfo

public void setVersionInfo(java.lang.String theVersionInfo)
Description copied from interface: OGOntology
Setter method for the version information of this ontology.

Specified by:
setVersionInfo in interface OGOntology
Parameters:
theVersionInfo - The version information String.

getVersionInfo

public java.lang.String getVersionInfo()
Description copied from interface: OGOntology
Getter method for the version information of this ontology.

Specified by:
getVersionInfo in interface OGOntology
Returns:
The version information String.

getID

public java.lang.String getID()
Description copied from interface: OGResource
Getter method for the Resources ID. The resource ID is unique and immutable once created. Currently the ID is the resources URI.

Specified by:
getID in interface OGResource

getURI

public java.lang.String getURI()
Description copied from interface: OGResource
Getter method for this resource's URI. The URI is immutable and is set when an ontology is built from an RDF model. It is also used when an RDF model is built from the ontology.

Specified by:
getURI in interface OGResource

setSourceURI

public void setSourceURI(java.lang.String theSourceURI)
Description copied from interface: OGOntology
Setter method for the source URI of this ontology. Public wrapper method for the portected method OGResource.setURI(String) method which is used internally.

Specified by:
setSourceURI in interface OGOntology
Parameters:
theSourceURI - The source URI String.

getSourceURI

public java.lang.String getSourceURI()
Description copied from interface: OGOntology
Getter method for the source URI of this ontology. Provided for completeness returns the same URI string as getURI()

Specified by:
getSourceURI in interface OGOntology
Returns:
The source URI String.

setLabel

public void setLabel(java.lang.String theLabel)
Description copied from interface: OGResource
Setter method for this resource's label string.

Specified by:
setLabel in interface OGResource
Parameters:
theLabel - The label of this resource.

getLabel

public java.lang.String getLabel()
Description copied from interface: OGResource
Getter method for this resource's label string.

Specified by:
getLabel in interface OGResource

setComment

public void setComment(java.lang.String theLabel)
Description copied from interface: OGResource
Setter method for this resource's comment string.

Specified by:
setComment in interface OGResource
Parameters:
theLabel - The comment for this resource.

getComment

public java.lang.String getComment()
Description copied from interface: OGResource
Getter method for this resource's comment string.

Specified by:
getComment in interface OGResource

setType

public void setType(LogicalResource theType)
Collection Access Methods.

Specified by:
setType in interface LogicalResource
Parameters:
theType - The type of this resource.

getType

public LogicalResource getType()
Description copied from interface: LogicalResource
Getter method for this resource's type.

Specified by:
getType in interface LogicalResource

isType

public boolean isType(LogicalResource theType)
Description copied from interface: LogicalResource
Type checker, extensions can add support for multi-types.

Specified by:
isType in interface LogicalResource

isLiteralType

public boolean isLiteralType()
Description copied from interface: LogicalResource
Type checker for any literal type.

Specified by:
isLiteralType in interface LogicalResource

containsType

public boolean containsType(OGResource theType)
Description copied from interface: OGResource
Type checker for multi-types.

Specified by:
containsType in interface OGResource

addType

public void addType(OGResource theType)
Description copied from interface: OGResource
Adds the given type to the list of multi-types.

Specified by:
addType in interface OGResource

removeType

public void removeType(OGResource theType)
Description copied from interface: OGResource
Removes the given type from the list of multi-types. Use with caution.

Specified by:
removeType in interface OGResource

types

public java.util.Iterator types()
Description copied from interface: OGResource
Provides an iterator over the list of multi-types.

Specified by:
types in interface OGResource

lookupPropInstance

public OGPropInstance lookupPropInstance(java.lang.Object theID)
Description copied from interface: OGResource
Looks for a matching property in this resource. Searches this resource for a property whose ID matches the provided ID.

Specified by:
lookupPropInstance in interface OGResource
Parameters:
theID - The ID of the sought property.
Returns:
The matching property if found, otherwise returns void.

addNewPropInstance

public OGPropInstance addNewPropInstance(OGResource newPropType,
                                         OGResource theObject)
Description copied from interface: OGResource
Creates a property instantce and adds it to the resource. THe property is of the provided type, it subject is this resource, and its object is the provided resource. *

Specified by:
addNewPropInstance in interface OGResource
Parameters:
newPropType - The type of the property instance.
theObject - The object of the property instance.
Returns:
The created property instance.

addPropInstance

public void addPropInstance(OGPropInstance thePropInstance)
Description copied from interface: OGResource
Adds the provided property instance to the resource. *

Specified by:
addPropInstance in interface OGResource

removePropInstance

public void removePropInstance(OGPropInstance thePropInstance)
Description copied from interface: OGResource
Removes the provided property instance from the resource.

Specified by:
removePropInstance in interface OGResource
Parameters:
thePropInstance - The property to remove from the resource.

getPropInstance

public OGPropInstance getPropInstance(java.lang.Object theID)
Description copied from interface: OGResource
Looks for a property of this resource whose ID matches the provided ID. Functionally indentical to lookupPropInstance.

Specified by:
getPropInstance in interface OGResource
Parameters:
theID - The ID of the sought property.
Returns:
The matching property if found, otherwise returns void.

getPropInstances

public OGPropInstance[] getPropInstances()
Description copied from interface: OGResource
Accessor for the read only indexed bean property, "properties"

Specified by:
getPropInstances in interface OGResource
Returns:
The properties of this resources as an array.

containsPropInstance

public boolean containsPropInstance(java.lang.Object theID)
Description copied from interface: OGResource
Checks for the existence of a property in this resource whose ID matches the provided ID.

Specified by:
containsPropInstance in interface OGResource
Parameters:
theID - The ID of the sought property.
Returns:
true if the property exists in this ontology.

propInstances

public java.util.Iterator propInstances()
Description copied from interface: OGResource
Provides a iterator for the all of the resource's properties.

Specified by:
propInstances in interface OGResource
Returns:
An iterator over all the resource's properties

propInstances

public java.util.Iterator propInstances(OGResource aType)
Description copied from interface: OGResource
Looks for a property of this resource that is a particular type.

Specified by:
propInstances in interface OGResource
Parameters:
aType - The type of the sought properties.
Returns:
An iterator over some the resource's properties.

getPropInstances

public java.util.Collection getPropInstances(OGResource aType)
Description copied from interface: OGResource
Provies a Collection for all of the resource's properties that are a particular type.

Specified by:
getPropInstances in interface OGResource
Parameters:
aType - The type of the sought properties.
Returns:
A collection of some of the resource's properties.

lookupClass

public OGClass lookupClass(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a matching class in this ontology. Searches this onlology and all imported ontologies for a class whose ID matches the provided ID.

Specified by:
lookupClass in interface OGOntology
Parameters:
theID - The ID of the sought class.
Returns:
The matching class if found, otherwise returns void.

lookupClass

public OGClass lookupClass(java.lang.Object theID,
                           boolean pCreate)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Class in this ontology. Searches this onlology and all imported ontologies for a class whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists.

Specified by:
lookupClass in interface OGOntology
Parameters:
theID - The ID of the sought class.
pCreate - true causes a new instance to be created if no existing match is found.
Returns:
The matching class if found or created, otherwise returns void.

createClass

public OGClass createClass()
Description copied from interface: OGOntology
Creates a Class in this ontology with a generated unique ID and adds the Class to the ontology.

Specified by:
createClass in interface OGOntology
Returns:
The matching class created, otherwise returns void.

createClass

public OGClass createClass(java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Class in this ontology. Searches this onlology and all imported ontologies for a class whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The class if new is added to the Ontology.

Specified by:
createClass in interface OGOntology
Parameters:
theID - The ID of the new class.
Returns:
The matching class if found or created, otherwise returns void.

createClass

public OGClass createClass(OGResource aType)
Description copied from interface: OGOntology
Creates a Class in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Class to the ontology.

Specified by:
createClass in interface OGOntology
Parameters:
aType - The type of the new class.
Returns:
The matching class created, otherwise returns void.

createClass

public OGClass createClass(OGResource aType,
                           java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Class in this ontology. Searches this onlology and all imported ontologies for a class whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The class if new is added to the Ontology with the type sets to the passed in type.

Specified by:
createClass in interface OGOntology
Parameters:
aType - The type of the new class.
theID - The ID of the new class.
Returns:
The matching class if found or created, otherwise returns void.

addClass

public void addClass(OGClass theClass)
Description copied from interface: OGOntology
Adds the provided class to the ontology. The provided class should be added so that it will be included in both class and resource collections as appropriate.

Specified by:
addClass in interface OGOntology
Parameters:
theClass - The class to add to the ontology.

removeClass

public void removeClass(OGClass theClass)
Description copied from interface: OGOntology
Removes the provided class from the ontology.

Specified by:
removeClass in interface OGOntology
Parameters:
theClass - The class to remove to the ontology.

getClass

public OGClass getClass(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a Class in this ontology whose ID matches the provided ID. Differs from lookupClass in that the imports are not searched.

Specified by:
getClass in interface OGOntology
Parameters:
theID - The ID of the sought class.
Returns:
The matching class if found, otherwise returns void.

containsClass

public boolean containsClass(java.lang.Object theID)
Description copied from interface: OGOntology
Checks for the existence of a Class in this ontology whose ID matches the provided ID. The class must be in this ontology, not in its imports.

Specified by:
containsClass in interface OGOntology
Parameters:
theID - The ID of the sought class.
Returns:
true if the class exists in this ontology.

classes

public java.util.Iterator classes()
Description copied from interface: OGOntology
Provides a iterator for the all of the ontology's classes.

Specified by:
classes in interface OGOntology
Returns:
An iterator over all the ontology's classes.

classes

public java.util.Iterator classes(OGResource aType)
Description copied from interface: OGOntology
Provides a iterator for only the ontology's classes of the provided type.

Specified by:
classes in interface OGOntology
Parameters:
aType - The type of classes to include in the iterator.
Returns:
An iterator over some of the ontology's classes.

getClasses

public java.util.Collection getClasses(OGResource aType)
Description copied from interface: OGOntology
Provides a Collection of the ontology's classes of the provided type.

Specified by:
getClasses in interface OGOntology
Parameters:
aType - The type of classes to include in the iterator.
Returns:
A collection of some of the ontology's classes.

lookupDatatype

public OGDatatype lookupDatatype(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a matching data type in this ontology. Searches this onlology and all imported ontologies for a data type whose ID matches the provided ID.

Specified by:
lookupDatatype in interface OGOntology
Parameters:
theID - The ID of the sought data type.
Returns:
The matching data type if found, otherwise returns void.

lookupDatatype

public OGDatatype lookupDatatype(java.lang.Object theID,
                                 boolean pCreate)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Datatype in this ontology. Searches this onlology and all imported ontologies for a data type whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists.

Specified by:
lookupDatatype in interface OGOntology
Parameters:
theID - The ID of the sought data type.
pCreate - true causes a new instance to be created if no existing match is found.
Returns:
The matching data type if found or created, otherwise returns void.

createDatatype

public OGDatatype createDatatype()
Description copied from interface: OGOntology
Creates a Datatype in this ontology with a generated unique ID and adds the Datatype to the ontology.

Specified by:
createDatatype in interface OGOntology
Returns:
The matching Datatype created, otherwise returns void.

createDatatype

public OGDatatype createDatatype(java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Datatype in this ontology. Searches this onlology and all imported ontologies for a Datatype whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The Datatype if new is added to the Ontology.

Specified by:
createDatatype in interface OGOntology
Parameters:
theID - The ID of the new Datatype.
Returns:
The matching Datatype if found or created, otherwise returns void.

createDatatype

public OGDatatype createDatatype(OGResource aType)
Description copied from interface: OGOntology
Creates a Datatype in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Datatype to the ontology.

Specified by:
createDatatype in interface OGOntology
Parameters:
aType - The type of the new Datatype.
Returns:
The matching Datatype created, otherwise returns void.

createDatatype

public OGDatatype createDatatype(OGResource aType,
                                 java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Datatype in this ontology. Searches this onlology and all imported ontologies for a Datatype whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The Datatype if new is added to the Ontology with the type sets to the passed in type.

Specified by:
createDatatype in interface OGOntology
Parameters:
aType - The type of the new Datatype.
theID - The ID of the new Datatype.
Returns:
The matching Datatype if found or created, otherwise returns void.

addDatatype

public void addDatatype(OGDatatype theDatatype)
Description copied from interface: OGOntology
Adds the provided data type to the ontology. The provided data type should be added so that it will be included in both data type and resource collections as appropriate.

Specified by:
addDatatype in interface OGOntology
Parameters:
theDatatype - The data type to add to the ontology.

removeDatatype

public void removeDatatype(OGDatatype theDatatype)
Description copied from interface: OGOntology
Removes the provided data type from the ontology.

Specified by:
removeDatatype in interface OGOntology
Parameters:
theDatatype - The data type to remove to the ontology.

getDatatype

public OGDatatype getDatatype(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a Datatype in this ontology whose ID matches the provided ID. Differs from lookupDatatype in that the imports are not searched.

Specified by:
getDatatype in interface OGOntology
Parameters:
theID - The ID of the sought data type.
Returns:
The matching data type if found, otherwise returns void.

containsDatatype

public boolean containsDatatype(java.lang.Object theID)
Description copied from interface: OGOntology
Checks for the existence of a Datatype in this ontology whose ID matches the provided ID. The data type must be in this ontology, not in its imports.

Specified by:
containsDatatype in interface OGOntology
Parameters:
theID - The ID of the sought data type.
Returns:
true if the data type exists in this ontology.

datatypes

public java.util.Iterator datatypes()
Description copied from interface: OGOntology
Provides a iterator for the all of the ontology's data types.

Specified by:
datatypes in interface OGOntology
Returns:
An iterator over all the ontology's data types.

datatypes

public java.util.Iterator datatypes(OGResource aType)
Description copied from interface: OGOntology
Provides a iterator for only the ontology's data types of the provided type.

Specified by:
datatypes in interface OGOntology
Parameters:
aType - The type of data types to include in the iterator.
Returns:
An iterator over some of the ontology's data types.

getDatatypes

public java.util.Collection getDatatypes(OGResource aType)
Description copied from interface: OGOntology
Provides a Collection of the ontology's data types of the provided type.

Specified by:
getDatatypes in interface OGOntology
Parameters:
aType - The type of data types to include in the iterator.
Returns:
A collection of some of the ontology's data types.

lookupProperty

public OGProperty lookupProperty(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a matching property in this ontology. Searches this onlology and all imported ontologies for a property whose ID matches the provided ID.

Specified by:
lookupProperty in interface OGOntology
Parameters:
theID - The ID of the sought property.
Returns:
The matching property if found, otherwise returns void.

lookupProperty

public OGProperty lookupProperty(java.lang.Object theID,
                                 boolean pCreate)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a property in this ontology. Searches this onlology and all imported ontologies for a property whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists.

Specified by:
lookupProperty in interface OGOntology
Parameters:
theID - The ID of the sought property.
pCreate - true causes a new instance to be created if no existing match is found.
Returns:
The matching property if found or created, otherwise returns void.

createProperty

public OGProperty createProperty()
Description copied from interface: OGOntology
Creates a Property in this ontology with a generated unique ID and adds the Property to the ontology.

Specified by:
createProperty in interface OGOntology
Returns:
The matching Property created, otherwise returns void.

createProperty

public OGProperty createProperty(java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Property in this ontology. Searches this onlology and all imported ontologies for a Property whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The Property if new is added to the Ontology.

Specified by:
createProperty in interface OGOntology
Parameters:
theID - The ID of the new Property.
Returns:
The matching Property if found or created, otherwise returns void.

createProperty

public OGProperty createProperty(OGResource aType)
Description copied from interface: OGOntology
Creates a Property in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Property to the ontology.

Specified by:
createProperty in interface OGOntology
Parameters:
aType - The type of the new Property.
Returns:
The matching Property created, otherwise returns void.

createPropInstance

public OGPropInstance createPropInstance(OGResource aType)
Description copied from interface: OGOntology
Creates a Property instance in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Property to the ontology.

Specified by:
createPropInstance in interface OGOntology
Parameters:
aType - The type of the new Property.
Returns:
The matching Property created, otherwise returns void.

createProperty

public OGProperty createProperty(OGResource aType,
                                 java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Property in this ontology. Searches this onlology and all imported ontologies for a Property whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The Property if new is added to the Ontology with the type sets to the passed in type.

Specified by:
createProperty in interface OGOntology
Parameters:
aType - The type of the new Property.
theID - The ID of the new Property.
Returns:
The matching Property if found or created, otherwise returns void.

createPropInstance

public OGPropInstance createPropInstance(OGResource aType,
                                         java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Property instance in this ontology. Searches this onlology for a Property whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The Property if new is added to the Ontology with the type sets to the passed in type.

Specified by:
createPropInstance in interface OGOntology
Parameters:
aType - The type of the new Property.
theID - The ID of the new Property.
Returns:
The matching Property Instance if found or created, otherwise returns void.

addProperty

public void addProperty(OGProperty theProperty)
Description copied from interface: OGOntology
Adds the provided property to the ontology. The provided property should be added so that it will be included in both property and resource collections as appropriate.

Specified by:
addProperty in interface OGOntology
Parameters:
theProperty - The property to add to the ontology.

removeProperty

public void removeProperty(OGProperty theProperty)
Description copied from interface: OGOntology
Removes the provided property from the ontology.

Specified by:
removeProperty in interface OGOntology
Parameters:
theProperty - The property from remove to the ontology.

getProperty

public OGProperty getProperty(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a property in this ontology whose ID matches the provided ID. Differs from lookupProperty in that the imports are not searched.

Specified by:
getProperty in interface OGOntology
Parameters:
theID - The ID of the sought property.
Returns:
The matching property if found, otherwise returns void.

containsProperty

public boolean containsProperty(java.lang.Object theID)
Description copied from interface: OGOntology
Checks for the existence of a property in this ontology whose ID matches the provided ID. The property must be in this ontology, not in its imports.

Specified by:
containsProperty in interface OGOntology
Parameters:
theID - The ID of the sought property.
Returns:
true if the property exists in this ontology.

properties

public java.util.Iterator properties()
Description copied from interface: OGOntology
Provides a iterator for the all of the ontology's properties.

Specified by:
properties in interface OGOntology
Returns:
An iterator over all the ontology's properties

properties

public java.util.Iterator properties(OGResource aType)
Description copied from interface: OGOntology
Provides a iterator for only the ontology's properties of the provided type.

Specified by:
properties in interface OGOntology
Parameters:
aType - The type of properties to include in the iterator.
Returns:
An iterator over some of the ontology's properties.

getProperties

public java.util.Collection getProperties(OGResource aType)
Description copied from interface: OGOntology
Provides a Collection of the ontology's properties of the provided type.

Specified by:
getProperties in interface OGOntology
Parameters:
aType - The type of properties to include in the iterator.
Returns:
A collection of some of the ontology's properties.

lookupLiteral

public OGLiteral lookupLiteral(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a matching literal in this ontology. Searches this onlology and all imported ontologies for a literal whose ID matches the provided ID.

Specified by:
lookupLiteral in interface OGOntology
Parameters:
theID - The ID of the sought literal.
Returns:
The matching literal if found, otherwise returns void.

lookupLiteral

public OGLiteral lookupLiteral(java.lang.Object theID,
                               boolean pCreate)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a literal in this ontology. Searches this onlology and all imported ontologies for a literal whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists.

Specified by:
lookupLiteral in interface OGOntology
Parameters:
theID - The ID of the sought literal.
pCreate - true causes a new instance to be created if no existing match is found.
Returns:
The matching literal if found or created, otherwise returns void.

createLiteral

public OGLiteral createLiteral()
Description copied from interface: OGOntology
Creates a Literal in this ontology with a generated unique ID and adds the Literal to the ontology.

Specified by:
createLiteral in interface OGOntology
Returns:
The matching Literal created, otherwise returns void.

createLiteral

public OGLiteral createLiteral(java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Literal in this ontology. Searches this onlology and all imported ontologies for a Literal whose ID matches the provided value. May create a new instance with the appropriate ID in this ontology if none exists. The Literal if new is added to the Ontology.

Specified by:
createLiteral in interface OGOntology
Parameters:
theID - The ID of the new Literal.
Returns:
The matching Literal if found or created, otherwise returns void.

createLiteralByValue

public OGLiteral createLiteralByValue(java.lang.String theValue)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Literal in this ontology. Uses the OGLiteral genID method to create the ID for the provided value, then searches this onlology and all imported ontologies for a Literal whose ID matches. May create a new instance with the appropriate ID in this ontology if none exists and set its value. The Literal if new is added to the Ontology.

Specified by:
createLiteralByValue in interface OGOntology
Parameters:
theValue - The value of the new Literal.
Returns:
The matching Literal if found or created, otherwise returns void.

createLiteral

public OGLiteral createLiteral(OGResource aType)
Description copied from interface: OGOntology
Creates a Literal in this ontology with a generated unique ID, sets the Clases type to the passed in type and adds the Literal to the ontology.

Specified by:
createLiteral in interface OGOntology
Parameters:
aType - The type of the new Literal.
Returns:
The matching Literal created, otherwise returns void.

createLiteral

public OGLiteral createLiteral(OGResource aType,
                               java.lang.String theID)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Literal in this ontology. Searches this onlology and all imported ontologies for a Literal whose ID matches the provided ID. May create a new instance with the appropriate ID in this ontology if none exists. The Literal if new is added to the Ontology with the type sets to the passed in type.

Specified by:
createLiteral in interface OGOntology
Parameters:
aType - The type of the new Literal.
theID - The ID of the new Literal.
Returns:
The matching Literal if found or created, otherwise returns void.

createLiteralByValue

public OGLiteral createLiteralByValue(OGResource aType,
                                      java.lang.String theValue)
Description copied from interface: OGOntology
Looks for, and possibilly creates, a Literal in this ontology. Uses the OGLiteral genID method to create the ID for the provided value, then searches this onlology and all imported ontologies for a Literal whose ID matches. May create a new instance with the appropriate ID and type in this ontology if none exists and sets its value. The Literal if new is added to the Ontology.

Specified by:
createLiteralByValue in interface OGOntology
Parameters:
aType - The type of the new Literal.
Returns:
The matching Literal if found or created, otherwise returns void.

addLiteral

public void addLiteral(OGLiteral theLiteral)
Description copied from interface: OGOntology
Adds the provided literal to the ontology. The provided literal should be added so that it will be included in both literal and resource collections as appropriate.

Specified by:
addLiteral in interface OGOntology
Parameters:
theLiteral - The literal to add to the ontology.

removeLiteral

public void removeLiteral(OGLiteral theLiteral)
Description copied from interface: OGOntology
Removes the provided literal from the ontology.

Specified by:
removeLiteral in interface OGOntology
Parameters:
theLiteral - The literal to remove to the ontology.

getLiteral

public OGLiteral getLiteral(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a literal in this ontology whose ID matches the provided ID. Differs from lookupLiteral in that the imports are not searched.

Specified by:
getLiteral in interface OGOntology
Parameters:
theID - The ID of the sought literal.
Returns:
The matching literal if found, otherwise returns void.

containsLiteral

public boolean containsLiteral(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a literal in this ontology whose ID matches the provided ID. The literal must be in this ontology, not in its imports.

Specified by:
containsLiteral in interface OGOntology
Parameters:
theID - The ID of the sought literal.
Returns:
true if the literal exists in this ontology.

literals

public java.util.Iterator literals()
Description copied from interface: OGOntology
Provides a iterator for the all of the ontology's literals.

Specified by:
literals in interface OGOntology
Returns:
An iterator over all the ontology's literals.

literals

public java.util.Iterator literals(OGResource aType)
Description copied from interface: OGOntology
Provides a iterator for only the ontology's literals of the provided type.

Specified by:
literals in interface OGOntology
Parameters:
aType - The type of literals to include in the iterator.
Returns:
An iterator over some of the ontology's literals.

getLiterals

public java.util.Collection getLiterals(OGResource aType)
Description copied from interface: OGOntology
Provides a Collection of the ontology's literals of the provided type.

Specified by:
getLiterals in interface OGOntology
Parameters:
aType - The type of literals to include in the iterator.
Returns:
A collection of some of the ontology's literals.

lookupImport

public OGOntology lookupImport(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for an imported ontology by ID. Searches this onlology's imports recursively for an imported ontology whose ID matches the provided ID.

Specified by:
lookupImport in interface OGOntology
Parameters:
theID - The ID of the sought ontology.
Returns:
The matching ontology if found, otherwise returns void.

addImport

public void addImport(OGOntology theImport)
Description copied from interface: OGOntology
Adds the provided ontology to the ontology's imports. *

Specified by:
addImport in interface OGOntology
Parameters:
theImport - The ontology to add to the imports.

removeImport

public void removeImport(OGOntology theImport)
Description copied from interface: OGOntology
Removes the provided ontology from the ontology's imports.

Specified by:
removeImport in interface OGOntology
Parameters:
theImport - The ontology to remove from the imports.

getImport

public OGOntology getImport(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for an imported ontology in this ontology whose ID matches the provided ID. Differs from lookupimport in that the imports are not searched recursively.

Specified by:
getImport in interface OGOntology
Parameters:
theID - The ID of the sought ontology.
Returns:
The matching ontology if found, otherwise returns void.

getImports

public OGOntology[] getImports()
Description copied from interface: OGOntology
Accessor for the read only indexed bean property, "imports"

Specified by:
getImports in interface OGOntology
Returns:
The imported ontologies of this resources as an array.

containsImport

public boolean containsImport(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for an imported ontology in this ontology whose ID matches the provided ID. The ontology must be in this ontologies imports. Imports are not searched recursively.

Specified by:
containsImport in interface OGOntology
Parameters:
theID - The ID of the sought ontology.
Returns:
true if the ontology exists in the imports.

imports

public java.util.Iterator imports()
Description copied from interface: OGOntology
Provides a iterator for the all of the ontology's imports. Only this ontology's imports are included.

Specified by:
imports in interface OGOntology
Returns:
An iterator over all the ontology's imports.

addResource

public void addResource(OGResource theResource)
Description copied from interface: OGOntology
Adds the provided resource to the ontology. The provided resource should be added so that it will be included in collections as appropriate.

Specified by:
addResource in interface OGOntology
Parameters:
theResource - The resource to add to the ontology.

removeResource

public void removeResource(OGResource theResource)
Description copied from interface: OGOntology
Removes the provided resource from the ontology.

Specified by:
removeResource in interface OGOntology
Parameters:
theResource - The resource removed from the ontology.

lookupResource

public OGResource lookupResource(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a matching resource in this ontology. Searches this onlology and all imported ontologies for a resource whose ID matches the provided ID. Resources are added an removed only throught the specific class, property, liertal mehtods.

Specified by:
lookupResource in interface OGOntology
Parameters:
theID - The ID of the sought resource.
Returns:
The matching resource if found, otherwise returns void.

getResource

public OGResource getResource(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a resource in this ontology whose ID matches the provided ID. Resources are added an removed only throught the specific class, property, liertal mehtods.

Specified by:
getResource in interface OGOntology
Parameters:
theID - The ID of the sought resource.
Returns:
The matching class if found, otherwise returns void.

containsResource

public boolean containsResource(java.lang.Object theID)
Description copied from interface: OGOntology
Looks for a resource in this ontology whose ID matches the provided ID. The resource must be in this ontology, not in its imports.

Specified by:
containsResource in interface OGOntology
Parameters:
theID - The ID of the sought resource.
Returns:
true if the resource exists in this ontology.

resources

public java.util.Iterator resources()
Description copied from interface: OGOntology
Provides a iterator for the all of the ontology's resources.

Specified by:
resources in interface OGOntology
Returns:
An iterator over all the ontology's resources.

resources

public java.util.Iterator resources(OGResource aType)
Description copied from interface: OGOntology
Provides a iterator for only the ontology's resources of the provided type.

Specified by:
resources in interface OGOntology
Parameters:
aType - The type of resources to include in the iterator.
Returns:
An iterator over some of the ontology's resources.

getResources

public java.util.Collection getResources(OGResource aType)
Description copied from interface: OGOntology
Provides a Collection of the ontology's resources of the provided type.

Specified by:
getResources in interface OGOntology
Parameters:
aType - The type of resources to include in the iterator.
Returns:
A collection of some of the ontology's resources.


CODIP AT&T Government Solutions, Inc.