|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OWLReasoner
Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 21-Jan-2009
An OWLReasoner reasons over a set of axioms (the set of reasoner axioms) that is based on the imports closure of a
particular ontology - the "root" ontology. This ontology can be obtained using the getRootOntology()
method.
When the client responsible for creating the reasoner has finished with the
reasoner instance it must call the dispose()
method to free any resources that are used by the reasoner.
In general, reasoners should not be instantiated directly, but should be created using the appropriate
OWLReasonerFactory
.
OWLOntologyManager
that manages the root ontology.
The reasoner will listen to any
OWLOntologyChange
s and respond appropriately to them before answering any queries.
If the BufferingMode
of the reasoner (the answer to getBufferingMode()
is BufferingMode.NON_BUFFERING
) the ontology changes are processed by the reasoner
immediately so that any queries asked after the changes are answered with respect to the changed ontologies.
If the BufferingMode
of the reasoner is BufferingMode.BUFFERING
then ontology changes are stored in a buffer and are only taken into consideration when the buffer is flushed with
the flush()
method. When reasoning, axioms in the root ontology imports closure, minus the axioms returned
by the getPendingAxiomAdditions()
method, plus the axioms returned by the getPendingAxiomRemovals()
are taken into consideration.
Note that there is no guarantee that the reasoner implementation will respond to changes in an incremental
(and efficient manner) manner.
getPendingAxiomRemovals()
minus the axioms returned by getPendingAxiomAdditions()
NodeSet
s. These are
sets of Node
s. A Node
contains entities.
For a Node<OWLClass>
of classes, each class in the node is equivalent to the other classes in the Node
with respect to the
imports closure of the root ontology.
For a Node<OWLObjectProperty>
of object properties, each
object property in the Node
is equivalent to the other object properties in the node with respect to the
imports closure of the root ontology.
For a Node<OWLDataProperty>
of data properties, each data property
in the Node
is equivalent to the other data properties in the node with respect to the
imports closure of the root ontology.
For a Node<OWLNamedIndividual>
of named individuals, each individual in the node
is the same as the other individuals in the node with respect to the
imports closure of the root ontology.
By abuse of notation, we say that a NodeSet
"contains" an entity if that entity is contained in one
of the Nodes
in the NodeSet
.
Node.isTopNode()
) and a bottom node
(see Node.isBottomNode()
).
The figure below shows an example class hierarchy. Each box in the hierarchy represents a Node
. In
this case the top node contains owl:Thing
and the bottom node contains owl:Nothing
because the nodes in the hierarchy are OWLClass
nodes. In this case, class G
is equivalent to owl:Thing
so it appears as an entity in the top node along with owl:Thing
.
Similarly, class K
is unsatisfiable, so it is equivalent to owl:Nothing
, and therefore
appears in the bottom node containing owl:Nothing
. In this example, classes A
and
B
are equivalent so they appear in one node, also, classes D
and F
are
equivalent so they appear in one node.
Asking for the subclasses of a given class (expression) returns the a NodeSet
containing the nodes that contain classes
that are strict subclasses of the specified class (expression). For example, asking for the subclasses of class C
returns the NodeSet
{E}
and
{owl:Nothing, K}
.
Asking for the direct subclasses of a given class (expression) returns the NodeSet
that
contains the nodes that contains classes that are direct subclasses of the specified class. For example, asking for
the direct subclasses of class A
returns the NodeSet
containing the nodes {C}
and {D, F}
. Note that there are convenience methods on
NodeSet
and Node
that can be used to directly access the entities
in a NodeSet
without having to iterate over the nodes and entities in a NodeSet
. For
example, a "plain" set of classes contained inside the Nodes
contained inside a NodeSet
can easily be obtained using the NodeSet.getFlattened()
method. In this case we could quickly obtain {C,
D, F}
as the direct subclasses of A
simply by using the
getSubClasses(org.semanticweb.owlapi.model.OWLClassExpression, boolean)
} (with boolean=true) method on
OWLReasoner
and then we could use the NodeSet.getFlattened()
method on the retuned NodeSet
.
Asking for equivalent classes of a class (expression) returns a Node
that contains classes that are equivalent to
the class (expression) . For example, asking for the equivalent classes of owl:Nothing
(i.e. asking for the unsatisfiable classes) returns the Node
{owl:Nothing, K}
.
In what follows, an extension of the OWL 2 Functional Syntax is given in order to capture notions like a class being a "direct" subclass of another class.
Given two class expressions CE1
and CE2
and an ontology O
, CE1
is
a strict subclass of CE2
, written StrictSubClassOf(CE1 CE2)
if O
entails
SubClassOf(CE1 CE2)
and O
does not entail SubClassOf(CE2 CE1)
Given two class expressions CE1
and CE2
and an ontology O
, CE1
is a CE2
, written DirectSubClassOf(CE1 CE2)
, with respect
to O
if O
entails StrictSubClassOf(CE1 CE2)
and there is no class name
C
in the signature of O
such that O
entails StrictSubClassOf(CE1 C)
and O
entails StrictSubClassOf(C CE2)
.
Given two object property expressions OPE1
and OPE2
and an ontology O
,
OPE1
is a strict subproperty of OPE2
, written StrictSubObjectPropertyOf(OPE1 OPE2)
if O
entails SubObjectPropertyOf(OPE1 OPE2)
and O
does not entail
SubObjectPropertyOf(OPE1 OPE2)
Given two object property expressions OPE1
and OPE2
and an ontology O
,
OPE1
is a OPE2
, written DirectSubObjectPropertyOf(OPE1 OPE2)
,
with respect to O
if O
entails StrictSubObjectPropertyOf(OPE1 OPE2)
and
there is no object property name P
in the signature of O
such that O
entails
StrictSubObjectPropertyOf(OPE1 P)
and O
entails StrictSubObjectPropertyOf(P OPE2)
.
Given two dbject property expressions DPE1
and DPE2
and an ontology O
,
DPE1
is a strict subproperty of DPE2
, written StrictSubDataPropertyOf(DPE1 DPE2)
if O
entails SubDataPropertyOf(DPE1 DPE2)
and O
does not entail
SubDataPropertyOf(DPE1 DPE2)
Given two data property expressions DPE1
and DPE2
and an ontology O
,
DPE1
is a DPE2
, written DirectSubDataPropertyOf(DPE1 DPE2)
,
with respect to O
if O
entails StrictSubDataPropertyOf(DPE1 DPE2)
and
there is no data property name P
in the signature of O
such that O
entails
StrictSubDataPropertyOf(DPE1 P)
and O
entails StrictSubDataPropertyOf(P DPE2)
.
j
and a class expression CE
and an ontology O
, CE
is a direct class assertion (type) for j
, written DirectClassAssertion(CE j)
, if O
entails
ClassAssertion(CE j)
and there is no class name C
in the signature of O
such that O
entails ClassAssertion(C j)
and O
entails
StrictSubClassOf(C CE)
.
Method Summary | |
---|---|
void |
dispose()
Disposes of this reasoner. |
void |
flush()
Flushes any changes stored in the buffer, which causes the reasoner to take into consideration the changes the current root ontology specified by the changes. |
BufferingMode |
getBufferingMode()
Gets the buffering mode of this reasoner. |
NodeSet<OWLClass> |
getDataPropertyDomains(OWLDataProperty pe,
boolean direct)
Gets the named classes that are the direct or indirect domains of this property with respect to the imports closure of the root ontology. |
java.util.Set<OWLLiteral> |
getDataPropertyValues(OWLNamedIndividual ind,
OWLDataProperty pe)
Gets the data property values for the specified individual and data property. |
Node<OWLClass> |
getEquivalentClasses(OWLClassExpression ce)
Gets the set of named classes that are equivalent to the specified class expression with respect to the imports closure of the root ontology. |
Node<OWLDataProperty> |
getEquivalentDataProperties(OWLDataProperty pe)
Gets the set of named data properties that are equivalent to the specified data property expression with respect to the imports closure of the root ontology. |
Node<OWLObjectProperty> |
getEquivalentObjectProperties(OWLObjectPropertyExpression pe)
Gets the set of named object properties that are equivalent to the specified object property expression with respect to the imports closure of the root ontology. |
NodeSet<OWLNamedIndividual> |
getInstances(OWLClassExpression ce,
boolean direct)
Gets the individuals which are instances of the specified class expression. |
Node<OWLObjectProperty> |
getInverseObjectProperties(OWLObjectPropertyExpression pe)
Gets the set of named object properties that are the inverses of the specified object property expression with respect to the imports closure of the root ontology. |
NodeSet<OWLClass> |
getObjectPropertyDomains(OWLObjectPropertyExpression pe,
boolean direct)
Gets the named classes that are the direct or indirect domains of this property with respect to the imports closure of the root ontology. |
NodeSet<OWLClass> |
getObjectPropertyRanges(OWLObjectPropertyExpression pe,
boolean direct)
Gets the named classes that are the direct or indirect ranges of this property with respect to the imports closure of the root ontology. |
NodeSet<OWLNamedIndividual> |
getObjectPropertyValues(OWLNamedIndividual ind,
OWLObjectPropertyExpression pe)
Gets the object property values for the specified individual and object property expression. |
java.util.Set<OWLAxiom> |
getPendingAxiomAdditions()
Gets the axioms that as a result of ontology changes need to be added to the reasoner to synchronise it with the root ontology imports closure. |
java.util.Set<OWLAxiom> |
getPendingAxiomRemovals()
Gets the axioms that as a result of ontology changes need to removed to the reasoner to synchronise it with the root ontology imports closure. |
java.util.List<OWLOntologyChange> |
getPendingChanges()
Gets the pending changes which need to be taken into consideration by the reasoner so that it is up to date with the root ontology imports closure. |
OWLOntology |
getRootOntology()
Gets the "root" ontology that is loaded into this reasoner. |
Node<OWLNamedIndividual> |
getSameIndividuals(OWLNamedIndividual ind)
Gets the individuals that are the same as the specified individual. |
NodeSet<OWLClass> |
getSubClasses(OWLClassExpression ce,
boolean direct)
Gets the set of named classes that are the strict (potentially direct) subclasses of the specified class expression with respect to the reasoner axioms. |
NodeSet<OWLDataProperty> |
getSubDataProperties(OWLDataProperty pe,
boolean direct)
Gets the set of named data properties that are the strict (potentially direct) subproperties of the specified data property expression with respect to the imports closure of the root ontology. |
NodeSet<OWLObjectProperty> |
getSubObjectProperties(OWLObjectPropertyExpression pe,
boolean direct)
Gets the set of named object properties that are the strict (potentially direct) subproperties of the specified object property expression with respect to the imports closure of the root ontology. |
NodeSet<OWLClass> |
getSuperClasses(OWLClassExpression ce,
boolean direct)
Gets the set of named classes that are the strict (potentially direct) super classes of the specified class expression with respect to the imports closure of the root ontology. |
NodeSet<OWLDataProperty> |
getSuperDataProperties(OWLDataProperty pe,
boolean direct)
Gets the set of named data properties that are the strict (potentially direct) super properties of the specified data property with respect to the imports closure of the root ontology. |
NodeSet<OWLObjectProperty> |
getSuperObjectProperties(OWLObjectPropertyExpression pe,
boolean direct)
Gets the set of named object properties that are the strict (potentially direct) super properties of the specified object property expression with respect to the imports closure of the root ontology. |
long |
getTimeOut()
Gets the time out for the most basic reasoning operations. |
NodeSet<OWLClass> |
getTypes(OWLNamedIndividual ind,
boolean direct)
Gets the named classes which are (potentially direct) types of the specified named individual. |
void |
interrupt()
Asks the reasoner to interrupt what it is currently doing. |
boolean |
isConsistent()
Determines if the set of reasoner axioms is consistent. |
boolean |
isEntailed(OWLAxiom axiom)
A convenience method that determines if the specified axiom is entailed by the set of reasoner axioms. |
boolean |
isEntailed(java.util.Set<? extends OWLAxiom> axioms)
Determines if the specified set of axioms is entailed by the reasoner axioms. |
boolean |
isEntailmentCheckingSupported(AxiomType<?> axiomType)
Determines if entailment checking for the specified axiom type is supported. |
boolean |
isSatisfiable(OWLClassExpression classExpression)
A convenience method that determines if the specified class expression is satisfiable with respect to the reasoner axioms. |
void |
prepareReasoner()
Asks the reasoner to perform various tasks that prepare it for querying. |
Method Detail |
---|
BufferingMode getBufferingMode()
void flush()
BufferingMode.NON_BUFFERING
then this method will have no effect.
java.util.List<OWLOntologyChange> getPendingChanges()
flush()
method is called the set of pending changes
will be empty.
java.util.Set<OWLAxiom> getPendingAxiomAdditions()
BufferingMode.NON_BUFFERING
then there will be no pending axiom additions.
java.util.Set<OWLAxiom> getPendingAxiomRemovals()
BufferingMode.NON_BUFFERING
then there will be no pending axiom additions.
OWLOntology getRootOntology()
getPendingAxiomRemovals()
,
minus the axioms returned by getPendingAxiomAdditions()
when reasoning.
Note that the root ontology is set at reasoner
creation time and cannot be changed thereafter. Clients that want to add ontologies to and remove ontologies
from the reasoner after creation time should create a "dummy" ontology that imports the "real" ontologies and
then specify the dummy ontology as the root ontology at reasoner creation time.
void interrupt()
void prepareReasoner() throws ReasonerInterruptedException, TimeOutException
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.boolean isConsistent() throws ReasonerInterruptedException, TimeOutException
InconsistentOntologyException
even if the root ontology
imports closure is inconsistent.
true
if the imports closure of the root ontology is consistent,
or false
if the imports closure of the root ontology is inconsistent.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process).
TimeOutException
- if the reasoning processed timed out after the specified amount of time.
See getTimeOut()
boolean isSatisfiable(OWLClassExpression classExpression) throws ReasonerInterruptedException, TimeOutException, ClassExpressionNotInProfileException, UndeclaredEntitiesException, InconsistentOntologyException
classExpression
- The class expression
true
if classExpression is satisfiable with respect to the set of axioms, or
false
if classExpression is unsatisfiable with respect to the axioms.
InconsistentOntologyException
- if the set of reasoner axioms is inconsistent
ClassExpressionNotInProfileException
- if classExpression
is not within the profile that is
supported by this reasoner.
UndeclaredEntitiesException
- if the signature of the classExpression is not contained within the signature
of the set of reasoner axioms.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.boolean isEntailed(OWLAxiom axiom) throws ReasonerInterruptedException, UnsupportedEntailmentTypeException, TimeOutException, AxiomNotInProfileException, UndeclaredEntitiesException, InconsistentOntologyException
axiom
- The axiom
true
if axiom
is entailed by the reasoner axioms or false
if
axiom
is not entailed by the reasoner axioms.
InconsistentOntologyException
- if the set of reasoner axioms is inconsistent
UndeclaredEntitiesException
- if the signature of the axiom is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.
UnsupportedEntailmentTypeException
- if the reasoner cannot perform a check to see if the specified
axiom is entailed
AxiomNotInProfileException
- if axiom
is not in the profile that is supported by this reasoner.isEntailmentCheckingSupported(org.semanticweb.owlapi.model.AxiomType)
boolean isEntailed(java.util.Set<? extends OWLAxiom> axioms) throws ReasonerInterruptedException, UnsupportedEntailmentTypeException, TimeOutException, AxiomNotInProfileException, UndeclaredEntitiesException, InconsistentOntologyException
axioms
- The set of axioms to be tested
true
if the set of axioms is entailed by the axioms in the imports closure of the root
ontology, otherwise false
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the set of axioms is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.
UnsupportedEntailmentTypeException
- if the reasoner cannot perform a check to see if the specified
axiom is entailed
AxiomNotInProfileException
- if axiom
is not in the profile that is supported by this reasoner.isEntailmentCheckingSupported(org.semanticweb.owlapi.model.AxiomType)
boolean isEntailmentCheckingSupported(AxiomType<?> axiomType)
axiomType
- The axiom type
true
if entailment checking for the specified axiom type is supported, otherwise
false
. If true
then asking isEntailed(org.semanticweb.owlapi.model.OWLAxiom)
will not throw an exception of UnsupportedEntailmentTypeException
.
If false
then asking isEntailed(org.semanticweb.owlapi.model.OWLAxiom)
will throw
an UnsupportedEntailmentTypeException
.NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
ce
- The class expression whose strict (direct) subclasses are to be retrieved.direct
- Specifies if the direct subclasses should be retrived (true
) or if the all subclasses (descendant)
classes should be retrieved (false
).
true
, a NodeSet
such that for each class C
in the NodeSet
the set of reasoner axioms entails DirectSubClassOf(C, ce)
.
If direct is false
, a NodeSet
such that for each class C
in the NodeSet
the set of reasoner axioms entails StrictSubClassOf(C, ce)
.
If ce
is equivalent to owl:Nothing
then the empty NodeSet
will be returned.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
ClassExpressionNotInProfileException
- if classExpression
is not within the profile that is
supported by this reasoner.
UndeclaredEntitiesException
- if the signature of the classExpression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
ce
- The class expression whose strict (direct) super classes are to be retrieved.direct
- Specifies if the direct super classes should be retrived (true
) or if the all super classes (ancestors)
classes should be retrieved (false
).
true
, a NodeSet
such that for each class C
in the NodeSet
the set of reasoner axioms entails DirectSubClassOf(ce, C)
.
If direct is false
, a NodeSet
such that for each class C
in the NodeSet
the set of reasoner axioms entails StrictSubClassOf(ce, C)
.
If ce
is equivalent to owl:Thing
then the empty NodeSet
will be returned.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
ClassExpressionNotInProfileException
- if classExpression
is not within the profile that is
supported by this reasoner.
UndeclaredEntitiesException
- if the signature of the classExpression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.Node<OWLClass> getEquivalentClasses(OWLClassExpression ce) throws InconsistentOntologyException, ClassExpressionNotInProfileException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
Node
.
ce
- The class expression whose equivalent classes are to be retrieved.
C
in the node the root ontology
imports closure entails EquivalentClasses(ce C)
.
If ce
is a named class then ce
will be contained in the node.
If ce
is unsatisfiable with respect to the set of reasoner axioms then the node
representing and containing owl:Nothing
, i.e. the bottom node, will be returned.
If ce
is equivalent to owl:Thing
with respect to the set of reasoner axioms
then the node representing and containing owl:Thing
, i.e. the top node, will be returned
.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
ClassExpressionNotInProfileException
- if classExpression
is not within the profile that is
supported by this reasoner.
UndeclaredEntitiesException
- if the signature of the classExpression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLObjectProperty> getSubObjectProperties(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
pe
- The object property expression whose strict (direct) subproperties are to be retrieved.direct
- Specifies if the direct subproperties should be retrived (true
) or if the all
subproperties (descendants) should be retrieved (false
).
true
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails DirectSubObjectPropertyOf(P, pe)
.
If direct is false
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails StrictSubObjectPropertyOf(P, pe)
.
If pe
is equivalent to owl:bottomObjectProperty
then the empty NodeSet
will be returned.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the object property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLObjectProperty> getSuperObjectProperties(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
pe
- The object property expression whose strict (direct) super properties are to be retrieved.direct
- Specifies if the direct super properties should be retrived (true
) or if the all
super properties (ancestors) should be retrieved (false
).
true
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails DirectSubObjectPropertyOf(pe, P)
.
If direct is false
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails StrictSubObjectPropertyOf(pe, P)
.
If pe
is equivalent to owl:topObjectProperty
then the empty NodeSet
will be returned.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the object property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.Node<OWLObjectProperty> getEquivalentObjectProperties(OWLObjectPropertyExpression pe) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
Node
.
pe
- The object property expression whose equivalent properties are to be retrieved.
P
in the node, the set of reasoner axioms entails EquivalentObjectProperties(pe P)
.
If pe
is a named object property then pe
will be contained in the node.
If pe
is unsatisfiable with respect to the set of reasoner axioms then the node
representing and containing owl:bottomObjectProperty
, i.e. the bottom node, will be returned.
If ce
is equivalent to owl:topObjectProperty
with respect to the set of reasoner axioms
then the node representing and containing owl:topObjectProperty
, i.e. the top node, will be returned
.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the object property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.Node<OWLObjectProperty> getInverseObjectProperties(OWLObjectPropertyExpression pe) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
pe
- The property expression whose inverse properties are to be retrieved.
NodeSet
containing object properties such that for each object property P
in
the nodes set, the set of reasoner axioms entails InverseObjectProperties(pe, P)
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the object property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
pe
- The property expression whose domains are to be retrieved.direct
- Specifies if the direct domains should be retrieved (true
), or if all domains
should be retrieved (false
).
direct
is true
, a NodeSet
containing named classes such that for each named
class C
in the node set, the set of reasoner axioms entails ObjectPropertyDomain(pe C)
and
the set of reasoner axioms entails DirectSubClassOf(ObjectSomeValuesFrom(pe owl:Thing) C)
If direct
is false
, a NodeSet
containing named classes such that for each named class
C
in the node set, the set of reasoner axioms entails ObjectPropertyDomain(pe C)
, that is,
the set of reasoner axioms entails StrictSubClassOf(ObjectSomeValuesFrom(pe owl:Thing) C)
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the object property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLClass> getObjectPropertyRanges(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
pe
- The property expression whose ranges are to be retrieved.direct
- Specifies if the direct ranges should be retrieved (true
), or if all ranges
should be retrieved (false
).
direct
is true
, a NodeSet
containing named classes such that for each named
class C
in the node set, the set of reasoner axioms entails ObjectPropertyRange(pe C)
(SubClassOf(owl:Thing ObjectAllValuesFrom(pe C))
) and there is no other class D
in the
signature of the set of reasoner axioms such that the set of reasoner axioms entails
StrictSubClassOf(D C)
and SubClassOf(owl:Thing ObjectAllValuesFrom(pe D))
.
If direct
is false
, a NodeSet
containing named classes such that for each named class
C
in the node set, the set of reasoner axioms entails ObjectPropertyRange(pe C)
, that is,
the set of reasoner axioms entails SubClassOf(owl:Thing ObjectAllValuesFrom(pe C))
.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the object property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLDataProperty> getSubDataProperties(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
pe
- The data property whose strict (direct) subproperties are to be retrieved.direct
- Specifies if the direct subproperties should be retrived (true
) or if the all
subproperties (descendants) should be retrieved (false
).
true
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails DirectSubDataPropertyOf(P, pe)
.
If direct is false
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails StrictSubDataPropertyOf(P, pe)
.
If pe
is equivalent to owl:bottomDataProperty
then the empty NodeSet
will be returned.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the data property is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLDataProperty> getSuperDataProperties(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
pe
- The data property whose strict (direct) super properties are to be retrieved.direct
- Specifies if the direct super properties should be retrived (true
) or if the all
super properties (ancestors) should be retrieved (false
).
true
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails DirectSubDataPropertyOf(pe, P)
.
If direct is false
, a NodeSet
such that for each property P
in the
NodeSet
the set of reasoner axioms entails StrictSubDataPropertyOf(pe, P)
.
If pe
is equivalent to owl:topDataProperty
then the empty NodeSet
will be returned.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the data property is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.Node<OWLDataProperty> getEquivalentDataProperties(OWLDataProperty pe) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
Node
.
pe
- The data property expression whose equivalent properties are to be retrieved.
P
in the node, the set of reasoner axioms entails EquivalentDataProperties(pe P)
.
If pe
is a named data property then pe
will be contained in the node.
If pe
is unsatisfiable with respect to the set of reasoner axioms then the node
representing and containing owl:bottomDataProperty
, i.e. the bottom node, will be returned.
If ce
is equivalent to owl:topDataProperty
with respect to the set of reasoner axioms
then the node representing and containing owl:topDataProperty
, i.e. the top node, will be returned
.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the data property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
pe
- The property whose domains are to be retrieved.direct
- Specifies if the direct domains should be retrieved (true
), or if all domains
should be retrieved (false
).
direct
is true
, a NodeSet
containing named classes such that for each named
class C
in the node set, the set of reasoner axioms entails DataPropertyDomain(pe C)
and
the set of reasoner axioms entails DirectSubClassOf(ObjectSomeValuesFrom(pe rdfs:Literal) C)
If direct
is false
, a NodeSet
containing named classes such that for each named class
C
in the node set, the set of reasoner axioms entails DataPropertyDomain(pe C)
, that is,
the set of reasoner axioms entails StrictSubClassOf(ObjectSomeValuesFrom(pe rdfs:Literal) C)
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the data property is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
ind
- The individual whose types are to be retrieved.direct
- Specifies if the direct types should be retrieved (true
), or if all types
should be retrieved (false
).
direct
is true
, a NodeSet
containing named classes such
that for each named class C
in the node set, the set of reasoner axioms entails
DirectClassAssertion(C, ind)
.
If direct
is false
, a NodeSet
containing named classes such that for
each named class C
in the node set, the set of reasoner axioms entails
ClassAssertion(C, ind)
.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the individual is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLNamedIndividual> getInstances(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
ce
- The class expression whose instances are to be retrieved.direct
- Specifies if the direct instances should be retrieved (true
), or if all instances
should be retrieved (false
).
direct
is true
, a NodeSet
containing named individuals such
that for each named individual j
in the node set, the set of reasoner axioms entails
DirectClassAssertion(ce, j)
.
If direct
is false
, a NodeSet
containing named individuals such that for
each named individual j
in the node set, the set of reasoner axioms entails
ClassAssertion(ce, j)
.
If ce is unsatisfiable with respect to the set of reasoner axioms then the empty NodeSet
is returned.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
ClassExpressionNotInProfileException
- if the class expression ce
is not in the profile
that is supported by this reasoner.
UndeclaredEntitiesException
- if the signature of the class expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.NodeSet<OWLNamedIndividual> getObjectPropertyValues(OWLNamedIndividual ind, OWLObjectPropertyExpression pe) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
NodeSet
.
ind
- The individual that is the subject of the object property valuespe
- The object property expression whose values are to be retrieved for the specified individual
NodeSet
containing named individuals such that for each individual j
in the
node set, the set of reasoner axioms entails ObjectPropertyAssertion(pe ind j)
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the individual and property expression is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.java.util.Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
ind
- The individual that is the subject of the data property valuespe
- The data property whose values are to be retrieved for the specified individual
OWLLiteral
s containing literals such that for each literal l
in the
set, either there is an explicit data property assertion in the set of reasoner axioms
DataPropertyAssertion(pe, ind, l), or, there is an explicit
data property assertion in the set of reasoner axioms DataPropertyAssertion(S, ind, l)
and
the set of reasoner axioms entails SubDataPropertyOf(S, pe)
.
- Throws:
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the individual and property is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.
Node<OWLNamedIndividual> getSameIndividuals(OWLNamedIndividual ind) throws InconsistentOntologyException, UndeclaredEntitiesException, ReasonerInterruptedException, TimeOutException
ind
- The individual whose same individuals are to be retrieved.
j
in the node, the root
ontology imports closure entails SameIndividual(j, ind)
. Note that the node will contain
j
.
InconsistentOntologyException
- if the imports closure of the root ontology is inconsistent
UndeclaredEntitiesException
- if the signature of the individual is not contained within the signature
of the imports closure of the root ontology.
ReasonerInterruptedException
- if the reasoning process was interrupted for any particular reason (for example if
reasoning was cancelled by a client process)
TimeOutException
- if the reasoner timed out the satisfiability check. See getTimeOut()
.long getTimeOut()
TimeOutException
in the thread that is
executing the reasoning process.
Note that clients that want a higher level timeout, at the level of classification for example, should start
their own timers and request that the reasoner interrupts the current process using the interrupt()
method.
Long.MAX_VALUE
.void dispose()
OWLOntologyChangeListener
from the OWLOntologyManager
that manages the ontologies contained within the reasoner.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |