org.semanticweb.owlapi.reasoner
Interface BufferedOWLReasoner


public interface BufferedOWLReasoner

Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 04-Jun-2009


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 plus the changes.
 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.
 NodeSet<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.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 imports closure of the root ontology.
 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 imports closure of the root ontology (the ontology returned by OWLReasoner.getRootOntology()) is consistent.
 boolean isEntailed(OWLAxiom axiom)
          A convenience method that determines if the specified axiom is entailed by the set of axioms in the imports closure of the root ontology.
 boolean isEntailed(java.util.Set<OWLAxiom> axioms)
          Determines if the specified set of axioms is entailed by the axioms in the imports closure of the root ontology.
 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 axioms in the imports closure of the root ontology.
 void prepareReasoner()
          Asks the reasoner to perform various tasks that prepare it for querying.
 

Method Detail

getRootOntology

OWLOntology getRootOntology()
Gets the "root" ontology that is loaded into this reasoner. A buffered reasoner takes into account the axioms in this ontology and its imports closure with the "inverse" of the set of ontology changes returned by the getPendingChanges() method applied to the imports closure.

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.

Returns:
The root ontology that is loaded into the reasoner.

getPendingChanges

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. After the flush() method is called the set of pending changes will be empty.

Returns:
A set of changes. Note that the changes represent the raw changes as applied to the imports closure of the root ontology.

flush

void flush()
Flushes any changes stored in the buffer, which causes the reasoner to take into consideration the changes the current root ontology plus the changes.


interrupt

void interrupt()
Asks the reasoner to interrupt what it is currently doing. An ReasonerInterruptedException will be thrown in the thread that invoked the last reasoner operation. The OWL API is not thread safe in general, but it is likely that this method will be called from another thread than the event dispatch thread or the thread in which reasoning takes place.

Note that the reasoner will periodically check for interupt requests. Asking the reasoner to interrupt the current process does not mean that it will be interrupted immediately. However, clients can expect to be able to interupt individual consistency checks, satisfiability checks etc.


prepareReasoner

void prepareReasoner()
                     throws ReasonerInterruptedException,
                            TimeOutException
Asks the reasoner to perform various tasks that prepare it for querying. These tasks include consistency checking, computation of class, object property and data property hierarchies, computation of individual type and the relationships between individuals.

Throws:
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().

isConsistent

boolean isConsistent()
                     throws ReasonerInterruptedException,
                            TimeOutException
Determines if the imports closure of the root ontology (the ontology returned by OWLReasoner.getRootOntology()) is consistent. Note that this method will not throw an InconsistentOntologyException even if the root ontology imports closure is inconsistent.

Returns:
true if the imports closure of the root ontology is consistent, or false if the imports closure of the root ontology is inconsistent.
Throws:
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()

isSatisfiable

boolean isSatisfiable(OWLClassExpression classExpression)
                      throws ReasonerInterruptedException,
                             TimeOutException,
                             ClassExpressionNotInProfileException,
                             UndeclaredEntitiesException,
                             InconsistentOntologyException
A convenience method that determines if the specified class expression is satisfiable with respect to the axioms in the imports closure of the root ontology.

Parameters:
classExpression - The class expression
Returns:
true if classExpression is satisfiable with respect to the set of axioms, or false if classExpression is unsatisfiable with respect to the axioms.
Throws:
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().

isEntailed

boolean isEntailed(OWLAxiom axiom)
                   throws ReasonerInterruptedException,
                          UnsupportedEntailmentTypeException,
                          TimeOutException,
                          AxiomNotInProfileException,
                          UndeclaredEntitiesException,
                          InconsistentOntologyException
A convenience method that determines if the specified axiom is entailed by the set of axioms in the imports closure of the root ontology.

Parameters:
axiom - The axiom
Returns:
true if axiom is entailed by the reasoner axioms or false if axiom is not entailed by the reasoner axioms.
Throws:
InconsistentOntologyException - if the imports closure of the root ontology is inconsistent
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().
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.
See Also:
isEntailmentCheckingSupported(org.semanticweb.owlapi.model.AxiomType)

isEntailed

boolean isEntailed(java.util.Set<OWLAxiom> axioms)
                   throws ReasonerInterruptedException,
                          UnsupportedEntailmentTypeException,
                          TimeOutException,
                          AxiomNotInProfileException,
                          UndeclaredEntitiesException,
                          InconsistentOntologyException
