public class OWLImmutableOntologyImpl extends OWLAxiomIndexImpl implements OWLOntology, Serializable
Constructor and Description |
---|
OWLImmutableOntologyImpl(OWLOntologyManager manager,
OWLOntologyID ontologyID) |
Modifier and Type | Method and Description |
---|---|
void |
accept(OWLNamedObjectVisitor visitor)
accept for named object visitor
|
<O> O |
accept(OWLNamedObjectVisitorEx<O> visitor)
Accepts a visitor
|
void |
accept(OWLObjectVisitor visitor)
Accepts a visitor
|
<O> O |
accept(OWLObjectVisitorEx<O> visitor)
Accepts a visitor
|
boolean |
contains(OWLAxiomSearchFilter filter,
Object key,
Imports includeImportsClosure)
Generic containment check type for further refining search by axiom type.
|
boolean |
containsAnnotationPropertyInSignature(IRI owlAnnotationPropertyIRI)
Determines if the signature contains an OWLAnnotationProperty that has the specified IRI.
|
boolean |
containsAnnotationPropertyInSignature(IRI owlAnnotationPropertyIRI,
boolean includeImportsClosure)
Determines if the signature contains an OWLAnnotationProperty that has
the specified IRI.
|
boolean |
containsAnnotationPropertyInSignature(IRI owlAnnotationPropertyIRI,
Imports includeImportsClosure)
Determines if the signature contains an OWLAnnotationProperty that has the specified IRI.
|
boolean |
containsAxiom(OWLAxiom axiom)
Determines whether or not this object contains a particular
OWLAxiom . |
boolean |
containsAxiom(OWLAxiom axiom,
boolean includeImportsClosure)
Determines if this ontology contains the specified axiom, optionally including the imports
closure.
|
boolean |
containsAxiom(OWLAxiom axiom,
Imports includeImportsClosure,
AxiomAnnotations ignoreAnnotations)
Determines if this ontology contains the specified axiom, optionally including the imports
closure.
|
boolean |
containsAxiomIgnoreAnnotations(OWLAxiom axiom)
Determines if this ontology contains the specified axiom.
|
boolean |
containsAxiomIgnoreAnnotations(OWLAxiom axiom,
boolean importsIncluded)
Determines if this ontology contains the specified axiom, optionally including the imports
closure.
|
boolean |
containsClassInSignature(IRI owlClassIRI)
Determines if the signature contains an OWLClass that has the specified IRI.
|
boolean |
containsClassInSignature(IRI owlClassIRI,
boolean includeImportsClosure)
Determines if the signature contains an OWLClass that has the specified
IRI.
|
boolean |
containsClassInSignature(IRI owlClassIRI,
Imports includeImportsClosure)
Determines if the signature contains an OWLClass that has the specified IRI.
|
boolean |
containsDataPropertyInSignature(IRI owlDataPropertyIRI)
Determines if the signature contains an OWLDataProperty that has the specified IRI.
|
boolean |
containsDataPropertyInSignature(IRI owlDataPropertyIRI,
boolean includeImportsClosure)
Determines if the signature contains an OWLDataProperty that has the
specified IRI.
|
boolean |
containsDataPropertyInSignature(IRI owlDataPropertyIRI,
Imports includeImportsClosure)
Determines if the signature contains an OWLDataProperty that has the specified IRI.
|
boolean |
containsDatatypeInSignature(IRI owlDatatypeIRI)
Determines if the signature contains an OWLDatatype that has the specified IRI.
|
boolean |
containsDatatypeInSignature(IRI owlDatatypeIRI,
boolean includeImportsClosure)
Determines if the signature contains an OWLDatatype that has the
specified IRI.
|
boolean |
containsDatatypeInSignature(IRI owlDatatypeIRI,
Imports includeImportsClosure)
Determines if the signature contains an OWLDatatype that has the specified IRI.
|
boolean |
containsEntitiesOfTypeInSignature(EntityType<?> type)
Determine whether the instance has entities of the specified type in its signature - e.g.,
whether an ontology has classes, object propertyies, or named individuals in its signature.
|
boolean |
containsEntityInSignature(IRI entityIRI)
Determines if the signature contains an entity with the specified IRI.
|
boolean |
containsEntityInSignature(IRI entityIRI,
boolean includeImportsClosure)
Determines if the signature contains an entity with the specified IRI.
|
boolean |
containsEntityInSignature(IRI entityIRI,
Imports includeImportsClosure)
Determines if the signature contains an entity with the specified IRI.
|
boolean |
containsEntityInSignature(OWLEntity owlEntity)
Determines if the signature of this object contains the specified entity.
|
boolean |
containsEntityInSignature(OWLEntity owlEntity,
boolean includeImportsClosure)
Determines if the signature contains the specified entity.
|
boolean |
containsEntityInSignature(OWLEntity owlEntity,
Imports includeImportsClosure)
Determines if the signature contains the specified entity.
|
boolean |
containsIndividualInSignature(IRI owlIndividualIRI)
Determines if the signature contains an OWLNamedIndividual that has the specified IRI.
|
boolean |
containsIndividualInSignature(IRI owlIndividualIRI,
boolean includeImportsClosure)
Determines if the signature contains an OWLNamedIndividual that has the
specified IRI.
|
boolean |
containsIndividualInSignature(IRI owlIndividualIRI,
Imports includeImportsClosure)
Determines if the signature contains an OWLNamedIndividual that has the specified IRI.
|
boolean |
containsObjectPropertyInSignature(IRI owlObjectPropertyIRI)
Determines if the signature contains an OWLObjectProperty that has the specified IRI.
|
boolean |
containsObjectPropertyInSignature(IRI owlObjectPropertyIRI,
boolean includeImportsClosure)
Determines if the signature contains an OWLObjectProperty that has the
specified IRI.
|
boolean |
containsObjectPropertyInSignature(IRI owlObjectPropertyIRI,
Imports includeImportsClosure)
Determines if the signature contains an OWLObjectProperty that has the specified IRI.
|
boolean |
containsReference(OWLEntity entity) |
boolean |
containsReference(OWLEntity entity,
boolean includeImportsClosure) |
boolean |
containsReference(OWLEntity entity,
Imports includeImportsClosure) |
boolean |
equals(Object obj) |
<T extends OWLAxiom> |
filterAxioms(OWLAxiomSearchFilter filter,
Object key,
Imports includeImportsClosure)
Generic filter type for further refining search by axiom type.
|
Set<OWLAxiom> |
getABoxAxioms(Imports includeImportsClosure)
Gets the axioms that form the ABox for this ontology, i.e., the ones whose type is in the
AxiomType::ABoxAxiomTypes.
|
Set<OWLAnnotationProperty> |
getAnnotationPropertiesInSignature()
A convenience method that obtains the annotation properties that are in
the signature of this object
|
Set<OWLAnnotationProperty> |
getAnnotationPropertiesInSignature(boolean includeImportsClosure)
Gets the annotation properties in the signature and optionally the
imports closure.
|
Set<OWLAnnotationProperty> |
getAnnotationPropertiesInSignature(Imports includeImportsClosure)
Gets the annotation properties in the signature and optionally the imports closure.
|
Set<OWLAnnotation> |
getAnnotations()
Gets the annotations on this ontology.
|
Set<OWLAnonymousIndividual> |
getAnonymousIndividuals()
Gets the anonymous individuals occurring in this object.
|
int |
getAxiomCount() |
<T extends OWLAxiom> |
getAxiomCount(AxiomType<T> axiomType)
Gets the axiom count of a specific type of axiom.
|
<T extends OWLAxiom> |
getAxiomCount(AxiomType<T> axiomType,
boolean includeImportsClosure)
Gets the axiom count of a specific type of axiom, optionally including the imports closure.
|
<T extends OWLAxiom> |
getAxiomCount(AxiomType<T> axiomType,
Imports includeImportsClosure)
Gets the axiom count of a specific type of axiom, optionally including the imports closure.
|
int |
getAxiomCount(boolean includeImportsClosure) |
int |
getAxiomCount(Imports includeImportsClosure) |
Set<OWLAxiom> |
getAxioms()
Gets the
OWLAxiom s contained in this object. |
<T extends OWLAxiom> |
getAxioms(AxiomType<T> axiomType)
Gets the axioms which are of the specified type.
|
<T extends OWLAxiom> |
getAxioms(AxiomType<T> axiomType,
boolean includeImportsClosure)
Gets all axioms of the specified type.
|
<T extends OWLAxiom> |
getAxioms(AxiomType<T> axiomType,
Imports includeImportsClosure)
Gets all axioms of the specified type.
|
Set<OWLAxiom> |
getAxioms(boolean b) |
<A extends OWLAxiom> |
getAxioms(Class<A> type,
Class<? extends OWLObject> explicitClass,
OWLObject entity,
Imports includeImports,
Navigation forSubPosition)
Generic search method: resutns all axioms which refer entity, are
instances of type, optionally including the imports closure in the
results.
|
<A extends OWLAxiom> |
getAxioms(Class<A> type,
OWLObject entity,
Imports includeImports,
Navigation forSubPosition)
Generic search method: returns all axioms which refer entity, are
instances of type, optionally including the imports closure in the
results.
|
Set<OWLAxiom> |
getAxioms(Imports includeImportsClosure) |
Set<OWLAnnotationAxiom> |
getAxioms(OWLAnnotationProperty property)
Gets the axioms that form the definition/description of an annotation property.
|
Set<OWLAnnotationAxiom> |
getAxioms(OWLAnnotationProperty property,
boolean includeImportsClosure)
Gets the axioms that form the definition/description of an annotation property.
|
Set<OWLAnnotationAxiom> |
getAxioms(OWLAnnotationProperty property,
Imports includeImportsClosure)
Gets the axioms that form the definition/description of an annotation property.
|
Set<OWLClassAxiom> |
getAxioms(OWLClass cls)
Gets the axioms that form the definition/description of a class.
|
Set<OWLClassAxiom> |
getAxioms(OWLClass cls,
boolean includeImportsClosure)
Gets the axioms that form the definition/description of a class.
|
Set<OWLClassAxiom> |
getAxioms(OWLClass cls,
Imports includeImportsClosure)
Gets the axioms that form the definition/description of a class.
|
Set<OWLDataPropertyAxiom> |
getAxioms(OWLDataProperty property)
Gets the axioms that form the definition/description of a data property.
|
Set<OWLDataPropertyAxiom> |
getAxioms(OWLDataProperty property,
boolean includeImportsClosure)
Gets the axioms that form the definition/description of a data property.
|
Set<OWLDataPropertyAxiom> |
getAxioms(OWLDataProperty property,
Imports includeImportsClosure)
Gets the axioms that form the definition/description of a data property.
|
Set<OWLDatatypeDefinitionAxiom> |
getAxioms(OWLDatatype datatype)
Gets the datatype definition axioms for the specified datatype.
|
Set<OWLDatatypeDefinitionAxiom> |
getAxioms(OWLDatatype datatype,
boolean includeImportsClosure)
Gets the datatype definition axioms for the specified datatype.
|
Set<OWLDatatypeDefinitionAxiom> |
getAxioms(OWLDatatype datatype,
Imports includeImportsClosure)
Gets the datatype definition axioms for the specified datatype.
|
Set<OWLIndividualAxiom> |
getAxioms(OWLIndividual individual)
Gets the axioms that form the definition/description of an individual.
|
Set<OWLIndividualAxiom> |
getAxioms(OWLIndividual individual,
boolean includeImportsClosure)
Gets the axioms that form the definition/description of an individual.
|
Set<OWLIndividualAxiom> |
getAxioms(OWLIndividual individual,
Imports includeImportsClosure)
Gets the axioms that form the definition/description of an individual.
|
Set<OWLObjectPropertyAxiom> |
getAxioms(OWLObjectPropertyExpression property)
Gets the axioms that form the definition/description of an object property.
|
Set<OWLObjectPropertyAxiom> |
getAxioms(OWLObjectPropertyExpression property,
boolean includeImportsClosure)
Gets the axioms that form the definition/description of an object property.
|
Set<OWLObjectPropertyAxiom> |
getAxioms(OWLObjectPropertyExpression property,
Imports includeImportsClosure)
Gets the axioms that form the definition/description of an object property.
|
Set<OWLAxiom> |
getAxiomsIgnoreAnnotations(OWLAxiom axiom)
Gets the set of axioms contained in this collection that have the same "logical structure" as
the specified axiom; i.e., all axioms that equal the specified axiom, when ignoring
annotations.
|
Set<OWLAxiom> |
getAxiomsIgnoreAnnotations(OWLAxiom axiom,
boolean includeImportsClosure)
Gets the set of axioms contained in this collection that have the same "logical structure" as
the specified axiom; i.e., all axioms that equal the specified axiom, when ignoring
annotations.
|
Set<OWLAxiom> |
getAxiomsIgnoreAnnotations(OWLAxiom axiom,
Imports includeImportsClosure)
Gets the set of axioms contained in this collection that have the same "logical structure" as
the specified axiom; i.e., all axioms that equal the specified axiom, when ignoring
annotations.
|
Set<OWLClassAssertionAxiom> |
getClassAssertionAxioms(OWLClassExpression ce)
Gets the
OWLClassAssertionAxiom s contained in this ontology that
make the specified class expression, ce , a type for some
individual. |
Set<OWLClass> |
getClassesInSignature()
Gets the classes in the signature of this object.
|
Set<OWLClass> |
getClassesInSignature(boolean includeImportsClosure)
Gets the classes in the signature and optionally the imports closure.
|
Set<OWLClass> |
getClassesInSignature(Imports includeImportsClosure)
Gets the classes in the signature and optionally the imports closure.
|
Set<OWLDataProperty> |
getDataPropertiesInSignature()
A convenience method that obtains the data properties that are in the
signature of this object
|
Set<OWLDataProperty> |
getDataPropertiesInSignature(boolean includeImportsClosure)
Gets the data properties in the signature and optionally the imports
closure.
|
Set<OWLDataProperty> |
getDataPropertiesInSignature(Imports includeImportsClosure)
Gets the data properties in the signature and optionally the imports closure.
|
Set<OWLDatatype> |
getDatatypesInSignature()
A convenience method that obtains the datatypes that are in the signature
of this object
|
Set<OWLDatatype> |
getDatatypesInSignature(boolean includeImportsClosure)
Gets the datatypes in the signature and optionally the imports closure.
|
Set<OWLDatatype> |
getDatatypesInSignature(Imports includeImportsClosure)
Gets the datatypes in the signature and optionally the imports closure.
|
Set<OWLOntology> |
getDirectImports()
Gets the set of loaded ontologies that this ontology is related to via the
directlyImports relation.
|
Set<IRI> |
getDirectImportsDocuments()
Gets the set of document IRIs that are directly imported by this ontology.
|
Set<OWLEntity> |
getEntitiesInSignature(IRI entityIRI) |
Set<OWLEntity> |
getEntitiesInSignature(IRI iri,
boolean includeImportsClosure)
Gets the entities in the signature that have the specified IRI.
|
Set<OWLEntity> |
getEntitiesInSignature(IRI iri,
Imports includeImportsClosure)
Gets the entities in the signature that have the specified IRI.
|
Set<OWLClassAxiom> |
getGeneralClassAxioms()
Gets the set of general axioms in this ontology.
|
Set<OWLOntology> |
getImports()
Gets the set of loaded ontologies that this ontology is related to via the
transitive closure 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. |
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.
|
Set<OWLImportsDeclaration> |
getImportsDeclarations()
Gets the set of imports declarations for this ontology.
|
Set<OWLNamedIndividual> |
getIndividualsInSignature()
A convenience method that obtains the individuals that are in the
signature of this object
|
Set<OWLNamedIndividual> |
getIndividualsInSignature(boolean includeImportsClosure)
Gets the named individuals in the signature and optionally the imports
closure.
|
Set<OWLNamedIndividual> |
getIndividualsInSignature(Imports includeImportsClosure)
Gets the named individuals in the signature and optionally the imports closure.
|
int |
getLogicalAxiomCount()
Gets the number of logical axioms in this collection.
|
int |
getLogicalAxiomCount(boolean includeImportsClosure)
Gets the number of logical axioms in this collection, optionally including the imports
closure.
|
int |
getLogicalAxiomCount(Imports includeImportsClosure)
Gets the number of logical axioms in this collection, optionally including the imports
closure.
|
Set<OWLLogicalAxiom> |
getLogicalAxioms()
Gets the set of
OWLLogicalAxiom s contained within this object. |
Set<OWLLogicalAxiom> |
getLogicalAxioms(boolean includeImportsClosure)
Gets all axioms semantically relevant, i.e., all axioms that are not annotation axioms or
declaration axioms.
|
Set<OWLLogicalAxiom> |
getLogicalAxioms(Imports includeImportsClosure)
Gets all axioms semantically relevant, i.e., all axioms that are not annotation axioms or
declaration axioms.
|
Set<OWLObjectProperty> |
getObjectPropertiesInSignature()
A convenience method that obtains the object properties that are in the
signature of this object
|
Set<OWLObjectProperty> |
getObjectPropertiesInSignature(boolean includeImportsClosure)
Gets the object properties in the signature and optionally the imports
closure.
|
Set<OWLObjectProperty> |
getObjectPropertiesInSignature(Imports includeImportsClosure)
Gets the object properties in the signature and optionally the imports closure.
|
OWLOntologyID |
getOntologyID()
Gets the identity of this ontology (i.e.
|
OWLOntologyManager |
getOWLOntologyManager()
Gets the manager that manages this ontology.
|
Set<IRI> |
getPunnedIRIs(Imports includeImportsClosure)
Calculates the set of IRIs that are used for more than one entity type.
|
Set<OWLAxiom> |
getRBoxAxioms(Imports includeImportsClosure)
Gets the axioms that form the RBox for this ontology, i.e., the ones whose type is in the
AxiomType::RBoxAxiomTypes.
|
Set<OWLAnonymousIndividual> |
getReferencedAnonymousIndividuals(boolean includeImportsClosure)
Gets the referenced anonymous individuals in the signature and optionally
the imports closure.
|
Set<OWLAnonymousIndividual> |
getReferencedAnonymousIndividuals(Imports includeImportsClosure)
Gets the referenced anonymous individuals in the signature and optionally the imports
closure.
|
Set<OWLAxiom> |
getReferencingAxioms(OWLPrimitive owlEntity)
Gets the axioms where the specified
OWLPrimitive appears in the signature of the
axiom.Note that currently signatures contain OWLEntity only. |
Set<OWLAxiom> |
getReferencingAxioms(OWLPrimitive owlEntity,
boolean includeImports)
Gets the axioms where the specified
OWLPrimitive appears in the signature of the
axiom.Note that currently signatures contain OWLEntity only. |
Set<OWLAxiom> |
getReferencingAxioms(OWLPrimitive owlEntity,
Imports includeImportsClosure)
Gets the axioms where the specified
OWLPrimitive appears in the signature of the
axiom.Note that currently signatures contain OWLEntity only. |
Set<OWLEntity> |
getSignature()
Gets the signature of this object.
|
Set<OWLEntity> |
getSignature(Imports includeImportsClosure)
Gets the entities that are in the signature of this ontology.
|
Set<OWLAxiom> |
getTBoxAxioms(Imports includeImportsClosure)
Gets the axioms that form the TBox for this ontology, i.e., the ones whose type is in the
AxiomType::TBoxAxiomTypes.
|
int |
hashCode() |
boolean |
isAnonymous() |
boolean |
isDeclared(OWLEntity owlEntity)
Determines if this ontology declares an entity i.e.
|
boolean |
isDeclared(OWLEntity owlEntity,
Imports 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.
|
void |
saveOntology()
Saves the ontology.
|
void |
saveOntology(IRI documentIRI)
Saves the ontology, using the specified document IRI to determine where/how the ontology
should be saved.
|
void |
saveOntology(OutputStream outputStream)
Saves the ontology, to the specified output stream
|
void |
saveOntology(OWLDocumentFormat ontologyFormat)
Saves the ontology in the specified ontology format to its document URI.
|
void |
saveOntology(OWLDocumentFormat ontologyFormat,
IRI documentIRI)
Saves the ontology to the specified document IRI in the specified ontology format.
|
void |
saveOntology(OWLDocumentFormat ontologyFormat,
OutputStream outputStream)
Saves the ontology to the specified output stream in the specified ontology format.
|
void |
saveOntology(OWLDocumentFormat ontologyFormat,
OWLOntologyDocumentTarget documentTarget)
Saves the ontology to the specified output target in the specified ontology format.
|
void |
saveOntology(OWLOntologyDocumentTarget documentTarget)
Saves the ontology to the specified
OWLOntologyDocumentTarget . |
void |
setOWLOntologyManager(OWLOntologyManager manager)
Sets the manager for this ontology.
|
String |
toString() |
getAnnotationAssertionAxioms, getAnnotationPropertyDomainAxioms, getAnnotationPropertyRangeAxioms, getAsymmetricObjectPropertyAxioms, getClassAssertionAxioms, getDataPropertyAssertionAxioms, getDataPropertyDomainAxioms, getDataPropertyRangeAxioms, getDataSubPropertyAxiomsForSubProperty, getDataSubPropertyAxiomsForSuperProperty, getDatatypeDefinitions, getDeclarationAxioms, getDifferentIndividualAxioms, getDisjointClassesAxioms, getDisjointDataPropertiesAxioms, getDisjointObjectPropertiesAxioms, getDisjointUnionAxioms, getEquivalentClassesAxioms, getEquivalentDataPropertiesAxioms, getEquivalentObjectPropertiesAxioms, getFunctionalDataPropertyAxioms, getFunctionalObjectPropertyAxioms, getHasKeyAxioms, getInverseFunctionalObjectPropertyAxioms, getInverseObjectPropertyAxioms, getIrreflexiveObjectPropertyAxioms, getNegativeDataPropertyAssertionAxioms, getNegativeObjectPropertyAssertionAxioms, getObjectPropertyAssertionAxioms, getObjectPropertyDomainAxioms, getObjectPropertyRangeAxioms, getObjectSubPropertyAxiomsForSubProperty, getObjectSubPropertyAxiomsForSuperProperty, getReflexiveObjectPropertyAxioms, getSameIndividualAxioms, getSubAnnotationPropertyOfAxioms, getSubClassAxiomsForSubClass, getSubClassAxiomsForSuperClass, getSymmetricObjectPropertyAxioms, getTransitiveObjectPropertyAxioms, trimToSize
compareTo, getNestedClassExpressions, isBottomEntity, isTopEntity
containsEntitiesOfTypeInSignature
getNestedClassExpressions, isBottomEntity, isIndividual, isIRI, isTopEntity
compareTo
isNamed
getAnnotationAssertionAxioms, getAnnotationPropertyDomainAxioms, getAnnotationPropertyRangeAxioms, getAsymmetricObjectPropertyAxioms, getClassAssertionAxioms, getDataPropertyAssertionAxioms, getDataPropertyDomainAxioms, getDataPropertyRangeAxioms, getDataSubPropertyAxiomsForSubProperty, getDataSubPropertyAxiomsForSuperProperty, getDatatypeDefinitions, getDeclarationAxioms, getDifferentIndividualAxioms, getDisjointClassesAxioms, getDisjointDataPropertiesAxioms, getDisjointObjectPropertiesAxioms, getDisjointUnionAxioms, getEquivalentClassesAxioms, getEquivalentDataPropertiesAxioms, getEquivalentObjectPropertiesAxioms, getFunctionalDataPropertyAxioms, getFunctionalObjectPropertyAxioms, getHasKeyAxioms, getInverseFunctionalObjectPropertyAxioms, getInverseObjectPropertyAxioms, getIrreflexiveObjectPropertyAxioms, getNegativeDataPropertyAssertionAxioms, getNegativeObjectPropertyAssertionAxioms, getObjectPropertyAssertionAxioms, getObjectPropertyDomainAxioms, getObjectPropertyRangeAxioms, getObjectSubPropertyAxiomsForSubProperty, getObjectSubPropertyAxiomsForSuperProperty, getReflexiveObjectPropertyAxioms, getSameIndividualAxioms, getSubAnnotationPropertyOfAxioms, getSubClassAxiomsForSubClass, getSubClassAxiomsForSuperClass, getSymmetricObjectPropertyAxioms, getTransitiveObjectPropertyAxioms
public OWLImmutableOntologyImpl(@Nonnull OWLOntologyManager manager, @Nonnull OWLOntologyID ontologyID)
manager
- ontology managerontologyID
- ontology idpublic String toString()
toString
in interface OWLObject
toString
in class OWLObjectImplWithEntityAndAnonCaching
public OWLOntologyManager getOWLOntologyManager()
OWLOntology
getOWLOntologyManager
in interface OWLOntology
public void setOWLOntologyManager(OWLOntologyManager manager)
OWLOntology
setOWLOntologyManager
in interface OWLOntology
manager
- the new manager for this ontologypublic OWLOntologyID getOntologyID()
OWLOntology
getOntologyID
in interface HasOntologyID
getOntologyID
in interface OWLOntology
public boolean isAnonymous()
isAnonymous
in interface IsAnonymous
true
if this object is anonymous, false
otherwise. For example, class
expressions are anonymous while class entities are not (they have an IRI);
OWLNamedIndividual
instances are named, OWLAnonymousIndividual
instances are anonymous. An ontology is anonymous if it does not have an ontology
IRI. In this case, getOntologyID().getOntologyIRI() will return an empty optional.public boolean isEmpty()
OWLOntology
HasAxioms.getAxioms()
returns the empty set), and it does not have any annotations (i.e.
OWLOntology.getAnnotations()
returns the empty set).isEmpty
in interface OWLOntology
true
if the ontology is empty, otherwise false
.public <T extends OWLAxiom> int getAxiomCount(AxiomType<T> axiomType, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxiomCount
in interface OWLAxiomCollectionBooleanArgs
T
- axiom typeaxiomType
- The type of axiom to countincludeImportsClosure
- if INCLUDED, include imports closure.public int getAxiomCount(boolean includeImportsClosure)
getAxiomCount
in interface OWLAxiomCollectionBooleanArgs
includeImportsClosure
- if true, include imports closure.public <T extends OWLAxiom> int getAxiomCount(AxiomType<T> axiomType, Imports includeImportsClosure)
OWLAxiomCollection
getAxiomCount
in interface OWLAxiomCollection
T
- axiom typeaxiomType
- The type of axiom to countincludeImportsClosure
- if INCLUDED, include imports closure.public boolean containsAxiom(@Nonnull OWLAxiom axiom)
HasContainsAxiom
OWLAxiom
.containsAxiom
in interface HasContainsAxiom
axiom
- The OWLAxiom
to test for.true
if this object contains axiom
, otherwise
false
.public int getAxiomCount()
getAxiomCount
in interface OWLAxiomCollectionNoArgs
public int getAxiomCount(Imports includeImportsClosure)
getAxiomCount
in interface OWLAxiomCollection
includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLAxiom> getAxioms()
HasAxioms
OWLAxiom
s contained in this object.public Set<OWLAxiom> getAxioms(boolean b)
getAxioms
in interface OWLAxiomCollectionBooleanArgs
b
- true if imports are included.public Set<OWLAxiom> getAxioms(Imports includeImportsClosure)
getAxioms
in interface OWLAxiomCollection
includeImportsClosure
- if INCLUDED, include imports closure.@Nonnull public <T extends OWLAxiom> Set<T> getAxioms(AxiomType<T> axiomType)
HasAxiomsByType
getAxioms
in interface HasAxiomsByType
T
- axiom typeaxiomType
- The type of axioms to be retrieved.public <T extends OWLAxiom> Set<T> getAxioms(AxiomType<T> axiomType, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxioms
in interface OWLAxiomCollectionBooleanArgs
T
- axiom typeaxiomType
- The type of axioms to be retrieved.includeImportsClosure
- if true, include imports closure.public <T extends OWLAxiom> Set<T> getAxioms(AxiomType<T> axiomType, Imports includeImportsClosure)
OWLAxiomCollection
getAxioms
in interface OWLAxiomCollection
T
- axiom typeaxiomType
- The type of axioms to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.@Nonnull public Set<OWLAxiom> getTBoxAxioms(Imports includeImportsClosure)
OWLOntology
getTBoxAxioms
in interface OWLOntology
includeImportsClosure
- if INCLUDED, the imports closure is included.@Nonnull public Set<OWLAxiom> getABoxAxioms(Imports includeImportsClosure)
OWLOntology
getABoxAxioms
in interface OWLOntology
includeImportsClosure
- if INCLUDED, the imports closure is included.@Nonnull public Set<OWLAxiom> getRBoxAxioms(Imports includeImportsClosure)
OWLOntology
getRBoxAxioms
in interface OWLOntology
includeImportsClosure
- if INCLUDED, the imports closure is included.public <T extends OWLAxiom> int getAxiomCount(AxiomType<T> axiomType)
OWLAxiomCollectionNoArgs
getAxiomCount
in interface OWLAxiomCollectionNoArgs
T
- axiom type classaxiomType
- The type of axiom to countpublic Set<OWLLogicalAxiom> getLogicalAxioms()
HasLogicalAxioms
OWLLogicalAxiom
s contained within this object.getLogicalAxioms
in interface HasLogicalAxioms
OWLLogicalAxiom
s that are contained within this
object. Changes are not reflected back.public Set<OWLLogicalAxiom> getLogicalAxioms(Imports includeImportsClosure)
OWLAxiomCollection
getLogicalAxioms
in interface OWLAxiomCollection
includeImportsClosure
- if INCLUDED, include imports closure.OWLLogicalAxiom
, optionally including the
imports closure. The set that is returned is a copy of the data.public Set<OWLLogicalAxiom> getLogicalAxioms(boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getLogicalAxioms
in interface OWLAxiomCollectionBooleanArgs
includeImportsClosure
- if true, include imports closure.OWLLogicalAxiom
, optionally including the
imports closure. The set that is returned is a copy of the data.public int getLogicalAxiomCount()
OWLAxiomCollectionNoArgs
getLogicalAxiomCount
in interface OWLAxiomCollectionNoArgs
public int getLogicalAxiomCount(boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getLogicalAxiomCount
in interface OWLAxiomCollectionBooleanArgs
includeImportsClosure
- if true, include imports closure.public int getLogicalAxiomCount(Imports includeImportsClosure)
OWLAxiomCollection
getLogicalAxiomCount
in interface OWLAxiomCollection
includeImportsClosure
- if INCLUDED, include imports closure.@Nonnull public Set<OWLAnnotation> getAnnotations()
OWLOntology
getAnnotations
in interface HasAnnotations
getAnnotations
in interface OWLOntology
public Set<OWLClassAxiom> getGeneralClassAxioms()
OWLOntology
OWLClass
es)OWLClass
es)getGeneralClassAxioms
in interface OWLOntology
public boolean containsAxiom(@Nonnull OWLAxiom axiom, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
containsAxiom
in interface OWLAxiomCollectionBooleanArgs
axiom
- The axiom to search.includeImportsClosure
- if INCLUDED, include imports closure.true
if the ontology contains the specified axiom.public boolean containsAxiom(@Nonnull OWLAxiom axiom, Imports includeImportsClosure, AxiomAnnotations ignoreAnnotations)
OWLAxiomCollection
containsAxiom
in interface OWLAxiomCollection
axiom
- The axiom to search.includeImportsClosure
- if INCLUDED, include imports closure.ignoreAnnotations
- if IGNORE_ANNOTATIONS, annotations are ignored when searching
for the axiom. For example, if the collection contains
SubClassOf(Annotation(p V) A B)
then this method will
return true
if the ontology contains
SubClassOf(A B)
or
SubClassOf(Annotation(q S) A B)
for any annotation
property q
and any annotation value S
.true
if the ontology contains the specified axiom.public boolean containsAxiomIgnoreAnnotations(@Nonnull OWLAxiom axiom)
OWLAxiomCollectionNoArgs
containsAxiomIgnoreAnnotations
in interface OWLAxiomCollectionNoArgs
axiom
- The axiom to search.true
if the ontology contains the specified axiom.public boolean containsAxiomIgnoreAnnotations(@Nonnull OWLAxiom axiom, boolean importsIncluded)
OWLAxiomCollectionBooleanArgs
SubClassOf(Annotation(p V) A B)
then this method will return true
if
the ontology contains SubClassOf(A B)
or SubClassOf(Annotation(q S) A B)
for
any annotation property q
and any annotation value S
.containsAxiomIgnoreAnnotations
in interface OWLAxiomCollectionBooleanArgs
axiom
- The axiom to search.importsIncluded
- if true, include imports closure.true
if the ontology contains the specified axiom.@Nonnull public Set<OWLAxiom> getAxiomsIgnoreAnnotations(@Nonnull OWLAxiom axiom)
OWLAxiomCollectionNoArgs
getAxiomsIgnoreAnnotations
in interface OWLAxiomCollectionNoArgs
axiom
- The axiom that the returned axioms must equal, ignoring annotations.axiomA
and axiomB
in
the set, axiomA.getAxiomWithoutAnnotations()
is equal to
axiomB.getAxiomWithoutAnnotations()
. The specified axiom will be contained in
the set.public Set<OWLAxiom> getAxiomsIgnoreAnnotations(@Nonnull OWLAxiom axiom, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxiomsIgnoreAnnotations
in interface OWLAxiomCollectionBooleanArgs
axiom
- The axiom that the returned axioms must equal, ignoring
annotations.includeImportsClosure
- if true, include imports closure.axiomA
and axiomB
in
the set, axiomA.getAxiomWithoutAnnotations()
is equal to
axiomB.getAxiomWithoutAnnotations()
. The specified axiom will be contained in
the set.public Set<OWLAxiom> getAxiomsIgnoreAnnotations(@Nonnull OWLAxiom axiom, Imports includeImportsClosure)
OWLAxiomCollection
getAxiomsIgnoreAnnotations
in interface OWLAxiomCollection
axiom
- The axiom that the returned axioms must equal, ignoring
annotations.includeImportsClosure
- if INCLUDED, include imports closure.axiomA
and axiomB
in
the set, axiomA.getAxiomWithoutAnnotations()
is equal to
axiomB.getAxiomWithoutAnnotations()
. The specified axiom will be contained in
the set.public boolean containsClassInSignature(IRI owlClassIRI, Imports includeImportsClosure)
OWLSignature
containsClassInSignature
in interface OWLSignature
owlClassIRI
- The IRI of the class to check forincludeImportsClosure
- if INCLUDED, include imports closure.public boolean containsObjectPropertyInSignature(IRI owlObjectPropertyIRI, Imports includeImportsClosure)
OWLSignature
containsObjectPropertyInSignature
in interface OWLSignature
owlObjectPropertyIRI
- The IRI of the OWLObjectProperty to check forincludeImportsClosure
- if INCLUDED, include imports closure.public boolean containsDataPropertyInSignature(IRI owlDataPropertyIRI, Imports includeImportsClosure)
OWLSignature
containsDataPropertyInSignature
in interface OWLSignature
owlDataPropertyIRI
- The IRI of the OWLDataProperty to check forincludeImportsClosure
- if INCLUDED, include imports closure.public boolean containsAnnotationPropertyInSignature(IRI owlAnnotationPropertyIRI, Imports includeImportsClosure)
OWLSignature
containsAnnotationPropertyInSignature
in interface OWLSignature
owlAnnotationPropertyIRI
- The IRI of the OWLAnnotationProperty to check forincludeImportsClosure
- if INCLUDED, include imports closure.public boolean containsIndividualInSignature(IRI owlIndividualIRI, Imports includeImportsClosure)
OWLSignature
containsIndividualInSignature
in interface OWLSignature
owlIndividualIRI
- The IRI of the OWLNamedIndividual to check forincludeImportsClosure
- if INCLUDED, include imports closure.public boolean containsDatatypeInSignature(IRI owlDatatypeIRI, Imports includeImportsClosure)
OWLSignature
containsDatatypeInSignature
in interface OWLSignature
owlDatatypeIRI
- The IRI of the OWLDatatype to check forincludeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLEntity> getEntitiesInSignature(@Nonnull IRI entityIRI)
getEntitiesInSignature
in interface HasGetEntitiesInSignature
entityIRI
- IRI for all entities to retrievepublic Set<OWLEntity> getEntitiesInSignature(IRI iri, Imports includeImportsClosure)
OWLSignature
getEntitiesInSignature
in interface OWLSignature
iri
- The IRI of the entitied to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<IRI> getPunnedIRIs(Imports includeImportsClosure)
OWLSignature
getPunnedIRIs
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.public boolean containsReference(@Nonnull OWLEntity entity, Imports includeImportsClosure)
containsReference
in interface OWLSignature
entity
- entity to checkincludeImportsClosure
- if INCLUDED, include imports closure.public boolean isDeclared(OWLEntity owlEntity)
OWLOntology
isDeclared
in interface OWLOntology
owlEntity
- The entity to be tested fortrue
if the ontology contains a declaration for the specified entity,
otherwise false
.public boolean isDeclared(OWLEntity owlEntity, Imports includeImportsClosure)
OWLOntology
isDeclared
in interface OWLOntology
owlEntity
- The entity to be tested forincludeImportsClosure
- if INCLUDED, the imports closure is included.true
if the ontology or its imports closure contains a declaration for the
specified entity, otherwise false
.public boolean containsEntityInSignature(@Nonnull OWLEntity owlEntity)
HasContainsEntityInSignature
containsEntityInSignature
in interface HasContainsEntityInSignature
containsEntityInSignature
in class OWLObjectImplWithEntityAndAnonCaching
owlEntity
- The entitytrue
if the signature of this object contains
owlEntity
, otherwise false
public boolean containsEntityInSignature(@Nonnull OWLEntity owlEntity, Imports includeImportsClosure)
OWLSignature
containsEntityInSignature
in interface OWLSignature
owlEntity
- The entityincludeImportsClosure
- if INCLUDED, include imports closure.true
if the signature or the import closure contains a reference to the
specified entity.public boolean containsEntityInSignature(IRI entityIRI, Imports includeImportsClosure)
OWLSignature
containsEntityInSignature
in interface OWLSignature
entityIRI
- The IRI to test for.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLEntity> getSignature()
HasSignature
getSignature
in interface HasSignature
getSignature
in interface OWLOntology
getSignature
in class OWLObjectImplWithEntityAndAnonCaching
HasClassesInSignature.getClassesInSignature()
,
HasObjectPropertiesInSignature.getObjectPropertiesInSignature()
,
HasDataPropertiesInSignature.getDataPropertiesInSignature()
,
HasIndividualsInSignature.getIndividualsInSignature()
public Set<OWLEntity> getSignature(Imports includeImportsClosure)
OWLOntology
getSignature
in interface OWLOntology
includeImportsClosure
- if INCLUDED, the imports closure is included.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.HasClassesInSignature.getClassesInSignature()
,
HasObjectPropertiesInSignature.getObjectPropertiesInSignature()
,
HasDataPropertiesInSignature.getDataPropertiesInSignature()
,
HasIndividualsInSignature.getIndividualsInSignature()
public Set<OWLAnonymousIndividual> getAnonymousIndividuals()
HasAnonymousIndividuals
getAnonymousIndividuals
in interface HasAnonymousIndividuals
getAnonymousIndividuals
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLClass> getClassesInSignature()
HasClassesInSignature
getClassesInSignature
in interface HasClassesInSignature
getClassesInSignature
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLDataProperty> getDataPropertiesInSignature()
HasDataPropertiesInSignature
getDataPropertiesInSignature
in interface HasDataPropertiesInSignature
getDataPropertiesInSignature
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLObjectProperty> getObjectPropertiesInSignature()
HasObjectPropertiesInSignature
getObjectPropertiesInSignature
in interface HasObjectPropertiesInSignature
getObjectPropertiesInSignature
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLNamedIndividual> getIndividualsInSignature()
HasIndividualsInSignature
getIndividualsInSignature
in interface HasIndividualsInSignature
getIndividualsInSignature
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLDatatype> getDatatypesInSignature()
HasDatatypesInSignature
getDatatypesInSignature
in interface HasDatatypesInSignature
getDatatypesInSignature
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLClass> getClassesInSignature(Imports includeImportsClosure)
OWLSignature
getClassesInSignature
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLObjectProperty> getObjectPropertiesInSignature(Imports includeImportsClosure)
OWLSignature
getObjectPropertiesInSignature
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLDataProperty> getDataPropertiesInSignature(Imports includeImportsClosure)
OWLSignature
getDataPropertiesInSignature
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLNamedIndividual> getIndividualsInSignature(Imports includeImportsClosure)
OWLSignature
getIndividualsInSignature
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLAnonymousIndividual> getReferencedAnonymousIndividuals(Imports includeImportsClosure)
OWLSignature
getReferencedAnonymousIndividuals
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLDatatype> getDatatypesInSignature(Imports includeImportsClosure)
OWLSignature
getDatatypesInSignature
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLAnnotationProperty> getAnnotationPropertiesInSignature()
HasAnnotationPropertiesInSignature
getAnnotationPropertiesInSignature
in interface HasAnnotationPropertiesInSignature
getAnnotationPropertiesInSignature
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLAnnotationProperty> getAnnotationPropertiesInSignature(Imports includeImportsClosure)
OWLSignature
getAnnotationPropertiesInSignature
in interface OWLSignature
includeImportsClosure
- if INCLUDED, include imports closure.@Nonnull public Set<OWLImportsDeclaration> getImportsDeclarations()
OWLOntology
getImportsDeclarations
in interface OWLOntology
public Set<IRI> getDirectImportsDocuments()
OWLOntology
directlyImportsDocument
association as discussed in
Section 3.4 of the OWL 2 Structural specification.getDirectImportsDocuments
in interface OWLOntology
public Set<OWLOntology> getImports()
OWLOntology
getImports
in interface OWLOntology
public Set<OWLOntology> getDirectImports()
OWLOntology
OWLOntology.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.getDirectImports
in interface HasDirectImports
getDirectImports
in interface OWLOntology
public Set<OWLOntology> getImportsClosure()
OWLOntology
OWLOntology.getImports()
method plus this ontology.)getImportsClosure
in interface HasImportsClosure
getImportsClosure
in interface OWLOntology
public void accept(@Nonnull OWLObjectVisitor visitor)
OWLObject
public void accept(@Nonnull OWLNamedObjectVisitor visitor)
OWLOntology
accept
in interface OWLOntology
visitor
- the visitorpublic <O> O accept(OWLNamedObjectVisitorEx<O> visitor)
OWLOntology
accept
in interface OWLOntology
O
- visitor return typevisitor
- The visitorpublic <O> O accept(@Nonnull OWLObjectVisitorEx<O> visitor)
OWLObject
public boolean equals(Object obj)
equals
in class OWLObjectImplWithEntityAndAnonCaching
public int hashCode()
hashCode
in class OWLObjectImplWithEntityAndAnonCaching
public Set<OWLClassAxiom> getAxioms(OWLClass cls, Imports includeImportsClosure)
OWLAxiomCollection
getAxioms
in interface OWLAxiomCollection
cls
- The class whose describing axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLObjectPropertyAxiom> getAxioms(OWLObjectPropertyExpression property, Imports includeImportsClosure)
OWLAxiomCollection
getAxioms
in interface OWLAxiomCollection
property
- The property whose defining axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLAnnotationAxiom> getAxioms(OWLAnnotationProperty property, Imports includeImportsClosure)
OWLAxiomCollection
getAxioms
in interface OWLAxiomCollection
property
- The property whose definition axioms are to be retrievedincludeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLDataPropertyAxiom> getAxioms(OWLDataProperty property, Imports includeImportsClosure)
OWLAxiomCollection
getAxioms
in interface OWLAxiomCollection
property
- The property whose defining axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLIndividualAxiom> getAxioms(OWLIndividual individual, Imports includeImportsClosure)
OWLAxiomCollection
getAxioms
in interface OWLAxiomCollection
individual
- The individual whose defining axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLDatatypeDefinitionAxiom> getAxioms(OWLDatatype datatype, Imports includeImportsClosure)
OWLAxiomCollection
getAxioms
in interface OWLAxiomCollection
datatype
- The datatypeincludeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLAxiom> getReferencingAxioms(OWLPrimitive owlEntity)
OWLAxiomCollectionNoArgs
OWLPrimitive
appears in the signature of the
axiom.OWLEntity
only. This method accepts
OWLPrimitive so that also anonymous individuals, literals, IRIs and annotation values can be
passed in, although they are not included in the axioms' signatures.getReferencingAxioms
in interface OWLAxiomCollectionNoArgs
owlEntity
- The entity that should be directly referred to by all axioms in the results
set.public Set<OWLAxiom> getReferencingAxioms(OWLPrimitive owlEntity, boolean includeImports)
OWLAxiomCollectionBooleanArgs
OWLPrimitive
appears in the signature of the
axiom.OWLEntity
only. This method accepts
OWLPrimitive so that also anonymous individuals, literals, IRIs and annotation values can be
passed in, although they are not included in the axioms' signatures.getReferencingAxioms
in interface OWLAxiomCollectionBooleanArgs
owlEntity
- The entity that should be directly referred to by all axioms in
the results set.includeImports
- if INCLUDED, include imports closure.public Set<OWLAxiom> getReferencingAxioms(OWLPrimitive owlEntity, Imports includeImportsClosure)
OWLAxiomCollection
OWLPrimitive
appears in the signature of the
axiom.OWLEntity
only. This method accepts
OWLPrimitive so that also anonymous individuals, literals, IRIs and annotation values can be
passed in, although they are not included in the axioms' signatures.getReferencingAxioms
in interface OWLAxiomCollection
owlEntity
- The entity that should be directly referred to by all axioms in
the results set.includeImportsClosure
- if INCLUDED, include imports closure.public <A extends OWLAxiom> Set<A> getAxioms(@Nonnull Class<A> type, @Nonnull OWLObject entity, Imports includeImports, Navigation forSubPosition)
OWLAxiomIndex
getAxioms
in interface OWLAxiomIndex
A
- type of returned axiomstype
- type of axiomsentity
- referred entity (OWLPrimitive or property/class expression)includeImports
- if INCLUDED, include imports closure.forSubPosition
- for sub axioms (subclass, subproperty), the value specifies
whether entity should appear as sub or super entity in the axioms
returned. For axiom types that have no sub/super entites, this
parameter is ignored.public <A extends OWLAxiom> Set<A> getAxioms(@Nonnull Class<A> type, @Nonnull Class<? extends OWLObject> explicitClass, @Nonnull OWLObject entity, @Nonnull Imports includeImports, @Nonnull Navigation forSubPosition)
OWLAxiomIndex
getAxioms
in interface OWLAxiomIndex
A
- type of returned axiomstype
- type of axiomsexplicitClass
- for overlapping indexes in the ontology internals, an explicit
class rathet than the entity class might be necessaryentity
- referred entity (OWLPrimitive or property/class expression)includeImports
- if INCLUDED, include imports closure.forSubPosition
- for sub axioms (subclass, subproperty), the value specifies
whether entity should appear as sub or super entity in the axioms
returned. For axiom types that have no sub/super entites, this
parameter is ignored.@Nonnull public <T extends OWLAxiom> Collection<T> filterAxioms(@Nonnull OWLAxiomSearchFilter filter, @Nonnull Object key, Imports includeImportsClosure)
OWLAxiomIndex
filterAxioms
in interface OWLAxiomIndex
T
- type of returned axiomsfilter
- the filter to matchkey
- the key. Its type is generic and it is used only by the filter.includeImportsClosure
- if INCLUDED, include imports closure.public boolean contains(@Nonnull OWLAxiomSearchFilter filter, @Nonnull Object key, Imports includeImportsClosure)
OWLAxiomIndex
contains
in interface OWLAxiomIndex
filter
- the filter to matchkey
- the key. Its type is generic and it is used only by the filter.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLClassAxiom> getAxioms(OWLClass cls)
OWLAxiomCollectionNoArgs
getAxioms
in interface OWLAxiomCollectionNoArgs
cls
- The class whose describing axioms are to be retrieved.public Set<OWLObjectPropertyAxiom> getAxioms(OWLObjectPropertyExpression property)
OWLAxiomCollectionNoArgs
getAxioms
in interface OWLAxiomCollectionNoArgs
property
- The property whose defining axioms are to be retrieved.public Set<OWLDataPropertyAxiom> getAxioms(OWLDataProperty property)
OWLAxiomCollectionNoArgs
getAxioms
in interface OWLAxiomCollectionNoArgs
property
- The property whose defining axioms are to be retrieved.public Set<OWLIndividualAxiom> getAxioms(OWLIndividual individual)
OWLAxiomCollectionNoArgs
getAxioms
in interface OWLAxiomCollectionNoArgs
individual
- The individual whose defining axioms are to be retrieved.public Set<OWLAnnotationAxiom> getAxioms(OWLAnnotationProperty property)
OWLAxiomCollectionNoArgs
getAxioms
in interface OWLAxiomCollectionNoArgs
property
- The property whose definition axioms are to be retrievedpublic Set<OWLDatatypeDefinitionAxiom> getAxioms(OWLDatatype datatype)
OWLAxiomCollectionNoArgs
getAxioms
in interface OWLAxiomCollectionNoArgs
datatype
- The datatypepublic Set<OWLClassAxiom> getAxioms(OWLClass cls, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxioms
in interface OWLAxiomCollectionBooleanArgs
cls
- The class whose describing axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLObjectPropertyAxiom> getAxioms(OWLObjectPropertyExpression property, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxioms
in interface OWLAxiomCollectionBooleanArgs
property
- The property whose defining axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLDataPropertyAxiom> getAxioms(OWLDataProperty property, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxioms
in interface OWLAxiomCollectionBooleanArgs
property
- The property whose defining axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLIndividualAxiom> getAxioms(OWLIndividual individual, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxioms
in interface OWLAxiomCollectionBooleanArgs
individual
- The individual whose defining axioms are to be retrieved.includeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLAnnotationAxiom> getAxioms(OWLAnnotationProperty property, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxioms
in interface OWLAxiomCollectionBooleanArgs
property
- The property whose definition axioms are to be retrievedincludeImportsClosure
- if INCLUDED, include imports closure.public Set<OWLDatatypeDefinitionAxiom> getAxioms(OWLDatatype datatype, boolean includeImportsClosure)
OWLAxiomCollectionBooleanArgs
getAxioms
in interface OWLAxiomCollectionBooleanArgs
datatype
- The datatypeincludeImportsClosure
- if INCLUDED, include imports closure.public void saveOntology() throws OWLOntologyStorageException
OWLOntology
saveOntology
in interface OWLOntology
OWLOntologyStorageException
- An exception will be thrown if there is a problem with
saving the ontology, or the ontology can't be saved in the format it was loaded from.public void saveOntology(IRI documentIRI) throws OWLOntologyStorageException
OWLOntology
saveOntology
in interface OWLOntology
documentIRI
- The document IRI where the ontology should be saved toOWLOntologyStorageException
- If the ontology cannot be savedpublic void saveOntology(OutputStream outputStream) throws OWLOntologyStorageException
OWLOntology
saveOntology
in interface OWLOntology
outputStream
- The output stream where the ontology will be saved toOWLOntologyStorageException
- If there was a problem saving this ontology to the
specified output streampublic void saveOntology(OWLDocumentFormat ontologyFormat) throws OWLOntologyStorageException
OWLOntology
saveOntology
in interface OWLOntology
ontologyFormat
- The format in which the ontology should be saved.OWLOntologyStorageException
- If the ontology cannot be saved.public void saveOntology(OWLDocumentFormat ontologyFormat, IRI documentIRI) throws OWLOntologyStorageException
OWLOntology
saveOntology
in interface OWLOntology
ontologyFormat
- The format in which to save the ontologydocumentIRI
- The document IRI where the ontology should be saved toOWLOntologyStorageException
- If the ontology could not be saved.public void saveOntology(OWLDocumentFormat ontologyFormat, OutputStream outputStream) throws OWLOntologyStorageException
OWLOntology
saveOntology
in interface OWLOntology
ontologyFormat
- The format in which to save the ontologyoutputStream
- The output stream where the ontology will be saved to.OWLOntologyStorageException
- If the ontology could not be saved.public void saveOntology(OWLOntologyDocumentTarget documentTarget) throws OWLOntologyStorageException
OWLOntology
OWLOntologyDocumentTarget
.saveOntology
in interface OWLOntology
documentTarget
- The output target where the ontology will be saved to.OWLOntologyStorageException
- If the ontology could not be saved.public void saveOntology(OWLDocumentFormat ontologyFormat, OWLOntologyDocumentTarget documentTarget) throws OWLOntologyStorageException
OWLOntology
saveOntology
in interface OWLOntology
ontologyFormat
- The output format in which to save the ontologydocumentTarget
- The output target where the ontology will be saved toOWLOntologyStorageException
- If the ontology could not be saved.public Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLClassExpression ce)
OWLAxiomIndex
OWLClassAssertionAxiom
s contained in this ontology that
make the specified class expression, ce
, a type for some
individual.getClassAssertionAxioms
in interface OWLAxiomIndex
getClassAssertionAxioms
in class OWLAxiomIndexImpl
ce
- The class expression that the returned axioms make a type for some
individual.public boolean containsEntitiesOfTypeInSignature(EntityType<?> type)
OWLSignature
containsEntitiesOfTypeInSignature
in interface OWLSignature
type
- type of entity to checkpublic boolean containsDatatypeInSignature(IRI owlDatatypeIRI)
OWLSignature
containsDatatypeInSignature
in interface OWLSignature
owlDatatypeIRI
- The IRI of the OWLDatatype to check forpublic boolean containsEntityInSignature(IRI entityIRI)
OWLSignature
containsEntityInSignature
in interface OWLSignature
entityIRI
- The IRI to test for.public boolean containsClassInSignature(IRI owlClassIRI)
OWLSignature
containsClassInSignature
in interface OWLSignature
owlClassIRI
- The IRI of the class to check forpublic boolean containsObjectPropertyInSignature(IRI owlObjectPropertyIRI)
OWLSignature
containsObjectPropertyInSignature
in interface OWLSignature
owlObjectPropertyIRI
- The IRI of the OWLObjectProperty to check forpublic boolean containsDataPropertyInSignature(IRI owlDataPropertyIRI)
OWLSignature
containsDataPropertyInSignature
in interface OWLSignature
owlDataPropertyIRI
- The IRI of the OWLDataProperty to check forpublic boolean containsAnnotationPropertyInSignature(IRI owlAnnotationPropertyIRI)
OWLSignature
containsAnnotationPropertyInSignature
in interface OWLSignature
owlAnnotationPropertyIRI
- The IRI of the OWLAnnotationProperty to check forpublic boolean containsIndividualInSignature(IRI owlIndividualIRI)
OWLSignature
containsIndividualInSignature
in interface OWLSignature
owlIndividualIRI
- The IRI of the OWLNamedIndividual to check forpublic boolean containsReference(OWLEntity entity)
containsReference
in interface OWLSignature
entity
- entity to checkpublic Set<OWLClass> getClassesInSignature(boolean includeImportsClosure)
OWLSignatureBooleanArgs
getClassesInSignature
in interface OWLSignatureBooleanArgs
includeImportsClosure
- if true, include imports closure.public Set<OWLObjectProperty> getObjectPropertiesInSignature(boolean includeImportsClosure)
OWLSignatureBooleanArgs
getObjectPropertiesInSignature
in interface OWLSignatureBooleanArgs
includeImportsClosure
- if true, include imports closure.public Set<OWLDataProperty> getDataPropertiesInSignature(boolean includeImportsClosure)
OWLSignatureBooleanArgs
getDataPropertiesInSignature
in interface OWLSignatureBooleanArgs
includeImportsClosure
- if true, include imports closure.public Set<OWLNamedIndividual> getIndividualsInSignature(boolean includeImportsClosure)
OWLSignatureBooleanArgs
getIndividualsInSignature
in interface OWLSignatureBooleanArgs
includeImportsClosure
- if true, include imports closure.public Set<OWLAnonymousIndividual> getReferencedAnonymousIndividuals(boolean includeImportsClosure)
OWLSignatureBooleanArgs
getReferencedAnonymousIndividuals
in interface OWLSignatureBooleanArgs
includeImportsClosure
- if true, include imports closure.public Set<OWLDatatype> getDatatypesInSignature(boolean includeImportsClosure)
OWLSignatureBooleanArgs
getDatatypesInSignature
in interface OWLSignatureBooleanArgs
includeImportsClosure
- if true, include imports closure.public Set<OWLAnnotationProperty> getAnnotationPropertiesInSignature(boolean includeImportsClosure)
OWLSignatureBooleanArgs
getAnnotationPropertiesInSignature
in interface OWLSignatureBooleanArgs
includeImportsClosure
- if true, include imports closure.public boolean containsEntityInSignature(OWLEntity owlEntity, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsEntityInSignature
in interface OWLSignatureBooleanArgs
owlEntity
- The entityincludeImportsClosure
- if true, include imports closure.true
if the signature or the import closure contains a
reference to the specified entity.public boolean containsEntityInSignature(IRI entityIRI, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsEntityInSignature
in interface OWLSignatureBooleanArgs
entityIRI
- The IRI to test for.includeImportsClosure
- if true, include imports closure.public boolean containsClassInSignature(IRI owlClassIRI, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsClassInSignature
in interface OWLSignatureBooleanArgs
owlClassIRI
- The IRI of the class to check forincludeImportsClosure
- if true, include imports closure.public boolean containsObjectPropertyInSignature(IRI owlObjectPropertyIRI, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsObjectPropertyInSignature
in interface OWLSignatureBooleanArgs
owlObjectPropertyIRI
- The IRI of the OWLObjectProperty to check forincludeImportsClosure
- if true, include imports closure.public boolean containsDataPropertyInSignature(IRI owlDataPropertyIRI, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsDataPropertyInSignature
in interface OWLSignatureBooleanArgs
owlDataPropertyIRI
- The IRI of the OWLDataProperty to check forincludeImportsClosure
- if true, include imports closure.public boolean containsAnnotationPropertyInSignature(IRI owlAnnotationPropertyIRI, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsAnnotationPropertyInSignature
in interface OWLSignatureBooleanArgs
owlAnnotationPropertyIRI
- The IRI of the OWLAnnotationProperty to check forincludeImportsClosure
- if true, include imports closure.public boolean containsDatatypeInSignature(IRI owlDatatypeIRI, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsDatatypeInSignature
in interface OWLSignatureBooleanArgs
owlDatatypeIRI
- The IRI of the OWLDatatype to check forincludeImportsClosure
- if true, include imports closure.public boolean containsIndividualInSignature(IRI owlIndividualIRI, boolean includeImportsClosure)
OWLSignatureBooleanArgs
containsIndividualInSignature
in interface OWLSignatureBooleanArgs
owlIndividualIRI
- The IRI of the OWLNamedIndividual to check forincludeImportsClosure
- if true, include imports closure.public Set<OWLEntity> getEntitiesInSignature(IRI iri, boolean includeImportsClosure)
OWLSignatureBooleanArgs
getEntitiesInSignature
in interface OWLSignatureBooleanArgs
iri
- The IRI of the entitied to be retrieved.includeImportsClosure
- if true, include imports closure.public boolean containsReference(OWLEntity entity, boolean includeImportsClosure)
containsReference
in interface OWLSignatureBooleanArgs
entity
- entity to checkincludeImportsClosure
- if true, include imports closure.Copyright © 2020 The University of Manchester. All rights reserved.