edu.lehigh.swat.hawk.storage.simplememory
Class Ontology

java.lang.Object
  extended by edu.lehigh.swat.hawk.storage.simplememory.SerializableClass
      extended by edu.lehigh.swat.hawk.storage.simplememory.Document
          extended by edu.lehigh.swat.hawk.storage.simplememory.Ontology
All Implemented Interfaces:
Document, Ontology, java.io.Serializable
Direct Known Subclasses:
Ontology

public class Ontology
extends Document
implements Ontology

A simple implementation of core.ontology in memory.

See Also:
Serialized Form

Constructor Summary
Ontology()
          Constructor
 
Method Summary
 void addCompatiblePriorOnts(DocId id)
          Add a priorVersion ontology which is backwardCompatibleWith.
 void addImportedClass(ObjectId cid, OntClass c)
          Add an imported class.
 void addImportedProperty(ObjectId pid, OntProperty p)
          Add an imported property.
 void addOntClass(OntClass c)
          add a class to this ontology
 void addPriorOnts(DocId id)
          Add a priorVersion ontology may be incompatibleWith.
 void addProperty(OntProperty p)
          add a property to this ontology
 void addRestriction(PropertyRestriction p)
          add a property to this ontology
 OntClass createClass()
          Create a Class object and set its ontology.
 OntProperty createProperty()
          Create a Property object and set its ontology.
 PropertyRestriction createRestriction()
          Create a PropertyRestriction object and set its ontology.
 void deleteCompatiblePriorOnts(DocId id)
          Delete a priorVersion ontology which is backwardCompatibleWith.
 void deleteOntClass(ObjectId id)
          delete the specified class
 void deletePriorOnts(DocId id)
          Delete a priorVersion ontology may be incompatibleWith.
 void deleteProperty(ObjectId id)
          delete a specified property
 void deleteRestriction(ObjectId id)
          delete a specified property
 OntClass[] getAllClasses()
          get all the classes in this ontology
 OntClass[] getAllPlusImportedClasses()
          Get All the classes plus the imported Classes.
 OntProperty[] getAllPlusImportedProperties()
          Get All the classes plus the imported properties.
 OntProperty[] getAllProperties()
          get all the properties in this ontology
 PropertyRestriction[] getAllRestrictions()
          get all the properties in this ontology
 java.util.Iterator getClassIterator()
          Get the Iterator of all the classes.
 DocId[] getCompatiblePriorOnts()
          Get the priorVersion ontologies which are backwardCompatibleWith
 OntClass getOntClass(ObjectId id)
          get the specified class
 DocId[] getPriorOnts()
          Get the priorVersion ontologies may be incompatibleWith
 OntProperty getProperty(ObjectId id)
          get the specified property
 java.util.Iterator getPropertyIterator()
          Get the Iterator of all the properties.
 PropertyRestriction getRestriction(ObjectId id)
          get the specified property
 java.lang.String getVersion()
          get the version of this ontology
 boolean hasClass(java.lang.String name)
          To see if ontology has the class.
 boolean hasProperty(java.lang.String name)
          To see if ontology has the property.
 boolean importedClass(ObjectId cid)
          To tell if the ontology imorted specified class.
 boolean importedProperty(ObjectId pid)
          To tell if the ontology imported specified property.
 void setVersion(java.lang.String ver)
          Set the version of this ontology.
 
Methods inherited from class edu.lehigh.swat.hawk.storage.simplememory.Document
addAssertion, addDescription, addDistinctIndividualsSet, addImports, addIndividual, addSameIndividualsSet, createIndividual, deleteAssertion, deleteDescriprion, deleteDistinctIndividualsSet, deleteImports, deleteIndividual, deleteSameIndividualsSet, flush, getAllAssertions, getAllDescriptions, getAllIndividuals, getAssertionIterator, getDescendants, getDescription, getDistinctIndividualsSets, getID, getImports, getIndividual, getIndividualIterator, getLabel, getNameSpaces, getSameIndividualsSets, getXMLBase, setDescendants, setID, setLabel, setNameSpaces, setXMLBase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.lehigh.swat.hawk.core.Document
addAssertion, addDescription, addDistinctIndividualsSet, addImports, addIndividual, addSameIndividualsSet, createIndividual, deleteAssertion, deleteDescriprion, deleteDistinctIndividualsSet, deleteImports, deleteIndividual, deleteSameIndividualsSet, flush, getAllAssertions, getAllDescriptions, getAllIndividuals, getAssertionIterator, getDescendants, getDescription, getDistinctIndividualsSets, getID, getImports, getIndividual, getIndividualIterator, getLabel, getNameSpaces, getSameIndividualsSets, getXMLBase, setDescendants, setID, setLabel, setNameSpaces, setXMLBase
 

Constructor Detail

Ontology

public Ontology()
Constructor

Method Detail

addOntClass

