|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.semanticweb.owl.impl.model.OWLObjectImpl
|
+--org.semanticweb.owl.impl.model.OWLNamedObjectImpl
|
+--org.semanticweb.owl.impl.model.OWLOntologyImpl
Represents an OWL ontology. An ontology comprises a number of collections. Each ontology has a number of classes, properties and individuals, along with a number of axioms asserting information about those objects. This is a very simple implementation of an Ontology. Nothing special in here -- just a basic data structure with minimal functionality. The class implements the change visitor interface which allows manipulation of the ontology.
| Nested Class Summary | |
protected class |
OWLOntologyImpl.EntityAdder
|
protected class |
OWLOntologyImpl.EntityRemover
|
| Field Summary | |
protected HashMap |
annotationProperties
|
protected int |
anonymousIndividuals
|
protected Set |
changeListeners
|
protected Set |
classAxioms
|
protected HashMap |
classes
|
protected HashMap |
dataProperties
|
protected HashMap |
datatypes
|
protected Set |
importedOntologies
|
protected Set |
individualAxioms
|
protected HashMap |
individuals
|
protected boolean |
mutable
|
protected HashMap |
objectProperties
|
protected URI |
physicalURI
|
protected Set |
propertyAxioms
|
protected ChangeVisitor |
visitorProxy
|
| Fields inherited from class org.semanticweb.owl.impl.model.OWLNamedObjectImpl |
uri |
| Constructor Summary | |
OWLOntologyImpl(OWLDataFactoryImpl factory,
URI logicalURI,
URI physicalURI)
|
|
| Method Summary | |
void |
accept(OWLObjectVisitor visitor)
Accept a visit from a visitor |
void |
addOntologyChangeListener(OntologyChangeListener listener)
Add an ontology change listener to the collection of things that should be notified when ontology change events occur. |
void |
applyChanges(List changeList)
Processes changes in the change list. |
protected void |
filterEvent(OntologyChange event)
|
Set |
getAnnotationProperties()
Returns a list of the annotation properties of the ontology |
OWLAnnotationProperty |
getAnnotationProperty(URI uri)
getAnnotationProperty Retrieves an AnnotationProperty with a given uri |
Set |
getBackwardCompatibleWith()
|
protected ChangeVisitor |
getChangeVisitor()
Returns a ChangeVisitor that will apply
change events to this ontology. |
OWLClass |
getClass(URI uri)
getClass Retrieves a class with a given uri |
Set |
getClassAxioms()
Returns a list of class axioms in the ontology. |
Set |
getClasses()
Returns a list of the classes of the ontology |
Set |
getDataProperties()
Returns a list of the datatype properties of the ontology (i.e. those whose range is a concrete data type). |
OWLDataProperty |
getDataProperty(URI uri)
getDataProperty Retrieves a DataProperty with a given uri |
OWLDataType |
getDatatype(URI uri)
getDatatype Retrieves a datatype with a given uri |
Set |
getDatatypes()
Returns a list of the classes of the ontology |
Set |
getIncludedOntologies()
Returns a list of the Ontologies imported by this Ontology. |
Set |
getIncompatibleWith()
|
OWLIndividual |
getIndividual(URI uri)
getIndividual Retrieves an individual with a given uri |
Set |
getIndividualAxioms()
Returns a list of the individual axioms in the ontology. |
Set |
getIndividuals()
Returns a list of the individuals in the ontology |
URI |
getLogicalURI()
getLogicalURI Identifies this ontology uniquely (enforced within one OWLConnection) |
Set |
getObjectProperties()
Returns a list of the object properties of the ontology (i.e. those whose range is a subset of the object domain. |
OWLObjectProperty |
getObjectProperty(URI uri)
getObjectProperty Retrieves a ObjectProperty with a given uri |
URI |
getPhysicalURI()
getLogicalURI Physical URI of the ontology. |
Set |
getPriorVersion()
|
Set |
getPropertyAxioms()
Returns a list of the property axioms in the ontology. |
protected void |
handleEvent(OntologyChange event)
|
boolean |
isMutable()
Returns true if the ontology is mutable, i.e. can
be changed. |
protected void |
notifyListeners(OntologyChange event)
|
void |
removeOntologyChangeListener(OntologyChangeListener listener)
Remove the listener from the collection |
void |
visit(AddAnnotationInstance event)
Change Visitor events. |
void |
visit(AddClassAxiom event)
|
void |
visit(AddDataPropertyInstance event)
|
void |
visit(AddDataPropertyRange event)
|
void |
visit(AddDataType event)
|
void |
visit(AddDomain event)
|
void |
visit(AddEntity event)
|
void |
visit(AddEnumeration event)
|
void |
visit(AddEquivalentClass event)
|
void |
visit(AddImport event)
|
void |
visit(AddIndividualAxiom event)
|
void |
visit(AddIndividualClass event)
|
void |
visit(AddInverse event)
|
void |
visit(AddObjectPropertyInstance event)
|
void |
visit(AddObjectPropertyRange event)
|
void |
visit(AddPropertyAxiom event)
|
void |
visit(AddSuperClass event)
|
void |
visit(AddSuperProperty event)
|
void |
visit(RemoveClassAxiom event)
|
void |
visit(RemoveEntity event)
|
void |
visit(RemoveEnumeration event)
|
void |
visit(RemoveEquivalentClass event)
|
void |
visit(RemoveSuperClass event)
|
void |
visit(SetDeprecated event)
|
void |
visit(SetFunctional event)
|
void |
visit(SetInverseFunctional event)
|
void |
visit(SetLogicalURI event)
|
void |
visit(SetOneToOne event)
|
void |
visit(SetSymmetric event)
|
void |
visit(SetTransitive event)
|
| Methods inherited from class org.semanticweb.owl.impl.model.OWLNamedObjectImpl |
getURI |
| Methods inherited from class org.semanticweb.owl.impl.model.OWLObjectImpl |
clone, getAnnotations, getAnnotations, getContainedObjects, getMetadata, getOWLConnection, getOWLDataFactory |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.semanticweb.owl.model.OWLNamedObject |
getURI |
| Methods inherited from interface org.semanticweb.owl.model.OWLObject |
clone, getAnnotations, getAnnotations, getContainedObjects, getMetadata, getOWLConnection, getOWLDataFactory |
| Field Detail |
protected HashMap classes
protected HashMap annotationProperties
protected HashMap dataProperties
protected HashMap objectProperties
protected HashMap individuals
protected HashMap datatypes
protected int anonymousIndividuals
protected Set classAxioms
protected Set propertyAxioms
protected Set individualAxioms
protected Set importedOntologies
protected boolean mutable
protected URI physicalURI
protected ChangeVisitor visitorProxy
protected Set changeListeners
| Constructor Detail |
public OWLOntologyImpl(OWLDataFactoryImpl factory,
URI logicalURI,
URI physicalURI)
| Method Detail |
public void applyChanges(List changeList)
throws OWLException
changeList - list of changes to the model
OWLExceptionpublic URI getPhysicalURI()
OWLOntology
getPhysicalURI in interface OWLOntologypublic URI getLogicalURI()
OWLOntology
getLogicalURI in interface OWLOntologypublic Set getClasses()
getClasses in interface OWLOntologypublic Set getAnnotationProperties()
getAnnotationProperties in interface OWLOntologypublic Set getDataProperties()
getDataProperties in interface OWLOntologypublic Set getObjectProperties()
getObjectProperties in interface OWLOntologypublic Set getIndividuals()
getIndividuals in interface OWLOntologypublic Set getDatatypes()
getDatatypes in interface OWLOntologypublic Set getClassAxioms()
getClassAxioms in interface OWLOntologypublic Set getPropertyAxioms()
getPropertyAxioms in interface OWLOntologypublic Set getIndividualAxioms()
getIndividualAxioms in interface OWLOntologypublic Set getIncludedOntologies()
getIncludedOntologies in interface OWLOntologypublic Set getPriorVersion()
getPriorVersion in interface OWLOntologypublic Set getBackwardCompatibleWith()
getBackwardCompatibleWith in interface OWLOntologypublic Set getIncompatibleWith()
getIncompatibleWith in interface OWLOntologypublic boolean isMutable()
true if the ontology is mutable, i.e. can
be changed. If the ontology has been retrieved from a URI (for
example as an imported ontology), then the ontology will be
considered immutable.
isMutable in interface OWLOntologyboolean value
public void accept(OWLObjectVisitor visitor)
throws OWLException
OWLObject
accept in interface OWLObjectaccept in class OWLObjectImplOWLExceptionprotected ChangeVisitor getChangeVisitor()
ChangeVisitor that will apply
change events to this ontology. The visitor will also notify
any listeners that the change has occurred.
public OWLClass getClass(URI uri)
getClass in interface OWLOntologyuri - (URI)
public OWLAnnotationProperty getAnnotationProperty(URI uri)
getAnnotationProperty in interface OWLOntologyuri - (String)
public OWLDataProperty getDataProperty(URI uri)
getDataProperty in interface OWLOntologyuri - (String)
public OWLObjectProperty getObjectProperty(URI uri)
getObjectProperty in interface OWLOntologyuri - (URI)
public OWLIndividual getIndividual(URI uri)
getIndividual in interface OWLOntologyuri - (URI)
public OWLDataType getDatatype(URI uri)
getDatatype in interface OWLOntologyuri - (URI)
public void visit(AddAnnotationInstance event)
throws OWLException
visit in interface ChangeVisitorevent - an AddAnnotationInstance value
OWLException - if an error occurs
public void visit(AddEntity event)
throws OWLException
visit in interface ChangeVisitorevent - an AddEntity value
OWLException - if an error occurs
public void visit(AddDataType event)
throws OWLException
visit in interface ChangeVisitorevent - an AddDataType value
OWLException - if an error occurs
public void visit(RemoveEntity event)
throws OWLException
visit in interface ChangeVisitorevent - a RemoveEntity value
OWLException - if an error occurs
public void visit(AddImport event)
throws OWLException
visit in interface ChangeVisitorevent - an AddImport value
OWLException - if an error occurs
public void visit(AddIndividualAxiom event)
throws OWLException
visit in interface ChangeVisitorevent - an AddIndividualAxiom value
OWLException - if an error occurs
public void visit(AddClassAxiom event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddPropertyAxiom event)
throws OWLException
visit in interface ChangeVisitorevent - an AddPropertyAxiom value
OWLException - if an error occurs
public void visit(AddSuperClass event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddSuperProperty event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddIndividualClass event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddEquivalentClass event)
throws OWLException
visit in interface ChangeVisitorevent - an AddEquivalentClass value
OWLException - if an error occurs
public void visit(AddEnumeration event)
throws OWLException
visit in interface ChangeVisitorevent - an AddEnumeration value
OWLException - if an error occurs
public void visit(AddDomain event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddDataPropertyRange event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddObjectPropertyRange event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddInverse event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(SetFunctional event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(SetTransitive event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(SetSymmetric event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(SetInverseFunctional event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(SetOneToOne event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(SetDeprecated event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddObjectPropertyInstance event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(AddDataPropertyInstance event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(RemoveClassAxiom event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(RemoveSuperClass event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(RemoveEquivalentClass event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(RemoveEnumeration event)
throws OWLException
visit in interface ChangeVisitorOWLException
public void visit(SetLogicalURI event)
throws OWLException
visit in interface ChangeVisitorOWLException
protected void filterEvent(OntologyChange event)
throws OWLException
OWLException
protected void handleEvent(OntologyChange event)
throws OWLException
OWLException
protected void notifyListeners(OntologyChange event)
throws OWLException
OWLException
public void addOntologyChangeListener(OntologyChangeListener listener)
throws OWLException
OntologyChangeSource
addOntologyChangeListener in interface OntologyChangeSourceOWLException
public void removeOntologyChangeListener(OntologyChangeListener listener)
throws OWLException
OntologyChangeSource
removeOntologyChangeListener in interface OntologyChangeSourceOWLException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||