Class StructuralReasoner
java.lang.Object
org.semanticweb.owlapi.reasoner.impl.OWLReasonerBase
org.semanticweb.owlapi.reasoner.structural.StructuralReasoner
- All Implemented Interfaces:
OWLReasoner
This is a simple structural reasoner that essentially answers with told information. It is
incomplete.
- Since:
- 3.0.0
- Author:
- Matthew Horridge, The University of Manchester, Information Management Group
-
Constructor Summary
ConstructorsConstructorDescriptionStructuralReasoner
(OWLOntology rootOntology, OWLReasonerConfiguration configuration, BufferingMode bufferingMode) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dumpClassHierarchy
(boolean showBottomNode) void
dumpDataPropertyHierarchy
(boolean showBottomNode) void
dumpObjectPropertyHierarchy
(boolean showBottomNode) Gets theNode
corresponding to the bottom node (containingowl:Nothing
) in the class hierarchy.Gets theNode
corresponding to the bottom node (containingowl:bottomDataProperty
) in the data property hierarchy.Gets theNode
corresponding to the bottom node (containingowl:bottomObjectProperty
) in the object property hierarchy.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.Gets the data property values for the specified individual and data property expression.Gets the individuals which are entailed to be different from the specified individual.Gets the classes that are disjoint with the specified class expressionce
.Gets the data properties that are disjoint with the specified data property expressionpe
.Gets the simplified object property expressions that are disjoint with the specified object property expressionpe
.Gets the set of named classes that are equivalent to the specified class expression with respect to the set of reasoner axioms.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.Gets the set of simplified object property expressions that are equivalent to the specified object property expression with respect to the set of reasoner axioms.Gets the Fresh Entity Policy in use by this reasoner.Gets the IndividualNodeSetPolicy in use by this reasoner.getInstances
(OWLClassExpression ce, boolean direct) Gets the individuals which are instances of the specified class expression.Gets the set of simplified object property expressions that are the inverses of the specified object property expression with respect to the imports closure of the root ontology.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.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.Gets the object property values for the specified individual and object property expression.Returns the set ofInferenceType
s that are precomputable by reasoner.Gets the name of this reasoner.Gets the version of this reasoner.Gets the individuals that are the same as the specified individual.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.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.getSubObjectProperties
(OWLObjectPropertyExpression pe, boolean direct) Gets the set of simplified object property expressions that are the strict (potentially direct) subproperties of the specified object property expression with respect to the imports closure of the root ontology.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.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.getSuperObjectProperties
(OWLObjectPropertyExpression pe, boolean direct) Gets the set of simplified object property expressions that are the strict (potentially direct) super properties of the specified object property expression with respect to the imports closure of the root ontology.Gets theNode
corresponding to the top node (containingowl:Thing
) in the class hierarchy.Gets theNode
corresponding to the top node (containingowl:topDataProperty
) in the data property hierarchy.Gets theNode
corresponding to the top node (containingowl:topObjectProperty
) in the object property hierarchy.getTypes
(OWLNamedIndividual ind, boolean direct) Gets the named classes which are (potentially direct) types of the specified named individual.A convenience method that obtains the classes in the signature of the root ontology that are unsatisfiable.void
Asks the reasoner to interrupt what it is currently doing.boolean
Determines if the set of reasoner axioms is consistent.boolean
isEntailed
(Set<? extends OWLAxiom> axioms) Determines if the specified set of axioms is entailed by the reasoner axioms.boolean
isEntailed
(OWLAxiom axiom) A convenience method that determines if the specified axiom is entailed by the set of reasoner axioms.boolean
isEntailmentCheckingSupported
(AxiomType<?> axiomType) Determines if entailment checking for the specified axiom type is supported.boolean
isPrecomputed
(InferenceType inferenceType) Determines if a specific set of inferences have been precomputed.boolean
isSatisfiable
(OWLClassExpression classExpression) A convenience method that determines if the specified class expression is satisfiable with respect to the reasoner axioms.void
precomputeInferences
(InferenceType... inferenceTypes) Asks the reasoner to precompute certain types of inferences.final void
Methods inherited from class org.semanticweb.owlapi.reasoner.impl.OWLReasonerBase
dispose, flush, getBufferingMode, getOWLDataFactory, getPendingAxiomAdditions, getPendingAxiomRemovals, getPendingChanges, getReasonerAxioms, getReasonerConfiguration, getRootOntology, getTimeOut
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.reasoner.OWLReasoner
bottomClassNode, bottomDataPropertyNode, bottomObjectPropertyNode, dataPropertyDomains, dataPropertyDomains, dataPropertyDomains, dataPropertyValues, differentIndividuals, disjointClasses, disjointDataProperties, disjointObjectProperties, equivalentClasses, equivalentDataProperties, equivalentObjectProperties, getDataPropertyDomains, getDataPropertyDomains, getInstances, getInstances, getObjectPropertyDomains, getObjectPropertyDomains, getObjectPropertyRanges, getObjectPropertyRanges, getSubClasses, getSubClasses, getSubDataProperties, getSubDataProperties, getSubObjectProperties, getSubObjectProperties, getSuperClasses, getSuperClasses, getSuperDataProperties, getSuperDataProperties, getSuperObjectProperties, getSuperObjectProperties, getTypes, getTypes, instances, instances, instances, inverseObjectProperties, isEntailed, isEntailed, objectPropertyDomains, objectPropertyDomains, objectPropertyDomains, objectPropertyRanges, objectPropertyRanges, objectPropertyRanges, objectPropertyValues, pendingAxiomAdditions, pendingAxiomRemovals, pendingChanges, precomputableInferenceTypes, representativeInstances, representativeInstances, representativeInstances, sameIndividuals, subClasses, subClasses, subClasses, subDataProperties, subDataProperties, subDataProperties, subObjectProperties, subObjectProperties, subObjectProperties, superClasses, superClasses, superClasses, superDataProperties, superDataProperties, superDataProperties, superObjectProperties, superObjectProperties, superObjectProperties, topClassNode, topDataPropertyNode, topObjectPropertyNode, types, types, types, unsatisfiableClasses
-
Constructor Details
-
StructuralReasoner
public StructuralReasoner(OWLOntology rootOntology, OWLReasonerConfiguration configuration, BufferingMode bufferingMode) - Parameters:
rootOntology
- the ontologyconfiguration
- the reasoner configurationbufferingMode
- the buffering mode
-
-
Method Details
-
getReasonerName
Description copied from interface:OWLReasoner
Gets the name of this reasoner.- Returns:
- A string that represents the name of this reasoner.
-
getFreshEntityPolicy
Description copied from interface:OWLReasoner
Gets the Fresh Entity Policy in use by this reasoner. The policy is set at reasoner creation time.- Specified by:
getFreshEntityPolicy
in interfaceOWLReasoner
- Overrides:
getFreshEntityPolicy
in classOWLReasonerBase
- Returns:
- The policy.
-
getIndividualNodeSetPolicy
Description copied from interface:OWLReasoner
Gets the IndividualNodeSetPolicy in use by this reasoner. The policy is set at reasoner creation time.- Specified by:
getIndividualNodeSetPolicy
in interfaceOWLReasoner
- Overrides:
getIndividualNodeSetPolicy
in classOWLReasonerBase
- Returns:
- The policy.
-
getReasonerVersion
Description copied from interface:OWLReasoner
Gets the version of this reasoner.- Returns:
- The version of this reasoner. Not
null
.
-
interrupt
public void interrupt()Description copied from interface:OWLReasoner
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 interrupt 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 interrupt individual consistency checks, satisfiability checks etc. -
prepareReasoner
public final void prepareReasoner()- Throws:
ReasonerInterruptedException
- on interruptionTimeOutException
- on timeout
-
precomputeInferences
Description copied from interface:OWLReasoner
Asks the reasoner to precompute certain types of inferences. Note that it is NOT necessary to call this method before asking any other queries - the reasoner will answer all queries correctly regardless of whether inferences are precomputed or not. For example, if the imports closure of the root ontology entailsSubClassOf(A B)
then the result ofgetSubClasses(B)
will containA
, regardless of whetherprecomputeInferences(InferenceType#CLASS_HIERARCHY)
has been called.
If the reasoner does not support the precomputation of a particular type of inference then it will silently ignore the request.- Parameters:
inferenceTypes
- Suggests a list of the types of inferences that should be precomputed. If the list is empty then the reasoner will determine which types of inferences are precomputed. Note that the order of the list is unimportant - the reasoner will determine the order in which inferences are computed.
-
isPrecomputed
Description copied from interface:OWLReasoner
Determines if a specific set of inferences have been precomputed.- Parameters:
inferenceType
- The type of inference to check for.- Returns:
true
if the specified type of inferences have been precomputed, otherwisefalse
.
-
getPrecomputableInferenceTypes
Description copied from interface:OWLReasoner
Returns the set ofInferenceType
s that are precomputable by reasoner.- Returns:
- A set of
InferenceType
s that can be precomputed by this reasoner.
-
isConsistent
public boolean isConsistent()Description copied from interface:OWLReasoner
Determines if the set of reasoner axioms is consistent. Note that this method will NOT throw anInconsistentOntologyException
even if the root ontology imports closure is inconsistent.- Returns:
true
if the imports closure of the root ontology is consistent, orfalse
if the imports closure of the root ontology is inconsistent.
-
isSatisfiable
Description copied from interface:OWLReasoner
A convenience method that determines if the specified class expression is satisfiable with respect to the reasoner axioms.- Parameters:
classExpression
- The class expression- Returns:
true
if classExpression is satisfiable with respect to the set of axioms, orfalse
if classExpression is unsatisfiable with respect to the axioms.
-
getUnsatisfiableClasses
Description copied from interface:OWLReasoner
A convenience method that obtains the classes in the signature of the root ontology that are unsatisfiable.- Returns:
- A
Node
that is the bottom node in the class hierarchy. This node representsowl:Nothing
and containsowl:Nothing
itself plus classes that are equivalent toowl:Nothing
.
-
isEntailed
Description copied from interface:OWLReasoner
A convenience method that determines if the specified axiom is entailed by the set of reasoner axioms.- Parameters:
axiom
- The axiom- Returns:
true
ifaxiom
is entailed by the reasoner axioms orfalse
ifaxiom
is not entailed by the reasoner axioms.true
if the set of reasoner axioms is inconsistent.- See Also:
-
isEntailed
Description copied from interface:OWLReasoner
Determines if the specified set of axioms is entailed by the reasoner axioms.- 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, otherwisefalse
. If the set of reasoner axioms is inconsistent thentrue
.- See Also:
-
isEntailmentCheckingSupported
Description copied from interface:OWLReasoner
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, otherwisefalse
. Iftrue
then askingOWLReasoner.isEntailed(org.semanticweb.owlapi.model.OWLAxiom)
will not throw an exception ofUnsupportedEntailmentTypeException
. Iffalse
then askingOWLReasoner.isEntailed(org.semanticweb.owlapi.model.OWLAxiom)
will throw anUnsupportedEntailmentTypeException
.
-
getTopClassNode
Description copied from interface:OWLReasoner
Gets theNode
corresponding to the top node (containingowl:Thing
) in the class hierarchy.- Returns:
- A
Node
containingowl:Thing
that is the top node in the class hierarchy. ThisNode
is essentially equal to theNode
returned by callingOWLReasoner.getEquivalentClasses(org.semanticweb.owlapi.model.OWLClassExpression)
with a parameter ofowl:Thing
.
-
getBottomClassNode
Description copied from interface:OWLReasoner
Gets theNode
corresponding to the bottom node (containingowl:Nothing
) in the class hierarchy.- Returns:
- A
Node
containingowl:Nothing
that is the bottom node in the class hierarchy. ThisNode
is essentially equal to theNode
that will be returned by callingOWLReasoner.getEquivalentClasses(org.semanticweb.owlapi.model.OWLClassExpression)
with a parameter ofowl:Nothing
.
-
getSubClasses
Description copied from interface:OWLReasoner
Gets the set of named classes that are the strict (potentially direct) subclasses of the specified class expression with respect to the reasoner axioms. Note that the classes are returned as aNodeSet
.- Parameters:
ce
- The class expression whose strict (direct) subclasses are to be retrieved.direct
- Specifies if the direct subclasses should be retrieved (true
) or if the all subclasses (descendant) classes should be retrieved (false
).- Returns:
- If direct is
true
, aNodeSet
such that for each classC
in theNodeSet
the set of reasoner axioms entailsDirectSubClassOf(C, ce)
.
If direct isfalse
, aNodeSet
such that for each classC
in theNodeSet
the set of reasoner axioms entailsStrictSubClassOf(C, ce)
.
Ifce
is equivalent toowl:Nothing
then the emptyNodeSet
will be returned.
-
getSuperClasses
Description copied from interface:OWLReasoner
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 aNodeSet
.- Parameters:
ce
- The class expression whose strict (direct) super classes are to be retrieved.direct
- Specifies if the direct super classes should be retrieved (true
) or if the all super classes (ancestors) classes should be retrieved (false
).- Returns:
- If direct is
true
, aNodeSet
such that for each classC
in theNodeSet
the set of reasoner axioms entailsDirectSubClassOf(ce, C)
.
If direct isfalse
, aNodeSet
such that for each classC
in theNodeSet
the set of reasoner axioms entailsStrictSubClassOf(ce, C)
.
Ifce
is equivalent toowl:Thing
then the emptyNodeSet
will be returned.
-
getEquivalentClasses
Description copied from interface:OWLReasoner
Gets the set of named classes that are equivalent to the specified class expression with respect to the set of reasoner axioms. The classes are returned as aNode
.- 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 entailsEquivalentClasses(ce C)
. Ifce
is not a class name (i.e. it is an anonymous class expression) and there are no such classesC
then the node will be empty.
Ifce
is a named class thence
will be contained in the node.
Ifce
is unsatisfiable with respect to the set of reasoner axioms then the node representing and containingowl:Nothing
, i.e. the bottom node, will be returned.
Ifce
is equivalent toowl:Thing
with respect to the set of reasoner axioms then the node representing and containingowl:Thing
, i.e. the top node, will be returned.
-
getDisjointClasses
Description copied from interface:OWLReasoner
Gets the classes that are disjoint with the specified class expressionce
. The classes are returned as aNodeSet
.- Parameters:
ce
- The class expression whose disjoint classes are to be retrieved.- Returns:
- The return value is a
NodeSet
such that for each classD
in theNodeSet
the set of reasoner axioms entailsEquivalentClasses(D, ObjectComplementOf(ce))
orStrictSubClassOf(D, ObjectComplementOf(ce))
.
-
getTopObjectPropertyNode
Description copied from interface:OWLReasoner
Gets theNode
corresponding to the top node (containingowl:topObjectProperty
) in the object property hierarchy.- Returns:
- A
Node
containingowl:topObjectProperty
that is the top node in the object property hierarchy. ThisNode
is essentially equivalent to theNode
returned by callingOWLReasoner.getEquivalentObjectProperties(org.semanticweb.owlapi.model.OWLObjectPropertyExpression)
with a parameter ofowl:topObjectProperty
.
-
getBottomObjectPropertyNode
Description copied from interface:OWLReasoner
Gets theNode
corresponding to the bottom node (containingowl:bottomObjectProperty
) in the object property hierarchy.- Returns:
- A
Node
, containingowl:bottomObjectProperty
, that is the bottom node in the object property hierarchy. ThisNode
is essentially equal to theNode
that will be returned by callingOWLReasoner.getEquivalentObjectProperties(org.semanticweb.owlapi.model.OWLObjectPropertyExpression)
with a parameter ofowl:bottomObjectProperty
.
-
getSubObjectProperties
public NodeSet<OWLObjectPropertyExpression> getSubObjectProperties(OWLObjectPropertyExpression pe, boolean direct) Description copied from interface:OWLReasoner
Gets the set of simplified object property expressions 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 aNodeSet
.- Parameters:
pe
- The object property expression whose strict (direct) subproperties are to be retrieved.direct
- Specifies if the direct subproperties should be retrieved (true
) or if the all subproperties (descendants) should be retrieved (false
).- Returns:
- If direct is
true
, aNodeSet
of simplified object property expressions, such that for each simplified object property expression,P
, in theNodeSet
the set of reasoner axioms entailsDirectSubObjectPropertyOf(P, pe)
.
If direct isfalse
, aNodeSet
of simplified object property expressions, such that for each simplified object property expression,P
, in theNodeSet
the set of reasoner axioms entailsStrictSubObjectPropertyOf(P, pe)
.
Ifpe
is equivalent toowl:bottomObjectProperty
then the emptyNodeSet
will be returned.
-
getSuperObjectProperties
public NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties(OWLObjectPropertyExpression pe, boolean direct) Description copied from interface:OWLReasoner
Gets the set of simplified object property expressions 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 aNodeSet
.- Parameters:
pe
- The object property expression whose strict (direct) super properties are to be retrieved.direct
- Specifies if the direct super properties should be retrieved (true
) or if the all super properties (ancestors) should be retrieved (false
).- Returns:
- If direct is
true
, aNodeSet
of simplified object property expressions, such that for each simplified object property expression,P
, in theNodeSet
, the set of reasoner axioms entailsDirectSubObjectPropertyOf(pe, P)
.
If direct isfalse
, aNodeSet
of simplified object property expressions, such that for each simplified object property expression,P
, in theNodeSet
, the set of reasoner axioms entailsStrictSubObjectPropertyOf(pe, P)
.
Ifpe
is equivalent toowl:topObjectProperty
then the emptyNodeSet
will be returned.
-
getEquivalentObjectProperties
public Node<OWLObjectPropertyExpression> getEquivalentObjectProperties(OWLObjectPropertyExpression pe) Description copied from interface:OWLReasoner
Gets the set of simplified object property expressions that are equivalent to the specified object property expression with respect to the set of reasoner axioms. The properties are returned as aNode
.- Parameters:
pe
- The object property expression whose equivalent properties are to be retrieved.- Returns:
- A node containing the simplified object property expressions such
that for each simplified object property expression,
P
, in the node, the set of reasoner axioms entailsEquivalentObjectProperties(pe P)
.
Ifpe
is a simplified object property expression Ifpe
is unsatisfiable with respect to the set of reasoner axioms then the node representing and containingowl:bottomObjectProperty
, i.e. the bottom node, will be returned.
Ifpe
is equivalent toowl:topObjectProperty
with respect to the set of reasoner axioms then the node representing and containingowl:topObjectProperty
, i.e. the top node, will be returned.
-
getDisjointObjectProperties
public NodeSet<OWLObjectPropertyExpression> getDisjointObjectProperties(OWLObjectPropertyExpression pe) Description copied from interface:OWLReasoner
Gets the simplified object property expressions that are disjoint with the specified object property expressionpe
. The object properties are returned as aNodeSet
.- Parameters:
pe
- The object property expression whose disjoint object properties are to be retrieved.- Returns:
- The return value is a
NodeSet
of simplified object property expressions, such that for each simplified object property expression,P
, in theNodeSet
the set of reasoner axioms entailsEquivalentObjectProperties(P, ObjectPropertyComplementOf(pe))
orStrictSubObjectPropertyOf(P, ObjectPropertyComplementOf(pe))
.
-
getInverseObjectProperties
Description copied from interface:OWLReasoner
Gets the set of simplified object property expressions 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 aNodeSet
- Parameters:
pe
- The property expression whose inverse properties are to be retrieved.- Returns:
- A
NodeSet
of simplified object property expressions, such that for each simplified object property expressionP
in the nodes set, the set of reasoner axioms entailsInverseObjectProperties(pe, P)
.
-
getObjectPropertyDomains
Description copied from interface:OWLReasoner
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 aNodeSet
.- 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:
- Let
N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))
.
Ifdirect
istrue
: then ifN
is not empty then the return value isN
, else the return value is the result ofgetSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), true)
.
Ifdirect
isfalse
: then the result ofgetSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)
together withN
ifN
is non-empty.
-
getObjectPropertyRanges
Description copied from interface:OWLReasoner
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 aNodeSet
.- 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:
- Let
N = getEquivalentClasses(ObjectSomeValuesFrom(ObjectInverseOf(pe) owl:Thing))
.
Ifdirect
istrue
: then ifN
is not empty then the return value isN
, else the return value is the result ofgetSuperClasses(ObjectSomeValuesFrom(ObjectInverseOf(pe) owl:Thing), true)
.
Ifdirect
isfalse
: then the result ofgetSuperClasses(ObjectSomeValuesFrom(ObjectInverseOf(pe) owl:Thing), false)
together withN
ifN
is non-empty.
-
getTopDataPropertyNode
Description copied from interface:OWLReasoner
Gets theNode
corresponding to the top node (containingowl:topDataProperty
) in the data property hierarchy.- Returns:
- A
Node
, containingowl:topDataProperty
, that is the top node in the data property hierarchy. ThisNode
is essentially equal to theNode
returned by callingOWLReasoner.getEquivalentDataProperties(org.semanticweb.owlapi.model.OWLDataProperty)
with a parameter ofowl:topDataProperty
.
-
getBottomDataPropertyNode
Description copied from interface:OWLReasoner
Gets theNode
corresponding to the bottom node (containingowl:bottomDataProperty
) in the data property hierarchy.- Returns:
- A
Node
, containingowl:bottomDataProperty
, that is the bottom node in the data property hierarchy. ThisNode
is essentially equal to theNode
that will be returned by callingOWLReasoner.getEquivalentDataProperties(org.semanticweb.owlapi.model.OWLDataProperty)
with a parameter ofowl:bottomDataProperty
.
-
getSubDataProperties
Description copied from interface:OWLReasoner
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 aNodeSet
.- Parameters:
pe
- The data property whose strict (direct) subproperties are to be retrieved.direct
- Specifies if the direct subproperties should be retrieved (true
) or if the all subproperties (descendants) should be retrieved (false
).- Returns:
- If direct is
true
, aNodeSet
such that for each propertyP
in theNodeSet
the set of reasoner axioms entailsDirectSubDataPropertyOf(P, pe)
.
If direct isfalse
, aNodeSet
such that for each propertyP
in theNodeSet
the set of reasoner axioms entailsStrictSubDataPropertyOf(P, pe)
.
Ifpe
is equivalent toowl:bottomDataProperty
then the emptyNodeSet
will be returned.
-
getSuperDataProperties
Description copied from interface:OWLReasoner
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 aNodeSet
.- Parameters:
pe
- The data property whose strict (direct) super properties are to be retrieved.direct
- Specifies if the direct super properties should be retrieved (true
) or if the all super properties (ancestors) should be retrieved (false
).- Returns:
- If direct is
true
, aNodeSet
such that for each propertyP
in theNodeSet
the set of reasoner axioms entailsDirectSubDataPropertyOf(pe, P)
.
If direct isfalse
, aNodeSet
such that for each propertyP
in theNodeSet
the set of reasoner axioms entailsStrictSubDataPropertyOf(pe, P)
.
Ifpe
is equivalent toowl:topDataProperty
then the emptyNodeSet
will be returned.
-
getEquivalentDataProperties
Description copied from interface:OWLReasoner
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 aNode
.- 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 set of reasoner axioms entailsEquivalentDataProperties(pe P)
.
Ifpe
is a named data property thenpe
will be contained in the node.
Ifpe
is unsatisfiable with respect to the set of reasoner axioms then the node representing and containingowl:bottomDataProperty
, i.e. the bottom node, will be returned.
Ifce
is equivalent toowl:topDataProperty
with respect to the set of reasoner axioms then the node representing and containingowl:topDataProperty
, i.e. the top node, will be returned
.
-
getDisjointDataProperties
Description copied from interface:OWLReasoner
Gets the data properties that are disjoint with the specified data property expressionpe
. The data properties are returned as aNodeSet
.- Parameters:
pe
- The data property expression whose disjoint data properties are to be retrieved.- Returns:
- The return value is a
NodeSet
such that for each data propertyP
in theNodeSet
the set of reasoner axioms entailsEquivalentDataProperties(P, DataPropertyComplementOf(pe))
orStrictSubDataPropertyOf(P, DataPropertyComplementOf(pe))
.
-
getDataPropertyDomains
Description copied from interface:OWLReasoner
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 aNodeSet
.- 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:
- Let
N = getEquivalentClasses(DataSomeValuesFrom(pe rdfs:Literal))
.
Ifdirect
istrue
: then ifN
is not empty then the return value isN
, else the return value is the result ofgetSuperClasses(DataSomeValuesFrom(pe rdfs:Literal), true)
.
Ifdirect
isfalse
: then the result ofgetSuperClasses(DataSomeValuesFrom(pe rdfs:Literal), false)
together withN
ifN
is non-empty.
(Note,rdfs:Literal
is the top datatype).
-
getTypes
Description copied from interface:OWLReasoner
Gets the named classes which are (potentially direct) types of the specified named individual. The classes are returned as aNodeSet
.- 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
istrue
, aNodeSet
containing named classes such that for each named classC
in the node set, the set of reasoner axioms entailsDirectClassAssertion(C, ind)
.
Ifdirect
isfalse
, aNodeSet
containing named classes such that for each named classC
in the node set, the set of reasoner axioms entailsClassAssertion(C, ind)
.
-
getInstances
Description copied from interface:OWLReasoner
Gets the individuals which are instances of the specified class expression. The individuals are returned a aNodeSet
.- 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
istrue
, aNodeSet
containing named individuals such that for each named individualj
in the node set, the set of reasoner axioms entailsDirectClassAssertion(ce, j)
.
Ifdirect
isfalse
, aNodeSet
containing named individuals such that for each named individualj
in the node set, the set of reasoner axioms entailsClassAssertion(ce, j)
.
If ce is unsatisfiable with respect to the set of reasoner axioms then the emptyNodeSet
is returned. - See Also:
-
getObjectPropertyValues
public NodeSet<OWLNamedIndividual> getObjectPropertyValues(OWLNamedIndividual ind, OWLObjectPropertyExpression pe) Description copied from interface:OWLReasoner
Gets the object property values for the specified individual and object property expression. The individuals are returned as aNodeSet
.- Parameters:
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- Returns:
- A
NodeSet
containing named individuals such that for each individualj
in the node set, the set of reasoner axioms entailsObjectPropertyAssertion(pe ind j)
. - See Also:
-
getDataPropertyValues
Description copied from interface:OWLReasoner
Gets the data property values for the specified individual and data property expression. The values are a set of literals. Note that the results are not guaranteed to be complete for this method. The reasoner may also return canonical literals or they may be in a form that bears a resemblance to the syntax of the literals in the root ontology imports closure.- Parameters:
ind
- The individual that is the subject of the data property valuespe
- The data property expression whose values are to be retrieved for the specified individual- Returns:
- A set of
OWLLiteral
s containing literals such that for each literall
in the set, the set of reasoner axioms entailsDataPropertyAssertion(pe ind l)
. - See Also:
-
getSameIndividuals
Description copied from interface:OWLReasoner
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 entailsSameIndividual(j, ind)
. Note that the node will containj
.
-
getDifferentIndividuals
Description copied from interface:OWLReasoner
Gets the individuals which are entailed to be different from the specified individual. The individuals are returned as aNodeSet
.- Parameters:
ind
- The individual whose different individuals are to be returned.- Returns:
- A
NodeSet
containingOWLNamedIndividual
s such that for each individuali
in theNodeSet
the set of reasoner axioms entailsDifferentIndividuals(ind, i)
.
-
dumpClassHierarchy
public void dumpClassHierarchy(boolean showBottomNode) - Parameters:
showBottomNode
- true if bottom node is to be showed
-
dumpObjectPropertyHierarchy
public void dumpObjectPropertyHierarchy(boolean showBottomNode) - Parameters:
showBottomNode
- true if bottom node is to be showed
-
dumpDataPropertyHierarchy
public void dumpDataPropertyHierarchy(boolean showBottomNode) - Parameters:
showBottomNode
- true if bottom node is to be showed
-