Determines if the specified set of axioms is entailed by the axioms in the imports closure of the root ontology.

Parameters:
axioms - The set of axioms to be tested
Returns:
true if the set of axioms is entailed by the axioms in the imports closure of the root ontology, otherwise false
Throws:
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.
See Also:
isEntailmentCheckingSupported(org.semanticweb.owlapi.model.AxiomType)

isEntailmentCheckingSupported

boolean isEntailmentCheckingSupported(AxiomType axiomType)
Determines if entailment checking for the specified axiom type is supported.

Parameters:
axiomType - The axiom type
Returns:
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.

getSubClasses

NodeSet<OWLClass> getSubClasses(OWLClassExpression ce,
                                boolean direct)
                                throws InconsistentOntologyException,
                                       ClassExpressionNotInProfileException,
                                       UndeclaredEntitiesException,
                                       ReasonerInterruptedException,
                                       TimeOutException
Gets the set of named classes that are the strict (potentially direct) subclasses of the specified class expression with respect to the imports closure of the root ontology. Note that the classes are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet such that for each class C in the NodeSet the root ontology imports closure entails DirectSubClassOf(C, ce).

If direct is false, a NodeSet such that for each class C in the NodeSet the root ontology imports closure entails StrictSubClassOf(C, ce).

If ce is equivalent to owl:Nothing then the empty NodeSet will be returned.
Throws:
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().

getSuperClasses

NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce,
                                  boolean direct)
                                  throws InconsistentOntologyException,
                                         ClassExpressionNotInProfileException,
                                         UndeclaredEntitiesException,
                                         ReasonerInterruptedException,
                                         TimeOutException
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. Note that the classes are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet such that for each class C in the NodeSet the root ontology imports closure entails DirectSubClassOf(ce, C).

If direct is false, a NodeSet such that for each class C in the NodeSet the root ontology imports closure entails StrictSubClassOf(ce, C).

If ce is equivalent to owl:Thing then the empty NodeSet will be returned.
Throws:
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().

getEquivalentClasses

Node<OWLClass> getEquivalentClasses(OWLClassExpression ce)
                                    throws InconsistentOntologyException,
                                           ClassExpressionNotInProfileException,
                                           UndeclaredEntitiesException,
                                           ReasonerInterruptedException,
                                           TimeOutException
Gets the set of named classes that are equivalent to the specified class expression with respect to the imports closure of the root ontology. The classes are returned as a Node.

Parameters:
ce - The class expression whose equivalent classes are to be retrieved.
Returns:
A node containing the named classes such that for each named class 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 root ontology imports closure 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 root ontology imports closure then the node representing and containing owl:Thing, i.e. the top node, will be returned

.
Throws:
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().

getSubObjectProperties

NodeSet<OWLObjectProperty> getSubObjectProperties(OWLObjectPropertyExpression pe,
                                                  boolean direct)
                                                  throws InconsistentOntologyException,
                                                         UndeclaredEntitiesException,
                                                         ReasonerInterruptedException,
                                                         TimeOutException
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. Note that the properties are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails DirectSubObjectPropertyOf(P, pe).

If direct is false, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails StrictSubObjectPropertyOf(P, pe).

If pe is equivalent to owl:bottomObjectProperty then the empty NodeSet will be returned.
Throws:
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().

getSuperObjectProperties

NodeSet<OWLObjectProperty> getSuperObjectProperties(OWLObjectPropertyExpression pe,
                                                    boolean direct)
                                                    throws InconsistentOntologyException,
                                                           UndeclaredEntitiesException,
                                                           ReasonerInterruptedException,
                                                           TimeOutException
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. Note that the properties are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails DirectSubObjectPropertyOf(pe, P).

If direct is false, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails StrictSubObjectPropertyOf(pe, P).

If pe is equivalent to owl:topObjectProperty then the empty NodeSet will be returned.
Throws:
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().

getEquivalentObjectProperties

Node<OWLObjectProperty> getEquivalentObjectProperties(OWLObjectPropertyExpression pe)
                                                      throws InconsistentOntologyException,
                                                             UndeclaredEntitiesException,
                                                             ReasonerInterruptedException,
                                                             TimeOutException
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. The properties are returned as a Node.

