org.semanticweb.owlapi.model
Interface OWLOntology

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLObject
All Known Subinterfaces:
OWLMutableOntology
All Known Implementing Classes:
OWLOntologyImpl

public interface OWLOntology
extends OWLObject

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group Date: 24-Oct-2006 An OWLOntology consists of a possibly empty set of OWLAxioms and a possibly empty set of OWLAnnotations. An ontology can have an ontology IRI which can be used to identify the ontology. If it has an ontology IRI then it may also have an ontology version IRI. Since OWL 2, an ontology need not have an ontology IRI. An ontology cannot be modified directly. Changes must be applied via its OWLOntologyManager.


Method Summary
 boolean containsAnnotationPropertyReference(IRI propIRI)
          Determines if the ontology contains a reference to an annotation property that has a specific IRI.
 boolean containsAnnotationPropertyReference(IRI propIRI, boolean includeImportsClosure)
           
 boolean containsAxiom(OWLAxiom axiom)
          Determines if this ontology contains the specified axiom.
 boolean containsAxiom(OWLAxiom axiom, boolean includeImportsClosure)
          Determines if this ontology, and possibly the imports closure, contains the specified axiom.
 boolean containsClassReference(IRI owlClassIRI)
          Determines if the ontology contains a reference to a class that has a specific IRI.
 boolean containsClassReference(IRI owlClassIRI, boolean includeImportsClosure)
           
 boolean containsDataPropertyReference(IRI propIRI)
          Determines if the ontology contains a reference to a data property that has a specific IRI.
 boolean containsDataPropertyReference(IRI propIRI, boolean includeImportsClosure)
           
 boolean containsDatatypeReference(IRI datatypeIRI)
           
 boolean containsDatatypeReference(IRI datatypeIRI, boolean includeImportsClosure)
           
 boolean containsEntityReference(IRI entityIRI)
           
 boolean containsEntityReference(IRI entityIRI, boolean includeImportsClosure)
           
 boolean containsEntityReference(OWLEntity owlEntity)
          Determines if the ontology contains a reference to the specified entity.
 boolean containsEntityReference(OWLEntity owlEntity, boolean includeImportsClosure)
          Determines if the ontology, and possibly its imports closure, contains a reference to the specified entity.
 boolean containsIndividualReference(IRI individualIRI)
          Determines if the ontology contains a reference to an individual that has a specific IRI.
 boolean containsIndividualReference(IRI individualIRI, boolean includeImportsClosure)
           
 boolean containsObjectPropertyReference(IRI propIRI)
          Determines if the ontology contains a reference to an object property that has a specific IRI.
 boolean containsObjectPropertyReference(IRI propIRI, boolean includeImportsClosure)
           
 java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLAnnotationSubject entity)
          Gets the axioms that annotate the specified entity.
 java.util.Set<OWLAnnotationPropertyDomainAxiom> getAnnotationPropertyDomainAxioms(OWLAnnotationProperty property)
           
 java.util.Set<OWLAnnotationPropertyRangeAxiom> getAnnotationPropertyRangeAxioms(OWLAnnotationProperty property)
           
 java.util.Set<OWLAnnotation> getAnnotations()
          Gets the annotations on this ontology.
 java.util.Set<OWLAsymmetricObjectPropertyAxiom> getAsymmetricObjectPropertyAxioms(OWLObjectPropertyExpression property)
          Gets the axiom that states that this property is asymmetric.
 int getAxiomCount()
          Gets the number of axioms in this ontology.
<T extends OWLAxiom>
int
getAxiomCount(AxiomType<T> axiomType)
          Gets the axiom count of a specific type of axiom
<T extends OWLAxiom>
int
getAxiomCount(AxiomType<T> axiomType, boolean includeImportsClosure)
          Gets the axiom count of a specific type of axiom, possibly in the imports closure of this ontology
 java.util.Set<OWLAxiom> getAxioms()
          Retrieves all of the axioms in this ontology.
<T extends OWLAxiom>
java.util.Set<T>
getAxioms(AxiomType<T> axiomType)
          Gets the axioms which are of the specified type.
<T extends OWLAxiom>
java.util.Set<T>
getAxioms(AxiomType<T> axiomType, boolean includeImportsClosure)
          Gets the axioms which are of the specified type.
 java.util.Set<OWLAnnotationAxiom> getAxioms(OWLAnnotationProperty property)
          Gets the axioms that form the definition/description of an annotation property.
 java.util.Set<OWLClassAxiom> getAxioms(OWLClass cls)
          Gets the axioms that form the definition/description of a class.
 java.util.Set<OWLDataPropertyAxiom> getAxioms(OWLDataProperty prop)
          Gets the axioms that form the definition/description of a data property.
 java.util.Set<OWLDatatypeDefinitionAxiom> getAxioms(OWLDatatype datatype)
          Gets the datatype definition axioms for the specified datatype
 java.util.Set<OWLIndividualAxiom> getAxioms(OWLIndividual individual)
          Gets the axioms that form the definition/description of an individual
 java.util.Set<OWLObjectPropertyAxiom> getAxioms(OWLObjectPropertyExpression prop)
          Gets the axioms that form the definition/description of an object property.
 java.util.Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLClass type)
           
 java.util.Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLIndividual individual)
           
 java.util.Set<OWLDataPropertyAssertionAxiom> getDataPropertyAssertionAxioms(OWLIndividual individual)
           
 java.util.Set<OWLDataPropertyDomainAxiom> getDataPropertyDomainAxioms(OWLDataProperty property)
           
 java.util.Set<OWLDataPropertyRangeAxiom> getDataPropertyRangeAxioms(OWLDataProperty property)
           
 java.util.Set<OWLSubDataPropertyOfAxiom> getDataSubPropertyAxiomsForSubProperty(OWLDataProperty lhsProperty)
           
 java.util.Set<OWLSubDataPropertyOfAxiom> getDataSubPropertyAxiomsForSuperProperty(OWLDataPropertyExpression property)
           
 java.util.Set<OWLDatatypeDefinitionAxiom> getDatatypeDefinitions(OWLDatatype datatype)
           
 java.util.Set<OWLDeclarationAxiom> getDeclarationAxioms(OWLEntity subject)
          Gets the declaration axioms for specified entity.
 java.util.Set<OWLDifferentIndividualsAxiom> getDifferentIndividualAxioms(OWLIndividual individual)
           
 java.util.Set<OWLOntology> getDirectImports()
          Gets the set of loaded ontologies that this ontology is related to via the directlyImports relation.
 java.util.Set<IRI> getDirectImportsDocuments()
          Gets the set of document IRIs that are directly imported by this ontology.
 java.util.Set<OWLDisjointClassesAxiom> getDisjointClassesAxioms(OWLClass cls)
          Gets the set of disjoint class axioms that contain the specified class as an operand.
 java.util.Set<OWLDisjointDataPropertiesAxiom> getDisjointDataPropertiesAxioms(OWLDataProperty property)
           
 java.util.Set<OWLDisjointObjectPropertiesAxiom> getDisjointObjectPropertiesAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLDisjointUnionAxiom> getDisjointUnionAxioms(OWLClass owlClass)
          Gets the set of disjoint union axioms that have the specified class as the named class that is equivalent to the disjoint union of operands.
 java.util.Set<OWLEntity> getEntitiesWithIRI(IRI iri)
          Gets the entities in the signature of this ontology that have the specified IRI
 java.util.Set<OWLEntity> getEntitiesWithIRI(IRI iri, boolean includeImportsClosure)
          Gets the entities in the signature of this ontology, and possibly its imports closure, that have the specified IRI
 java.util.Set<OWLEquivalentClassesAxiom> getEquivalentClassesAxioms(OWLClass cls)
          Gets all of the equivalent axioms in this ontology that contain the specified class as an operand.
 java.util.Set<OWLEquivalentDataPropertiesAxiom> getEquivalentDataPropertiesAxioms(OWLDataProperty property)
           
 java.util.Set<OWLEquivalentObjectPropertiesAxiom> getEquivalentObjectPropertiesAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLFunctionalDataPropertyAxiom> getFunctionalDataPropertyAxioms(OWLDataPropertyExpression property)
           
 java.util.Set<OWLFunctionalObjectPropertyAxiom> getFunctionalObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLClassAxiom> getGeneralClassAxioms()
          Gets the set of general axioms in this ontology.
 java.util.Set<OWLHasKeyAxiom> getHasKeyAxioms(OWLClass cls)
          Gets the has key axioms that have the specified class as their subject.
 java.util.Set<OWLOntology> getImports()
          Gets the set of loaded ontologies that this ontology is related to via the transitive closure of the directlyImports relation.
 java.util.Set<OWLOntology> getImportsClosure()
          Gets the set of loaded ontologies that this ontology is related to via the reflexive transitive closure of the directlyImports relation as defined in Section 3.4 of the OWL 2 Structural Specification.
 java.util.Set<OWLImportsDeclaration> getImportsDeclarations()
          Gets the set of imports declarations for this ontology.
 java.util.Set<OWLInverseFunctionalObjectPropertyAxiom> getInverseFunctionalObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLInverseObjectPropertiesAxiom> getInverseObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLIrreflexiveObjectPropertyAxiom> getIrreflexiveObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 int getLogicalAxiomCount()
          Gets the number of logical axioms in this ontology.
 java.util.Set<OWLLogicalAxiom> getLogicalAxioms()
          Gets all of the axioms in the ontology that affect the logical meaning of the ontology.
 java.util.Set<OWLNegativeDataPropertyAssertionAxiom> getNegativeDataPropertyAssertionAxioms(OWLIndividual individual)
           
 java.util.Set<OWLNegativeObjectPropertyAssertionAxiom> getNegativeObjectPropertyAssertionAxioms(OWLIndividual individual)
           
 java.util.Set<OWLObjectPropertyAssertionAxiom> getObjectPropertyAssertionAxioms(OWLIndividual individual)
           
 java.util.Set<OWLObjectPropertyDomainAxiom> getObjectPropertyDomainAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLObjectPropertyRangeAxiom> getObjectPropertyRangeAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLSubObjectPropertyOfAxiom> getObjectSubPropertyAxiomsForSubProperty(OWLObjectPropertyExpression property)
          Gets the object property sub property axioms where the specified property is on the left hand side of the axiom.
 java.util.Set<OWLSubObjectPropertyOfAxiom> getObjectSubPropertyAxiomsForSuperProperty(OWLObjectPropertyExpression property)
           
 OWLOntologyID getOntologyID()
          Gets the identity of this ontology (i.e.
 OWLOntologyManager getOWLOntologyManager()
          Gets the manager that created this ontology.
 java.util.Set<OWLAnnotationProperty> getReferencedAnnotationProperties()
           
 java.util.Set<OWLAnnotationProperty> getReferencedAnnotationProperties(boolean includeImportsClosure)
           
 java.util.Set<OWLAnonymousIndividual> getReferencedAnonymousIndividuals()
          Gets the referenced anonymous individuals
 java.util.Set<OWLClass> getReferencedClasses()
          Gets the classes that are referenced by axioms in this ontology.
 java.util.Set<OWLClass> getReferencedClasses(boolean includeImportsClosure)
          Gets the classes that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.
 java.util.Set<OWLDataProperty> getReferencedDataProperties()
          Gets the data properties that are referenced by axioms in this ontology.
 java.util.Set<OWLDataProperty> getReferencedDataProperties(boolean includeImportsClosure)
          Gets the data properties that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.
 java.util.Set<OWLDatatype> getReferencedDatatypes()
          Gets the datatypes that are referenced by this ontology
 java.util.Set<OWLDatatype> getReferencedDatatypes(boolean includeImportsClosure)
          Gets the datatypes that are referenced by this ontology and possibly its imports closure
 java.util.Set<OWLEntity> getReferencedEntities()
          Gets the entities that are referenced by axioms in this ontology.
 java.util.Set<OWLNamedIndividual> getReferencedIndividuals()
          Gets the individuals that are referenced by axioms in this ontology.
 java.util.Set<OWLNamedIndividual> getReferencedIndividuals(boolean includeImportsClosure)
          Gets the named individuals that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.
 java.util.Set<OWLObjectProperty> getReferencedObjectProperties()
          Gets the object properties that are referenced by axioms (including annotation axioms) in this ontology.
 java.util.Set<OWLObjectProperty> getReferencedObjectProperties(boolean includeImportsClosure)
          Gets the object properties that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.
 java.util.Set<OWLAxiom> getReferencingAxioms(OWLAnonymousIndividual individual)
          Gets the axioms that reference the specified anonymous individual
 java.util.Set<OWLAxiom> getReferencingAxioms(OWLEntity owlEntity)
          Gets the axioms where the specified entity appears in the signature of the axiom.
 java.util.Set<OWLAxiom> getReferencingAxioms(OWLEntity owlEntity, boolean includeImportsClosure)
          Gets the axioms where the specified entity appears in the signature of the axiom.
 java.util.Set<OWLReflexiveObjectPropertyAxiom> getReflexiveObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLSameIndividualAxiom> getSameIndividualAxioms(OWLIndividual individual)
           
 java.util.Set<OWLSubAnnotationPropertyOfAxiom> getSubAnnotationPropertyOfAxioms(OWLAnnotationProperty subProperty)
           
 java.util.Set<OWLSubClassOfAxiom> getSubClassAxiomsForSubClass(OWLClass cls)
          Gets all of the subclass axioms where the left hand side (the subclass) is equal to the specified class.
 java.util.Set<OWLSubClassOfAxiom> getSubClassAxiomsForSuperClass(OWLClass cls)
          Gets all of the subclass axioms where the right hand side (the superclass) is equal to the specified class.
 java.util.Set<OWLSymmetricObjectPropertyAxiom> getSymmetricObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLTransitiveObjectPropertyAxiom> getTransitiveObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 boolean isAnonymous()
          Determines whether or not this ontology is anonymous.
 boolean isDeclared(OWLEntity owlEntity)
          Determines if this ontology declares an entity i.e.
 boolean isDeclared(OWLEntity owlEntity, boolean includeImportsClosure)
          Determines if this ontology or its imports closure declares an entity i.e.
 boolean isEmpty()
          Determines if this ontology is empty - an ontology is empty if it does not contain any axioms (i.e.
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLObject
accept, accept, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getObjectPropertiesInSignature, getSignature
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getOWLOntologyManager

OWLOntologyManager getOWLOntologyManager()
Gets the manager that created this ontology. The manager is used by various methods on OWLOntology to resolve imports

Returns:
The manager that created this ontology.

getOntologyID

OWLOntologyID getOntologyID()
Gets the identity of this ontology (i.e. ontology IRI + version IRI)

Returns:
The ID of this ontology.

isAnonymous

boolean isAnonymous()
Determines whether or not this ontology is anonymous. An ontology is anonymous if it does not have an ontology IRI.

Returns:
true if this ontology is anonymous, otherwise false

getAnnotations

java.util.Set<OWLAnnotation> getAnnotations()
Gets the annotations on this ontology.

Returns:
A set of annotations on this ontology. The set returned will be a copy - modifying the set will have no effect on the annotations in this ontology, similarly, any changes that affect the annotations on this ontology will not change the returned set.

getDirectImportsDocuments

java.util.Set<IRI> getDirectImportsDocuments()
                                             throws UnknownOWLOntologyException
Gets the set of document IRIs that are directly imported by this ontology. This corresponds to the IRIs defined by the directlyImportsDocument association as discussed in Section 3.4 of the OWL 2 Structural specification.

Returns:
The set of directlyImportsDocument IRIs.
Throws:
UnknownOWLOntologyException - If this ontology is no longer managed by its manager because it was removed from the manager.

getDirectImports

java.util.Set<OWLOntology> getDirectImports()
                                            throws UnknownOWLOntologyException
Gets the set of loaded ontologies that this ontology is related to via the directlyImports relation. See Section 3.4 of the OWL 2 specification for the definition of the directlyImports relation.

Note that there may be fewer ontologies in the set returned by this method than there are IRIs in the set returned by the getDirectImportsDocuments() method. This will be the case if some of the ontologies that are directly imported by this ontology are not loaded for what ever reason.

Returns:
A set of ontologies such that for this ontology O, and each ontology O' in the set, (O, O') is in the directlyImports relation.
Throws:
UnknownOWLOntologyException - If this ontology is no longer managed by its manager because it was removed from the manager.

getImports

java.util.Set<OWLOntology> getImports()
                                      throws UnknownOWLOntologyException
Gets the set of loaded ontologies that this ontology is related to via the transitive closure of the directlyImports relation. See Section 3.4 of the OWL 2 specification for the definition of the directlyImports relation.

For example, if this ontology imports ontology B, and ontology B imports ontology C, then this method will return the set consisting of ontology B and ontology C.

Returns:
The set of ontologies that this ontology is related to via the transitive closure of the directlyImports relation as defined in Section 3.4 of the OWL 2 Structural Specification. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.
Throws:
UnknownOWLOntologyException - if this ontology is no longer managed by its manager because it was removed from the manager.

getImportsClosure

java.util.Set<OWLOntology> getImportsClosure()
                                             throws UnknownOWLOntologyException
Gets the set of loaded ontologies that this ontology is related to via the reflexive transitive closure of the directlyImports relation as defined in Section 3.4 of the OWL 2 Structural Specification. (i.e. The set returned includes all ontologies returned by the getImports() method plus this ontology.)

For example, if this ontology imports ontology B, and ontology B imports ontology C, then this method will return the set consisting of this ontology, ontology B and ontology C.

Returns:
The set of ontologies in the reflexive transitive closure of the directlyImports relation.
Throws:
UnknownOWLOntologyException - If this ontology is no longer managed by its manager because it was removed from the manager.

getImportsDeclarations

java.util.Set<OWLImportsDeclaration> getImportsDeclarations()
Gets the set of imports declarations for this ontology. The set returned represents the set of IRIs that correspond to the set of IRIs in an ontology's directlyImportsDocuments (see Section 3 in the OWL 2 structural specification).

Returns:
The set of imports declarations that correspond to the set of ontology document IRIs that are directly imported by this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

isEmpty

boolean isEmpty()
Determines if this ontology is empty - an ontology is empty if it does not contain any axioms (i.e. getAxioms() returns the empty set), and it does not have any annotations (i.e. getAnnotations() returns the empty set).

Returns:
true if the ontology is empty, otherwise false.

getAxioms

java.util.Set<OWLAxiom> getAxioms()
Retrieves all of the axioms in this ontology. Note that to test whether or not this ontology is empty (i.e. contains no axioms, the isEmpty method is preferred over getAxioms().isEmpty(). )

Returns:
The set of all axioms in this ontology, including logical axioms and annotation axioms. The set that is returned is a copy of the axioms in the ontology - it will not be updated if the ontology changes. It is recommended that the containsAxiom method is used to determine whether or not this ontology contains a particular axiom rather than using getAxioms().contains().

getAxiomCount

int getAxiomCount()
Gets the number of axioms in this ontology.

Returns:
The number of axioms in this ontology.

getLogicalAxioms

java.util.Set<OWLLogicalAxiom> getLogicalAxioms()
Gets all of the axioms in the ontology that affect the logical meaning of the ontology. In other words, this method returns all axioms that are not annotation axioms, or declaration axioms.

Returns:
A set of axioms which are of the type OWLLogicalAxiom The set that is returned is a copy of the axioms in the ontology - it will not be updated if the ontology changes.

getLogicalAxiomCount

int getLogicalAxiomCount()
Gets the number of logical axioms in this ontology.

Returns:
The number of axioms in this ontology.

getAxioms

<T extends OWLAxiom> java.util.Set<T> getAxioms(AxiomType<T> axiomType)
Gets the axioms which are of the specified type.

Parameters:
axiomType - The type of axioms to be retrived.
Returns:
A set containing the axioms which are of the specified type. The set that is returned is a copy of the axioms in the ontology - it will not be updated if the ontology changes.

getAxioms

<T extends OWLAxiom> java.util.Set<T> getAxioms(AxiomType<T> axiomType,
                                                boolean includeImportsClosure)
Gets the axioms which are of the specified type.

Parameters:
axiomType - The type of axioms to be retrived.
includeImportsClosure - if true then axioms of the specified type will also be retrieved from the imports closure of this ontology, if false then axioms of the specified type will only be retrieved from this ontology.
Returns:
A set containing the axioms which are of the specified type. The set that is returned is a copy of the axioms in the ontology (and its imports closure) - it will not be updated if the ontology changes.

getAxiomCount

<T extends OWLAxiom> int getAxiomCount(AxiomType<T> axiomType)
Gets the axiom count of a specific type of axiom

Parameters:
axiomType - The type of axiom to count
Returns:
The number of the specified types of axioms in this ontology

getAxiomCount

<T extends OWLAxiom> int getAxiomCount(AxiomType<T> axiomType,
                                       boolean includeImportsClosure)
Gets the axiom count of a specific type of axiom, possibly in the imports closure of this ontology

Parameters:
axiomType - The type of axiom to count
includeImportsClosure - Specifies that the imports closure should be included when counting axioms
Returns:
The number of the specified types of axioms in this ontology

containsAxiom

boolean containsAxiom(OWLAxiom axiom)
Determines if this ontology contains the specified axiom.

Parameters:
axiom - The axiom to test for.
Returns:
true if the ontology contains the specified axioms, or false if the ontology doesn't contain the specified axiom.

containsAxiom

boolean containsAxiom(OWLAxiom axiom,
                      boolean includeImportsClosure)
Determines if this ontology, and possibly the imports closure, contains the specified axiom.

Parameters:
axiom - The axiom to test for.
includeImportsClosure - if true the imports closure of this ontology will be searched for the specific axiom, if false just this ontology will be searched.
Returns:
true if the ontology contains the specified axioms, or false if the ontology doesn't contain the specified axiom.

getGeneralClassAxioms

java.util.Set<OWLClassAxiom> getGeneralClassAxioms()
Gets the set of general axioms in this ontology. This includes:

Returns:
The set that is returned is a copy of the axioms in the ontology - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedEntities

java.util.Set<OWLEntity> getReferencedEntities()
Gets the entities that are referenced by axioms in this ontology.

Returns:
A set of OWLEntity objects. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedClasses

java.util.Set<OWLClass> getReferencedClasses()
Gets the classes that are referenced by axioms in this ontology.

Returns:
A set of named classes, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedClasses

java.util.Set<OWLClass> getReferencedClasses(boolean includeImportsClosure)
Gets the classes that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.

Parameters:
includeImportsClosure - Specifies whether referenced classes should be drawn from this ontology or the imports closure. If true then the set of referenced classes will be from the imports closure of this ontology, if false then the set of referenced classes will just be from this ontology.
Returns:
A set of named classes, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedObjectProperties

java.util.Set<OWLObjectProperty> getReferencedObjectProperties()
Gets the object properties that are referenced by axioms (including annotation axioms) in this ontology.

Returns:
A set of object properties, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedObjectProperties

java.util.Set<OWLObjectProperty> getReferencedObjectProperties(boolean includeImportsClosure)
Gets the object properties that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.

Parameters:
includeImportsClosure - Specifies whether referenced object properties should be drawn from this ontology or the imports closure. If true then the set of referenced object properties will be from the imports closure of this ontology, if false then the set of referenced object properties will just be from this ontology.
Returns:
A set of object properties, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedDataProperties

java.util.Set<OWLDataProperty> getReferencedDataProperties()
Gets the data properties that are referenced by axioms in this ontology.

Returns:
A set of data properties, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedDataProperties

java.util.Set<OWLDataProperty> getReferencedDataProperties(boolean includeImportsClosure)
Gets the data properties that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.

Parameters:
includeImportsClosure - Specifies whether referenced data properties should be drawn from this ontology or the imports closure. If true then the set of referenced data properties will be from the imports closure of this ontology, if false then the set of referenced data properties will just be from this ontology.
Returns:
A set of data properties, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedIndividuals

java.util.Set<OWLNamedIndividual> getReferencedIndividuals()
Gets the individuals that are referenced by axioms in this ontology.

Returns:
A set of individuals, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedIndividuals

java.util.Set<OWLNamedIndividual> getReferencedIndividuals(boolean includeImportsClosure)
Gets the named individuals that are referenced by axioms in this ontology, and possibly the imports closure of this ontology.

Parameters:
includeImportsClosure - Specifies whether referenced named individuals should be drawn from this ontology or the imports closure. If true then the set of referenced named individuals will be from the imports closure of this ontology, if false then the set of referenced named individuals will just be from this ontology.
Returns:
A set of named individuals, which are referenced by any axiom in this ontology. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencedAnonymousIndividuals

java.util.Set<OWLAnonymousIndividual> getReferencedAnonymousIndividuals()
Gets the referenced anonymous individuals

Returns:
The set of referenced anonymous individuals

getReferencedDatatypes

java.util.Set<OWLDatatype> getReferencedDatatypes()
Gets the datatypes that are referenced by this ontology

Returns:
The set of referenced datatypes

getReferencedDatatypes

java.util.Set<OWLDatatype> getReferencedDatatypes(boolean includeImportsClosure)
Gets the datatypes that are referenced by this ontology and possibly its imports closure

Parameters:
includeImportsClosure - Specifies whether referenced named individuals should be drawn from this ontology or the imports closure of this ontology. If true then the set of referenced named individuals will be from the imports closure of this ontology, if false then the set of referenced named individuals will just be from this ontology.
Returns:
The set of datatypes that are referenced by axioms in this ontology and possibly its imports closure

getReferencedAnnotationProperties

java.util.Set<OWLAnnotationProperty> getReferencedAnnotationProperties()

getReferencedAnnotationProperties

java.util.Set<OWLAnnotationProperty> getReferencedAnnotationProperties(boolean includeImportsClosure)

getReferencingAxioms

java.util.Set<OWLAxiom> getReferencingAxioms(OWLEntity owlEntity)
Gets the axioms where the specified entity appears in the signature of the axiom. The set that is returned, contains all axioms that directly reference the specified entity.

Parameters:
owlEntity - The entity that should be directly referred to by an axiom that appears in the results set.
Returns:
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencingAxioms

java.util.Set<OWLAxiom> getReferencingAxioms(OWLEntity owlEntity,
                                             boolean includeImportsClosure)
Gets the axioms where the specified entity appears in the signature of the axiom. The set that is returned, contains all axioms that directly reference the specified entity.

Parameters:
owlEntity - The entity that should be directly referred to by an axiom that appears in the results set.
includeImportsClosure - Specifies if the axioms returned should just be from this ontology, or from the imports closure of this ontology. If true the axioms returned will be from the imports closure of this ontology, if false the axioms returned will just be from this ontology.
Returns:
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getReferencingAxioms

java.util.Set<OWLAxiom> getReferencingAxioms(OWLAnonymousIndividual individual)
Gets the axioms that reference the specified anonymous individual

Parameters:
individual - The individual
Returns:
The axioms that reference the specified anonymous individual

containsEntityReference

boolean containsEntityReference(OWLEntity owlEntity)
Determines if the ontology contains a reference to the specified entity.

Parameters:
owlEntity - The entity
Returns:
true if the ontology contains a reference to the specified entity, otherwise false The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

containsEntityReference

boolean containsEntityReference(OWLEntity owlEntity,
                                boolean includeImportsClosure)
Determines if the ontology, and possibly its imports closure, contains a reference to the specified entity.

Parameters:
owlEntity - The entity
includeImportsClosure - Specifies whether the imports closure should be examined for the entity reference or not.
Returns:
true if the ontology contains a reference to the specified entity, otherwise false The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

containsEntityReference

boolean containsEntityReference(IRI entityIRI)

containsEntityReference

boolean containsEntityReference(IRI entityIRI,
                                boolean includeImportsClosure)

isDeclared

boolean isDeclared(OWLEntity owlEntity)
Determines if this ontology declares an entity i.e. it contains a declaration axiom for the specified entity.

Parameters:
owlEntity - The entity to be tested for
Returns:
true if the ontology contains a declaration for the specified entity, otherwise false.

isDeclared

boolean isDeclared(OWLEntity owlEntity,
                   boolean includeImportsClosure)
Determines if this ontology or its imports closure declares an entity i.e. contains a declaration axiom for the specified entity.

Parameters:
owlEntity - The entity to be tested for
includeImportsClosure - true if the imports closure of this ontology should be examined, false if just this ontology should be examined.
Returns:
true if the ontology or its imports closure contains a declaration for the specified entity, otherwise false.

containsClassReference

boolean containsClassReference(IRI owlClassIRI)
Determines if the ontology contains a reference to a class that has a specific IRI.

Parameters:
owlClassIRI - The IRI to test for.
Returns:
true if the ontology refers to a class with the specified IRI, otherwise false

containsClassReference

boolean containsClassReference(IRI owlClassIRI,
                               boolean includeImportsClosure)

containsObjectPropertyReference

boolean containsObjectPropertyReference(IRI propIRI)
Determines if the ontology contains a reference to an object property that has a specific IRI.

Parameters:
propIRI - The IRI of the property
Returns:
true if the ontology references (ontology signature contains) a property that has the specified IRI.

containsObjectPropertyReference

boolean containsObjectPropertyReference(IRI propIRI,
                                        boolean includeImportsClosure)

containsDataPropertyReference

boolean containsDataPropertyReference(IRI propIRI)
Determines if the ontology contains a reference to a data property that has a specific IRI.

Parameters:
propIRI - The IRI to check for
Returns:
true if the ontology references (ontology signature contains) a property that has the specified IRI.

containsDataPropertyReference

boolean containsDataPropertyReference(IRI propIRI,
                                      boolean includeImportsClosure)

containsAnnotationPropertyReference

boolean containsAnnotationPropertyReference(IRI propIRI)
Determines if the ontology contains a reference to an annotation property that has a specific IRI.

Parameters:
propIRI - The IRI to check for
Returns:
true if the ontology references (ontology signature contains) a property that has the specified URI.

containsAnnotationPropertyReference

boolean containsAnnotationPropertyReference(IRI propIRI,
                                            boolean includeImportsClosure)

containsIndividualReference

boolean containsIndividualReference(IRI individualIRI)
Determines if the ontology contains a reference to an individual that has a specific IRI.

Parameters:
individualIRI - The IRI of the individual
Returns:
true if the ontology references (ontology signature contains) an individual that has the specified IRI.

containsIndividualReference

boolean containsIndividualReference(IRI individualIRI,
                                    boolean includeImportsClosure)

containsDatatypeReference

boolean containsDatatypeReference(IRI datatypeIRI)

containsDatatypeReference

boolean containsDatatypeReference(IRI datatypeIRI,
                                  boolean includeImportsClosure)

getEntitiesWithIRI

java.util.Set<OWLEntity> getEntitiesWithIRI(IRI iri)
Gets the entities in the signature of this ontology that have the specified IRI

Parameters:
iri - The IRI
Returns:
A set of entities that are in the signature of this ontology that have the specified IRI. The set will be empty if there are no entities in the signature of this ontology with the specified IRI.

getEntitiesWithIRI

java.util.Set<OWLEntity> getEntitiesWithIRI(IRI iri,
                                            boolean includeImportsClosure)
Gets the entities in the signature of this ontology, and possibly its imports closure, that have the specified IRI

Parameters:
iri - The IRI
includeImportsClosure - Specifies if the imports closure signature should be taken into account
Returns:
A set of entities that are in the signature of this ontology and possibly its imports closure that have the specified IRI. The set will be empty if there are no entities in the signature of this ontology and possibly its imports closure with the specified IRI.

getAxioms

java.util.Set<OWLClassAxiom> getAxioms(OWLClass cls)
Gets the axioms that form the definition/description of a class.

Parameters:
cls - The class whose describing axioms are to be retrieved.
Returns:
A set of class axioms that describe the class. This set includes
  • Subclass axioms where the subclass is equal to the specified class
  • Equivalent class axioms where the specified class is an operand in the equivalent class axiom
  • Disjoint class axioms where the specified class is an operand in the disjoint class axiom
  • Disjoint union axioms, where the specified class is the named class that is equivalent to the disjoint union
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getAxioms

java.util.Set<OWLObjectPropertyAxiom> getAxioms(OWLObjectPropertyExpression prop)
Gets the axioms that form the definition/description of an object property.

Parameters:
prop - The property whose defining axioms are to be retrieved.
Returns:
A set of object property axioms that includes
  • Sub-property axioms where the sub property is equal to the specified property
  • Equivalent property axioms where the axiom contains the specified property
  • Equivalent property axioms that contain the inverse of the specified property
  • Disjoint property axioms that contain the specified property
  • Domain axioms that specify a domain of the specified property
  • Range axioms that specify a range of the specified property
  • Any property characteristic axiom (i.e. Functional, Symmetric, Reflexive etc.) whose subject is the specified property
  • Inverse properties axioms that contain the specified property
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getAxioms

java.util.Set<OWLDataPropertyAxiom> getAxioms(OWLDataProperty prop)
Gets the axioms that form the definition/description of a data property.

Parameters:
prop - The property whose defining axioms are to be retrieved.
Returns:
A set of data property axioms that includes
  • Sub-property axioms where the sub property is equal to the specified property
  • Equivalent property axioms where the axiom contains the specified property
  • Disjoint property axioms that contain the specified property
  • Domain axioms that specify a domain of the specified property
  • Range axioms that specify a range of the specified property
  • Any property characteristic axiom (i.e. Functional, Symmetric, Reflexive etc.) whose subject is the specified property
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getAxioms

java.util.Set<OWLIndividualAxiom> getAxioms(OWLIndividual individual)
Gets the axioms that form the definition/description of an individual

Parameters:
individual - The individual whose defining axioms are to be retrieved.
Returns:
A set of individual axioms that includes
  • Individual type assertions that assert the type of the specified individual
  • Same individuals axioms that contain the specified individual
  • Different individuals axioms that contain the specified individual
  • Object property assertion axioms whose subject is the specified individual
  • Data property assertion axioms whose subject is the specified individual
  • Negative object property assertion axioms whose subject is the specified individual
  • Negative data property assertion axioms whose subject is the specified individual
The set that is returned is a copy - it will not be updated if the ontology changes.

getAxioms

java.util.Set<OWLAnnotationAxiom> getAxioms(OWLAnnotationProperty property)
Gets the axioms that form the definition/description of an annotation property.

Parameters:
property - The property whose definition axioms are to be retrieved
Returns:
A set of axioms that includes
  • Annotation subpropertyOf axioms where the specified property is the sub property
  • Annotation property domain axioms that specify a domain for the specified property
  • Annotation property range axioms that specify a range for the specified property

getAxioms

java.util.Set<OWLDatatypeDefinitionAxiom> getAxioms(OWLDatatype datatype)
Gets the datatype definition axioms for the specified datatype

Parameters:
datatype - The datatype
Returns:
The set of datatype definition axioms for the specified datatype

getSubAnnotationPropertyOfAxioms

java.util.Set<OWLSubAnnotationPropertyOfAxiom> getSubAnnotationPropertyOfAxioms(OWLAnnotationProperty subProperty)

getAnnotationPropertyDomainAxioms

java.util.Set<OWLAnnotationPropertyDomainAxiom> getAnnotationPropertyDomainAxioms(OWLAnnotationProperty property)

getAnnotationPropertyRangeAxioms

java.util.Set<OWLAnnotationPropertyRangeAxiom> getAnnotationPropertyRangeAxioms(OWLAnnotationProperty property)

getDeclarationAxioms

java.util.Set<OWLDeclarationAxiom> getDeclarationAxioms(OWLEntity subject)
Gets the declaration axioms for specified entity.

Parameters:
subject - The entity that is the subject of the set of returned axioms.
Returns:
The set of declaration axioms. Note that this set will be a copy and will not be updated if the ontology changes. It is therefore safe to iterate over this set while making changes to the ontology.

getAnnotationAssertionAxioms

java.util.Set<OWLAnnotationAssertionAxiom> getAnnotationAssertionAxioms(OWLAnnotationSubject entity)
Gets the axioms that annotate the specified entity.

Parameters:
entity - The entity whose annotations are to be retrieved.
Returns:
The set of entity annotation axioms. Note that this set will be a copy and will not be updated if the ontology changes. It is therefore safe to iterate over this set while making changes to the ontology.

getSubClassAxiomsForSubClass

java.util.Set<OWLSubClassOfAxiom> getSubClassAxiomsForSubClass(OWLClass cls)
Gets all of the subclass axioms where the left hand side (the subclass) is equal to the specified class.

Parameters:
cls - The class that is equal to the left hand side of the axiom (subclass).
Returns:
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getSubClassAxiomsForSuperClass

java.util.Set<OWLSubClassOfAxiom> getSubClassAxiomsForSuperClass(OWLClass cls)
Gets all of the subclass axioms where the right hand side (the superclass) is equal to the specified class.

Parameters:
cls - The class
Returns:
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getEquivalentClassesAxioms

java.util.Set<OWLEquivalentClassesAxiom> getEquivalentClassesAxioms(OWLClass cls)
Gets all of the equivalent axioms in this ontology that contain the specified class as an operand.

Parameters:
cls - The class
Returns:
A set of equivalent class axioms that contain the specified class as an operand. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getDisjointClassesAxioms

java.util.Set<OWLDisjointClassesAxiom> getDisjointClassesAxioms(OWLClass cls)
Gets the set of disjoint class axioms that contain the specified class as an operand.

Parameters:
cls - The class that should be contained in the set of disjoint class axioms that will be returned.
Returns:
The set of disjoint axioms that contain the specified class. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getDisjointUnionAxioms

java.util.Set<OWLDisjointUnionAxiom> getDisjointUnionAxioms(OWLClass owlClass)
Gets the set of disjoint union axioms that have the specified class as the named class that is equivalent to the disjoint union of operands. For example, if the ontology contained the axiom DisjointUnion(A, propP some C, D, E) this axiom would be returned for class A (but not for D or E).

Parameters:
owlClass - The class that indexes the axioms to be retrieved.
Returns:
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getHasKeyAxioms

java.util.Set<OWLHasKeyAxiom> getHasKeyAxioms(OWLClass cls)
Gets the has key axioms that have the specified class as their subject.

Parameters:
cls - The subject of the has key axioms
Returns:
The set of has key axioms that have cls as their subject. The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getObjectSubPropertyAxiomsForSubProperty

java.util.Set<OWLSubObjectPropertyOfAxiom> getObjectSubPropertyAxiomsForSubProperty(OWLObjectPropertyExpression property)
Gets the object property sub property axioms where the specified property is on the left hand side of the axiom.

Parameters:
property - The property which is on the left hand side of the axiom.
Returns:
The set that is returned is a copy - it will not be updated if the ontology changes. It is therefore safe to apply changes to this ontology while iterating over this set.

getObjectSubPropertyAxiomsForSuperProperty

java.util.Set<OWLSubObjectPropertyOfAxiom> getObjectSubPropertyAxiomsForSuperProperty(OWLObjectPropertyExpression property)

getObjectPropertyDomainAxioms

java.util.Set<OWLObjectPropertyDomainAxiom> getObjectPropertyDomainAxioms(OWLObjectPropertyExpression property)

getObjectPropertyRangeAxioms

java.util.Set<OWLObjectPropertyRangeAxiom> getObjectPropertyRangeAxioms(OWLObjectPropertyExpression property)

getInverseObjectPropertyAxioms

java.util.Set<OWLInverseObjectPropertiesAxiom> getInverseObjectPropertyAxioms(OWLObjectPropertyExpression property)

getEquivalentObjectPropertiesAxioms

java.util.Set<OWLEquivalentObjectPropertiesAxiom> getEquivalentObjectPropertiesAxioms(OWLObjectPropertyExpression property)

getDisjointObjectPropertiesAxioms

java.util.Set<OWLDisjointObjectPropertiesAxiom> getDisjointObjectPropertiesAxioms(OWLObjectPropertyExpression property)

getFunctionalObjectPropertyAxioms

java.util.Set<OWLFunctionalObjectPropertyAxiom> getFunctionalObjectPropertyAxioms(OWLObjectPropertyExpression property)

getInverseFunctionalObjectPropertyAxioms

java.util.Set<OWLInverseFunctionalObjectPropertyAxiom> getInverseFunctionalObjectPropertyAxioms(OWLObjectPropertyExpression property)

getSymmetricObjectPropertyAxioms

java.util.Set<OWLSymmetricObjectPropertyAxiom> getSymmetricObjectPropertyAxioms(OWLObjectPropertyExpression property)

getAsymmetricObjectPropertyAxioms

java.util.Set<OWLAsymmetricObjectPropertyAxiom> getAsymmetricObjectPropertyAxioms(OWLObjectPropertyExpression property)
Gets the axiom that states that this property is asymmetric. Note that this will return an antisymmetric property axiom. The name of this interfaces is due to legacy reasons.

Parameters:
property - The property
Returns:
The axiom that states that this property is asymmetric, or null if there is no axiom that states this.

getReflexiveObjectPropertyAxioms

java.util.Set<OWLReflexiveObjectPropertyAxiom> getReflexiveObjectPropertyAxioms(OWLObjectPropertyExpression property)

getIrreflexiveObjectPropertyAxioms

java.util.Set<OWLIrreflexiveObjectPropertyAxiom> getIrreflexiveObjectPropertyAxioms(OWLObjectPropertyExpression property)

getTransitiveObjectPropertyAxioms

java.util.Set<OWLTransitiveObjectPropertyAxiom> getTransitiveObjectPropertyAxioms(OWLObjectPropertyExpression property)

getDataSubPropertyAxiomsForSubProperty

java.util.Set<OWLSubDataPropertyOfAxiom> getDataSubPropertyAxiomsForSubProperty(OWLDataProperty lhsProperty)

getDataSubPropertyAxiomsForSuperProperty

java.util.Set<OWLSubDataPropertyOfAxiom> getDataSubPropertyAxiomsForSuperProperty(OWLDataPropertyExpression property)

getDataPropertyDomainAxioms

java.util.Set<OWLDataPropertyDomainAxiom> getDataPropertyDomainAxioms(OWLDataProperty property)

getDataPropertyRangeAxioms

java.util.Set<OWLDataPropertyRangeAxiom> getDataPropertyRangeAxioms(OWLDataProperty property)

getEquivalentDataPropertiesAxioms

java.util.Set<OWLEquivalentDataPropertiesAxiom> getEquivalentDataPropertiesAxioms(OWLDataProperty property)

getDisjointDataPropertiesAxioms

java.util.Set<OWLDisjointDataPropertiesAxiom> getDisjointDataPropertiesAxioms(OWLDataProperty property)

getFunctionalDataPropertyAxioms

java.util.Set<OWLFunctionalDataPropertyAxiom> getFunctionalDataPropertyAxioms(OWLDataPropertyExpression property)

getClassAssertionAxioms

java.util.Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLIndividual individual)

getClassAssertionAxioms

java.util.Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLClass type)

getDataPropertyAssertionAxioms

java.util.Set<OWLDataPropertyAssertionAxiom> getDataPropertyAssertionAxioms(OWLIndividual individual)

getObjectPropertyAssertionAxioms

java.util.Set<OWLObjectPropertyAssertionAxiom> getObjectPropertyAssertionAxioms(OWLIndividual individual)

getNegativeObjectPropertyAssertionAxioms

java.util.Set<OWLNegativeObjectPropertyAssertionAxiom> getNegativeObjectPropertyAssertionAxioms(OWLIndividual individual)

getNegativeDataPropertyAssertionAxioms

java.util.Set<OWLNegativeDataPropertyAssertionAxiom> getNegativeDataPropertyAssertionAxioms(OWLIndividual individual)

getSameIndividualAxioms

java.util.Set<OWLSameIndividualAxiom> getSameIndividualAxioms(OWLIndividual individual)

getDifferentIndividualAxioms

java.util.Set<OWLDifferentIndividualsAxiom> getDifferentIndividualAxioms(OWLIndividual individual)

getDatatypeDefinitions

java.util.Set<OWLDatatypeDefinitionAxiom> getDatatypeDefinitions(OWLDatatype datatype)