public void addOntClass(OntClass c)
add a class to this ontology

Specified by:
addOntClass in interface Ontology

getOntClass

public OntClass getOntClass(ObjectId id)
get the specified class

Specified by:
getOntClass in interface Ontology

deleteOntClass

public void deleteOntClass(ObjectId id)
delete the specified class

Specified by:
deleteOntClass in interface Ontology

getAllClasses

public OntClass[] getAllClasses()
get all the classes in this ontology

Specified by:
getAllClasses in interface Ontology

getClassIterator

public java.util.Iterator getClassIterator()
Get the Iterator of all the classes.

Specified by:
getClassIterator in interface Ontology

addProperty

public void addProperty(OntProperty p)
add a property to this ontology

Specified by:
addProperty in interface Ontology

getProperty

public OntProperty getProperty(ObjectId id)
get the specified property

Specified by:
getProperty in interface Ontology

deleteProperty

public void deleteProperty(ObjectId id)
delete a specified property

Specified by:
deleteProperty in interface Ontology

getAllProperties

public OntProperty[] getAllProperties()
get all the properties in this ontology

Specified by:
getAllProperties in interface Ontology

getPropertyIterator

public java.util.Iterator getPropertyIterator()
Get the Iterator of all the properties.

Specified by:
getPropertyIterator in interface Ontology

addRestriction

public void addRestriction(PropertyRestriction p)
add a property to this ontology

Specified by:
addRestriction in interface Ontology

getRestriction

public PropertyRestriction getRestriction(ObjectId id)
get the specified property

Specified by:
getRestriction in interface Ontology

deleteRestriction

public void deleteRestriction(ObjectId id)
delete a specified property

Specified by:
deleteRestriction in interface Ontology

getAllRestrictions

public PropertyRestriction[] getAllRestrictions()
get all the properties in this ontology

Specified by:
getAllRestrictions in interface Ontology

getCompatiblePriorOnts

public DocId[] getCompatiblePriorOnts()
Get the priorVersion ontologies which are backwardCompatibleWith

Specified by:
getCompatiblePriorOnts in interface Ontology

addCompatiblePriorOnts

public void addCompatiblePriorOnts(DocId id)
Add a priorVersion ontology which is backwardCompatibleWith.

Specified by:
addCompatiblePriorOnts in interface Ontology

deleteCompatiblePriorOnts

public void deleteCompatiblePriorOnts(DocId id)
Delete a priorVersion ontology which is backwardCompatibleWith.

Specified by:
deleteCompatiblePriorOnts in interface Ontology

getPriorOnts

public DocId[] getPriorOnts()
Get the priorVersion ontologies may be incompatibleWith

Specified by:
getPriorOnts in interface Ontology

addPriorOnts

public void addPriorOnts(DocId id)
Add a priorVersion ontology may be incompatibleWith.

Specified by:
addPriorOnts in interface Ontology

deletePriorOnts

public void deletePriorOnts(DocId id)
Delete a priorVersion ontology may be incompatibleWith.

Specified by:
deletePriorOnts in interface Ontology

getVersion

public java.lang.String getVersion()
get the version of this ontology

Specified by:
getVersion in interface Ontology

setVersion

public void setVersion(java.lang.String ver)
Set the version of this ontology.

Specified by:
setVersion in interface Ontology

createClass

public OntClass createClass()
Create a Class object and set its ontology.

Specified by:
createClass in interface Ontology

createProperty

public OntProperty createProperty()
Create a Property object and set its ontology.

Specified by:
createProperty in interface Ontology

createRestriction

public PropertyRestriction createRestriction()
Create a PropertyRestriction object and set its ontology.

Specified by:
createRestriction in interface Ontology

hasClass

public boolean hasClass(java.lang.String name)
To see if ontology has the class.

Specified by:
hasClass in interface Ontology

hasProperty

public boolean hasProperty(java.lang.String name)
To see if ontology has the property.

Specified by:
hasProperty in interface Ontology

addImportedClass

public void addImportedClass(ObjectId cid,
                             OntClass c)
Add an imported class.


addImportedProperty

public void addImportedProperty(ObjectId pid,
                                OntProperty p)
Add an imported property.


getAllPlusImportedClasses

public OntClass[] getAllPlusImportedClasses()
Get All the classes plus the imported Classes.

Specified by:
getAllPlusImportedClasses in interface Ontology

getAllPlusImportedProperties

public OntProperty[] getAllPlusImportedProperties()
Get All the classes plus the imported properties.

Specified by:
getAllPlusImportedProperties in interface Ontology

importedClass

public boolean importedClass(ObjectId cid)
To tell if the ontology imorted specified class.

Specified by:
importedClass in interface Ontology

importedProperty

public boolean importedProperty(ObjectId pid)
To tell if the ontology imported specified property.

Specified by:
importedProperty in interface Ontology