Parameters:
pe - The object property expression whose equivalent properties are to be retrieved.
Returns:
A node containing the named object properties such that for each named object property P in the node, the root ontology imports closure 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 root ontology imports closure 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 root ontology imports closure then the node representing and containing owl:topObjectProperty, i.e. the top node, will be returned

.
Throws:
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().

getInverseObjectProperties

NodeSet<OWLObjectProperty> getInverseObjectProperties(OWLObjectPropertyExpression pe)
                                                      throws InconsistentOntologyException,
                                                             UndeclaredEntitiesException,
                                                             ReasonerInterruptedException,
                                                             TimeOutException
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. The properties are returned as a NodeSet

Parameters:
pe - The property expression whose inverse properties are to be retrieved.
Returns:
A NodeSet containing object properties such that for each object property P in the nodes set, the root ontology imports closure entails InverseObjectProperties(pe, P)
Throws:
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().

getObjectPropertyDomains

NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe,
                                           boolean direct)
                                           throws InconsistentOntologyException,
                                                  UndeclaredEntitiesException,
                                                  ReasonerInterruptedException,
                                                  TimeOutException
Gets the named classes that are the direct or indirect domains of this property with respect to the imports closure of the root ontology. The classes are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet containing named classes such that for each named class C in the node set, the root ontology imports closure entails ObjectPropertyDomain(pe C) and the root ontology imports closure 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 root ontology imports closure entails ObjectPropertyDomain(pe C), that is, the root ontology imports closure entails StrictSubClassOf(ObjectSomeValuesFrom(pe owl:Thing) C)
Throws:
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().

getObjectPropertyRanges

NodeSet<OWLClass> getObjectPropertyRanges(OWLObjectPropertyExpression pe,
                                          boolean direct)
                                          throws InconsistentOntologyException,
                                                 UndeclaredEntitiesException,
                                                 ReasonerInterruptedException,
                                                 TimeOutException
Gets the named classes that are the direct or indirect ranges of this property with respect to the imports closure of the root ontology. The classes are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet containing named classes such that for each named class C in the node set, the root ontology imports closure entails ObjectPropertyRange(pe C) (SubClassOf(owl:Thing ObjectAllValuesFrom(pe C))) and there is no other class D in the signature of the root ontology imports closure such that the root ontology imports closure 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 root ontology imports closure entails ObjectPropertyRange(pe C), that is, the root ontology imports closure entails SubClassOf(owl:Thing ObjectAllValuesFrom(pe C)).
Throws:
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().

getSubDataProperties

NodeSet<OWLDataProperty> getSubDataProperties(OWLDataProperty pe,
                                              boolean direct)
                                              throws InconsistentOntologyException,
                                                     UndeclaredEntitiesException,
                                                     ReasonerInterruptedException,
                                                     TimeOutException
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. Note that the properties are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails DirectSubDataPropertyOf(P, pe).

If direct is false, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails StrictSubDataPropertyOf(P, pe).

If pe is equivalent to owl:bottomDataProperty then the empty NodeSet will be returned.
Throws:
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().

getSuperDataProperties

NodeSet<OWLDataProperty> getSuperDataProperties(OWLDataProperty pe,
                                                boolean direct)
                                                throws InconsistentOntologyException,
                                                       UndeclaredEntitiesException,
                                                       ReasonerInterruptedException,
                                                       TimeOutException
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. Note that the properties are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails DirectSubDataPropertyOf(pe, P).

If direct is false, a NodeSet such that for each property P in the NodeSet the root ontology imports closure entails StrictSubDataPropertyOf(pe, P).

If pe is equivalent to owl:topDataProperty then the empty NodeSet will be returned.
Throws:
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().

getEquivalentDataProperties

Node<OWLDataProperty> getEquivalentDataProperties(OWLDataProperty pe)
                                                  throws InconsistentOntologyException,
                                                         UndeclaredEntitiesException,
                                                         ReasonerInterruptedException,
                                                         TimeOutException
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. The properties are returned as a Node.

Parameters:
pe - The data property expression whose equivalent properties are to be retrieved.
Returns:
A node containing the named data properties such that for each named data property P in the node, the root ontology imports closure 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 root ontology imports closure 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 root ontology imports closure then the node representing and containing owl:topDataProperty, i.e. the top node, will be returned

.
Throws:
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().

getDataPropertyDomains

NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe,
                                         boolean direct)
                                         throws InconsistentOntologyException,
                                                UndeclaredEntitiesException,
                                                ReasonerInterruptedException,
                                                TimeOutException
