org.semanticweb.owl.model
Interface OWLOntology

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLNamedObject, OWLObject
All Known Subinterfaces:
OWLMutableOntology

public interface OWLOntology
extends OWLNamedObject

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group Date: 24-Oct-2006

An OWLOntology contains a set of axioms. Ontologies do not specifically contain entities such as classes, properties or individuals - these entities are merely referenced by the axioms that the ontology contains. They form the signature of the ontology. Unlike some APIs it is therefore not possible to directly add or remove entities to or from an ontology.

An ontology cannot be modified directly. Changes must be applied using an OWLOntologyManager.


Method Summary
 boolean containsAxiom(OWLAxiom axiom)
          Determines if this ontology contains the specified axiom.
 boolean containsClassReference(java.net.URI owlClassURI)
          Determines if the ontology contains a reference to a class that has a specific URI.
 boolean containsDataPropertyReference(java.net.URI propURI)
          Determines if the ontology contains a reference to a data property that has a specific URI.
 boolean containsDataTypeReference(java.net.URI datatypeURI)
           
 boolean containsEntityDeclaration(OWLEntity owlEntity)
          Determines if this ontology contains a declaration axiom for the specified entity.
 boolean containsEntityReference(OWLEntity owlEntity)
          Determines if the ontology contains a reference to the specified entity.
 boolean containsIndividualReference(java.net.URI individualURI)
          Determines if the ontology contains a reference to an individual that has a specific URI.
 boolean containsObjectPropertyReference(java.net.URI propURI)
          Determines if the ontology contains a reference to an object property that has a specific URI.
 java.util.Set<OWLAnnotationAxiom> getAnnotationAxioms()
          Gets all of the annotation axioms in this ontology.
 java.util.Set<OWLAxiomAnnotationAxiom> getAnnotations(OWLAxiom axiom)
          Gets the annotation axioms that annotate the specified axiom in this ontology.
 java.util.Set<OWLOntologyAnnotationAxiom> getAnnotations(OWLOntology subject)
          Gets the ontology annotations whose subject is the specified ontology.
 java.util.Set<java.net.URI> getAnnotationURIs()
          Gets the set of URIs that are used in annotations (e.g.
 OWLAntiSymmetricObjectPropertyAxiom getAntiSymmetricObjectPropertyAxiom(OWLObjectPropertyExpression property)
          Deprecated. use getAsymmetricObjectPropertyAxiom instead.
 OWLAntiSymmetricObjectPropertyAxiom getAsymmetricObjectPropertyAxiom(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
 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.
 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<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<OWLClassAxiom> getClassAxioms()
          Gets all of the class axioms in this ontology.
 java.util.Set<OWLDataPropertyAssertionAxiom> getDataPropertyAssertionAxioms(OWLIndividual individual)
           
 java.util.Set<OWLPropertyAxiom> getDataPropertyAxioms()
          Gets all of the data property axioms in this ontology.
 java.util.Set<OWLDataPropertyDomainAxiom> getDataPropertyDomainAxioms(OWLDataProperty property)
           
 java.util.Set<OWLDataPropertyRangeAxiom> getDataPropertyRangeAxiom(OWLDataProperty property)
           
 java.util.Set<OWLDataSubPropertyAxiom> getDataSubPropertyAxiomsForLHS(OWLDataProperty lhsProperty)
           
 java.util.Set<OWLDataSubPropertyAxiom> getDataSubPropertyAxiomsForRHS(OWLDataPropertyExpression property)
           
 java.util.Set<OWLDeclarationAxiom> getDeclarationAxioms()
          Gets all of the annotation axioms in this ontology.
 java.util.Set<OWLDeclarationAxiom> getDeclarationAxioms(OWLEntity subject)
          Gets the declaration axioms for specified entity.
 java.util.Set<OWLDifferentIndividualsAxiom> getDifferentIndividualAxioms(OWLIndividual individual)
           
 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> getDisjointDataPropertiesAxiom(OWLDataProperty property)
           
 java.util.Set<OWLDisjointObjectPropertiesAxiom> getDisjointObjectPropertiesAxiom(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<OWLEntityAnnotationAxiom> getEntityAnnotationAxioms(OWLEntity entity)
          Gets the axioms that annotate the specified entity.
 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> getEquivalentDataPropertiesAxiom(OWLDataProperty property)
           
 java.util.Set<OWLEquivalentObjectPropertiesAxiom> getEquivalentObjectPropertiesAxioms(OWLObjectPropertyExpression property)
           
 OWLFunctionalDataPropertyAxiom getFunctionalDataPropertyAxiom(OWLDataPropertyExpression property)
           
 OWLFunctionalObjectPropertyAxiom getFunctionalObjectPropertyAxiom(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLClassAxiom> getGeneralClassAxioms()
          Gets the set of general axioms in this ontology.
 java.util.Set<OWLOntology> getImports(OWLOntologyManager ontologyManager)
          Gets the OWLOntology instances that this ontology imports.
 java.util.Set<OWLImportsDeclaration> getImportsDeclarations()
          Gets the set of imports annotations for this ontology.
 java.util.Set<OWLIndividualAxiom> getIndividualAxioms()
          Gets all of the individual axioms in this ontology.
 OWLInverseFunctionalObjectPropertyAxiom getInverseFunctionalObjectPropertyAxiom(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLInverseObjectPropertiesAxiom> getInverseObjectPropertyAxioms(OWLObjectPropertyExpression property)
           
 OWLIrreflexiveObjectPropertyAxiom getIrreflexiveObjectPropertyAxiom(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<OWLPropertyAxiom> getObjectPropertyAxioms()
          Gets all of the object property axioms in this ontology.
 java.util.Set<OWLObjectPropertyDomainAxiom> getObjectPropertyDomainAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLObjectPropertyRangeAxiom> getObjectPropertyRangeAxioms(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLObjectSubPropertyAxiom> getObjectSubPropertyAxiomsForLHS(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<OWLObjectSubPropertyAxiom> getObjectSubPropertyAxiomsForRHS(OWLObjectPropertyExpression property)
           
 java.util.Set<OWLOntologyAnnotationAxiom> getOntologyAnnotationAxioms()
          Gets all of the ontology annotation axioms which have been asserted in this ontology.
 java.util.Set<OWLObjectPropertyChainSubPropertyAxiom> getPropertyChainSubPropertyAxioms()
          Gets the property chain sub property axioms in the ontology.
 java.util.Set<OWLClass> getReferencedClasses()
          Gets the classes that are referenced by axioms (including annotation axioms) in this ontology.
 java.util.Set<OWLDataProperty> getReferencedDataProperties()
          Gets the data properties that are referenced by axioms (including annotation axioms) in this ontology.
 java.util.Set<OWLEntity> getReferencedEntities()
          Gets the entities that are referenced by axioms in this ontology.
 java.util.Set<OWLIndividual> getReferencedIndividuals()
          Gets the individuals that are referenced by axioms (including annotation axioms) in 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<OWLAxiom> getReferencingAxioms(OWLEntity owlEntity)
          Gets the axioms where the specified entity appears anywhere in the axiom.
 OWLReflexiveObjectPropertyAxiom getReflexiveObjectPropertyAxiom(OWLObjectPropertyExpression property)
           
 java.util.Set<SWRLRule> getRules()
          Gets the rules in this ontology.
 java.util.Set<OWLSameIndividualsAxiom> getSameIndividualAxioms(OWLIndividual individual)
           
 java.util.Set<OWLSubClassAxiom> getSubClassAxiomsForLHS(OWLClass cls)
          Gets all of the subclass axioms where the left hand side (the subclass) is equal to the specified class.
 java.util.Set<OWLSubClassAxiom> getSubClassAxiomsForRHS(OWLClass cls)
          Gets all of the subclass axioms where the right hand side (the superclass) is equal to the specified class.
 OWLSymmetricObjectPropertyAxiom getSymmetricObjectPropertyAxiom(OWLObjectPropertyExpression property)
           
 OWLTransitiveObjectPropertyAxiom getTransitiveObjectPropertyAxiom(OWLObjectPropertyExpression property)
           
 boolean isEmpty()
          Determines if this ontology is empty - an ontology is empty if it does not contain any axioms.
 boolean isPunned(java.net.URI uri)
          Determines if the specified URI refers to more than one type of entity (i.e.
 
Methods inherited from interface org.semanticweb.owl.model.OWLNamedObject
accept, getURI
 
Methods inherited from interface org.semanticweb.owl.model.OWLObject
accept, accept, getSignature
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

isEmpty

boolean isEmpty()
Determines if this ontology is empty - an ontology is empty if it does not contain any axioms.

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, declaration axioms or imports declarations.

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.

getRules

java.util.Set<SWRLRule> getRules()
Gets the rules in this ontology.

Returns:
The set of rules in this ontology. Note that the set that is returned will be a copy and will not be updated if the ontology changes.

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.

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

getClassAxioms

java.util.Set<OWLClassAxiom> getClassAxioms()
Gets all of the class axioms in this ontology.

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.

getObjectPropertyAxioms

java.util.Set<OWLPropertyAxiom> getObjectPropertyAxioms()
Gets all of the object property axioms in this ontology.

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.

getDataPropertyAxioms

java.util.Set<OWLPropertyAxiom> getDataPropertyAxioms()
Gets all of the data property axioms in this ontology.

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.

getIndividualAxioms

java.util.Set<OWLIndividualAxiom> getIndividualAxioms()
Gets all of the individual axioms in this ontology.

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.

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.

getPropertyChainSubPropertyAxioms

java.util.Set<OWLObjectPropertyChainSubPropertyAxiom> getPropertyChainSubPropertyAxioms()
Gets the property chain sub property axioms in the ontology.

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 (including annotation 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.

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.

getReferencedDataProperties

java.util.Set<OWLDataProperty> getReferencedDataProperties()
Gets the data properties that are referenced by axioms (including annotation 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.

getReferencedIndividuals

java.util.Set<OWLIndividual> getReferencedIndividuals()
Gets the individuals that are referenced by axioms (including annotation 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.

getAnnotationURIs

java.util.Set<java.net.URI> getAnnotationURIs()
Gets the set of URIs that are used in annotations (e.g. rdfs:label)

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)
Gets the axioms where the specified entity appears anywhere in the axiom. The set that is returned, contains all axioms that directly reference the specified entity, including annotation axioms.

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.

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.

containsEntityDeclaration

boolean containsEntityDeclaration(OWLEntity owlEntity)
Determines if this ontology contains a declaration axiom for the specified entity.

Parameters:
owlEntity - The entity
Returns:
true if the ontology contains a declaration for 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.

containsClassReference

boolean containsClassReference(java.net.URI owlClassURI)
Determines if the ontology contains a reference to a class that has a specific URI.

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

containsObjectPropertyReference

boolean containsObjectPropertyReference(java.net.URI propURI)
Determines if the ontology contains a reference to an object property that has a specific URI.

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

containsDataPropertyReference

boolean containsDataPropertyReference(java.net.URI propURI)
Determines if the ontology contains a reference to a data property that has a specific URI.

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

containsIndividualReference

boolean containsIndividualReference(java.net.URI individualURI)
Determines if the ontology contains a reference to an individual that has a specific URI.

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

containsDataTypeReference

boolean containsDataTypeReference(java.net.URI datatypeURI)

isPunned

boolean isPunned(java.net.URI uri)
Determines if the specified URI refers to more than one type of entity (i.e. class, object property, data property, individual or datatype)

Parameters:
uri - The URI to test.
Returns:
true if the URI refers to more than one entity, for example because the ontology references a class with the URI and also an individual with the same URI.

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.

getAnnotationAxioms

java.util.Set<OWLAnnotationAxiom> getAnnotationAxioms()
Gets all of the annotation axioms in 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.

getDeclarationAxioms

java.util.Set<OWLDeclarationAxiom> getDeclarationAxioms()
Gets all of the annotation axioms in 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.

getImportsDeclarations

java.util.Set<OWLImportsDeclaration> getImportsDeclarations()
Gets the set of imports annotations for 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.

getImports

java.util.Set<OWLOntology> getImports(OWLOntologyManager ontologyManager)
                                      throws UnknownOWLOntologyException
Gets the OWLOntology instances that this ontology imports.

Parameters:
ontologyManager - The OWLOntologyManager that will map the imports annotations to actual OWLOntology instances.
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.
Throws:
UnknownOWLOntologyException - if this ontology isn't managed by the specified manager.

containsAxiom

boolean containsAxiom(OWLAxiom axiom)
Determines if this ontology contains the specified axiom. This method does not take into consideration annotations. For example, if the ontology contained SubClassOf("Added by M Horridge" A B) then then this method would return true for SubClassOf(A B)

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.

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.

getAnnotations

java.util.Set<OWLAxiomAnnotationAxiom> getAnnotations(OWLAxiom axiom)
Gets the annotation axioms that annotate the specified axiom in this ontology.

Parameters:
axiom - The axiom that the returned set of axiom annotation axioms annotate.
Returns:
The set of 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.

getEntityAnnotationAxioms

java.util.Set<OWLEntityAnnotationAxiom> getEntityAnnotationAxioms(OWLEntity 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.

getAnnotations

java.util.Set<OWLOntologyAnnotationAxiom> getAnnotations(OWLOntology subject)
Gets the ontology annotations whose subject is the specified ontology.

Parameters:
subject - The ontology that is the subject of the annotations.
Returns:
The set of annotation axioms which have been asserted in this ontology, which have the specified ontology as their subject. 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.

getOntologyAnnotationAxioms

java.util.Set<OWLOntologyAnnotationAxiom> getOntologyAnnotationAxioms()
Gets all of the ontology annotation axioms which have been asserted in this ontology.

Returns:
The set of ontology 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.

getSubClassAxiomsForLHS

java.util.Set<OWLSubClassAxiom> getSubClassAxiomsForLHS(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.

getSubClassAxiomsForRHS

java.util.Set<OWLSubClassAxiom> getSubClassAxiomsForRHS(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.

getObjectSubPropertyAxiomsForLHS

java.util.Set<OWLObjectSubPropertyAxiom> getObjectSubPropertyAxiomsForLHS(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.

getObjectSubPropertyAxiomsForRHS

java.util.Set<OWLObjectSubPropertyAxiom> getObjectSubPropertyAxiomsForRHS(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)

getDisjointObjectPropertiesAxiom

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

getFunctionalObjectPropertyAxiom

OWLFunctionalObjectPropertyAxiom getFunctionalObjectPropertyAxiom(OWLObjectPropertyExpression property)

getInverseFunctionalObjectPropertyAxiom

OWLInverseFunctionalObjectPropertyAxiom getInverseFunctionalObjectPropertyAxiom(OWLObjectPropertyExpression property)

getSymmetricObjectPropertyAxiom

OWLSymmetricObjectPropertyAxiom getSymmetricObjectPropertyAxiom(OWLObjectPropertyExpression property)

getAntiSymmetricObjectPropertyAxiom

OWLAntiSymmetricObjectPropertyAxiom getAntiSymmetricObjectPropertyAxiom(OWLObjectPropertyExpression property)
Deprecated. use getAsymmetricObjectPropertyAxiom instead.


getAsymmetricObjectPropertyAxiom

OWLAntiSymmetricObjectPropertyAxiom getAsymmetricObjectPropertyAxiom(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.

getReflexiveObjectPropertyAxiom

OWLReflexiveObjectPropertyAxiom getReflexiveObjectPropertyAxiom(OWLObjectPropertyExpression property)

getIrreflexiveObjectPropertyAxiom

OWLIrreflexiveObjectPropertyAxiom getIrreflexiveObjectPropertyAxiom(OWLObjectPropertyExpression property)

getTransitiveObjectPropertyAxiom

OWLTransitiveObjectPropertyAxiom getTransitiveObjectPropertyAxiom(OWLObjectPropertyExpression property)

getDataSubPropertyAxiomsForLHS

java.util.Set<OWLDataSubPropertyAxiom> getDataSubPropertyAxiomsForLHS(OWLDataProperty lhsProperty)

getDataSubPropertyAxiomsForRHS

java.util.Set<OWLDataSubPropertyAxiom> getDataSubPropertyAxiomsForRHS(OWLDataPropertyExpression property)

getDataPropertyDomainAxioms

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

getDataPropertyRangeAxiom

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

getEquivalentDataPropertiesAxiom

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

getDisjointDataPropertiesAxiom

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

getFunctionalDataPropertyAxiom

OWLFunctionalDataPropertyAxiom getFunctionalDataPropertyAxiom(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<OWLSameIndividualsAxiom> getSameIndividualAxioms(OWLIndividual individual)

getDifferentIndividualAxioms

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