Gets the named classes that are the direct or indirect domains of this property with respect to the imports closure of the root ontology. The classes are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet containing named classes such that for each named class C in the node set, the root ontology imports closure entails DataPropertyDomain(pe C) and the root ontology imports closure 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 root ontology imports closure entails DataPropertyDomain(pe C), that is, the root ontology imports closure entails StrictSubClassOf(ObjectSomeValuesFrom(pe rdfs:Literal) C)
Throws:
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().

getTypes

NodeSet<OWLClass> getTypes(OWLNamedIndividual ind,
                           boolean direct)
                           throws InconsistentOntologyException,
                                  UndeclaredEntitiesException,
                                  ReasonerInterruptedException,
                                  TimeOutException
Gets the named classes which are (potentially direct) types of the specified named individual. The classes are returned as a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet containing named classes such that for each named class C in the node set, the root ontology imports closure 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 root ontology imports closure entails ClassAssertion(C, ind).

Throws:
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().

getInstances

NodeSet<OWLNamedIndividual> getInstances(OWLClassExpression ce,
                                         boolean direct)
                                         throws InconsistentOntologyException,
                                                ClassExpressionNotInProfileException,
                                                UndeclaredEntitiesException,
                                                ReasonerInterruptedException,
                                                TimeOutException
Gets the individuals which are instances of the specified class expression. The individuals are returned a a NodeSet.

Parameters:
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).
Returns:
If direct is true, a NodeSet containing named individuals such that for each named individual j in the node set, the root ontology imports closure 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 root ontology imports closure entails ClassAssertion(ce, j).

If ce is unsatisfiable with respect to the root ontology imports closure then the empty NodeSet is returned.
Throws:
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().

getObjectPropertyValues

NodeSet<OWLNamedIndividual> getObjectPropertyValues(OWLNamedIndividual ind,
                                                    OWLObjectPropertyExpression pe)
                                                    throws InconsistentOntologyException,
                                                           UndeclaredEntitiesException,
                                                           ReasonerInterruptedException,
                                                           TimeOutException
Gets the object property values for the specified individual and object property expression. The individuals are returned as a NodeSet.

Parameters:
ind - The individual that is the subject of the object property values
pe - The object property expression whose values are to be retrieved for the specified individual
Returns:
A NodeSet containing named individuals such that for each individual j in the node set, the root ontology imports closure entails ObjectPropertyAssertion(pe ind j)
Throws:
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().

getDataPropertyValues

java.util.Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind,
                                                OWLDataProperty pe)
                                                throws InconsistentOntologyException,
                                                       UndeclaredEntitiesException,
                                                       ReasonerInterruptedException,
                                                       TimeOutException
Gets the data property values for the specified individual and data property.

Parameters:
ind - The individual that is the subject of the data property values
pe - The data property whose values are to be retrieved for the specified individual
Returns:
A set of OWLLiterals containing literals such that for each literal l in the set, either there is an explicit data property assertion in the root ontology imports closure DataPropertyAssertion(pe, ind, l), or, there is an explicit data property assertion in the root ontology imports closure DataPropertyAssertion(S, ind, l) and the root ontology imports closure 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().

getSameIndividuals

Node<OWLNamedIndividual> getSameIndividuals(OWLNamedIndividual ind)
                                            throws InconsistentOntologyException,
                                                   UndeclaredEntitiesException,
                                                   ReasonerInterruptedException,
                                                   TimeOutException
Gets the individuals that are the same as the specified individual.

Parameters:
ind - The individual whose same individuals are to be retrieved.
Returns:
A node containing individuals such that for each individual j in the node, the root ontology imports closure entails SameIndividual(j, ind). Note that the node will contain j.
Throws:
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().

getTimeOut

long getTimeOut()
Gets the time out for the most basic reasoning operations. That is the maximum time for a satisfiability test, subsumption test etc. The time out should be set at reasoner creation time. During satisfiability (subsumption) checking the reasoner will check to see if the time it has spent doing the single check is longer than the value returned by this method. If this is the case, the reasoner will throw a 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.

Returns:
The time out for basic reasoner operation. By default this is the value of Long.MAX_VALUE.

dispose

void dispose()
Disposes of this reasoner. This frees up any resources used by the reasoner and detaches the reasoner as an OWLOntologyChangeListener from the OWLOntologyManager that manages the ontologies contained within the reasoner.