Class Reasoner
- All Implemented Interfaces:
OWLReasoner
public final class Reasoner extends Object implements OWLReasoner
The main reasoner class, exposing standard and non-standard inference tasks.
Non-standard matchmaking services are detailed in Ruta et al., WIAS 2011. For more information about the project, visit Tiny-ME's website.
Reasoner objects can be instantiated via the ReasonerFactory
class.
- See Also:
- The OWL API.
-
Method Summary
Modifier and Type Method Description Abduction
abduction(SemanticDescription resource, SemanticDescription request)
This method is the same asabduction(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.Abduction
abduction(IRI resourceIri, IRI requestIri)
Abduction
abduction(OWLNamedIndividual resource, OWLNamedIndividual request)
Performs the Concept Abduction non-standard matchmaking task, comparing a requested semantic profile with a supplied resource.Bonus
bonus(SemanticDescription resource, SemanticDescription request)
This method is the same asbonus(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.Bonus
bonus(IRI resourceIri, IRI requestIri)
Bonus
bonus(OWLNamedIndividual resource, OWLNamedIndividual request)
Performs the Concept Bonus non-standard matchmaking task, comparing a requested semantic profile with a supplied resource.Reasoner
classify()
Computes the taxonomy of classes present in the root ontology.Contraction
contraction(SemanticDescription resource, SemanticDescription request)
This method is the same ascontraction(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.Contraction
contraction(IRI resourceIri, IRI requestIri)
Contraction
contraction(OWLNamedIndividual resource, OWLNamedIndividual request)
Performs the Concept Contraction non-standard matchmaking task, comparing a requested semantic profile with a supplied resource.Composition
covering(SemanticDescription request)
This method is the same ascovering(OWLNamedIndividual)
, with the difference that the provided description doesn't need to belong to an individual loaded into the reasoner.Composition
covering(IRI iri)
Refer tocovering(OWLNamedIndividual)
.Composition
covering(OWLNamedIndividual request)
Performs the Concept Covering non-standard matchmaking task, comparing a requested semantic profile with available resources.SemanticDescription
difference(SemanticDescription lhs, SemanticDescription rhs)
This method is the same asdifference(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.SemanticDescription
difference(IRI lhs, IRI rhs)
SemanticDescription
difference(OWLNamedIndividual lhs, OWLNamedIndividual rhs)
Computes the Concept Difference between two individuals.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.SemanticDescription
fold(SemanticDescription description)
Folds the specified semantic description.Stream<EntityDescription<OWLNamedIndividual>>
getABox()
Returns the ABox loaded into this reasoner.Node<OWLClass>
getBottomClassNode()
Gets theNode
corresponding to the bottom node (containingowl:Nothing
) in the class hierarchy.Node<OWLDataProperty>
getBottomDataPropertyNode()
Gets theNode
corresponding to the bottom node (containingowl:bottomDataProperty
) in the data property hierarchy.Node<OWLObjectPropertyExpression>
getBottomObjectPropertyNode()
Gets theNode
corresponding to the bottom node (containingowl:bottomObjectProperty
) in the object property hierarchy.BufferingMode
getBufferingMode()
Gets the buffering mode of this reasoner.EntityDescription<OWLClass>
getClassDescription(IRI iri)
Refer togetDescription(OWLClass)
.DataFactory
getDataFactory()
Returns the data factory 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.Set<OWLLiteral>
getDataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe)
Gets the data property values for the specified individual and data property expression.EntityDescription<OWLClass>
getDescription(OWLClass owlClass)
Returns the normalized semantic description of the specified class.EntityDescription<OWLNamedIndividual>
getDescription(OWLNamedIndividual individual)
Returns the normalized semantic description of the specified individual.NodeSet<OWLNamedIndividual>
getDifferentIndividuals(OWLNamedIndividual ind)
Gets the individuals which are entailed to be different from the specified individual.List<OWLClass>
getDirectSubClasses(OWLClass owlClass)
Retrieves the direct subclasses of the specified class.List<OWLClass>
getDirectSuperClasses(OWLClass owlClass)
Retrieves the direct superclasses of the specified class.NodeSet<OWLClass>
getDisjointClasses(OWLClassExpression ce)
Gets the classes that are disjoint with the specified class expressionce
.NodeSet<OWLDataProperty>
getDisjointDataProperties(OWLDataPropertyExpression pe)
Gets the data properties that are disjoint with the specified data property expressionpe
.NodeSet<OWLObjectPropertyExpression>
getDisjointObjectProperties(OWLObjectPropertyExpression pe)
Gets the simplified object property expressions that are disjoint with the specified object property expressionpe
.Node<OWLClass>
getEquivalentClasses(OWLClassExpression ce)
Gets the set of named classes that are equivalent to the specified class expression with respect to the set of reasoner axioms.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<OWLObjectPropertyExpression>
getEquivalentObjectProperties(OWLObjectPropertyExpression pe)
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.FreshEntityPolicy
getFreshEntityPolicy()
Gets the Fresh Entity Policy in use by this reasoner.EntityDescription<OWLNamedIndividual>
getIndividualDescription(IRI iri)
Refer togetDescription(OWLNamedIndividual)
.IndividualNodeSetPolicy
getIndividualNodeSetPolicy()
Gets the IndividualNodeSetPolicy in use by this reasoner.Stream<EntityDescription<OWLNamedIndividual>>
getIndividuals(IndividualType type)
Retrieves all the individuals of a specified type.NodeSet<OWLNamedIndividual>
getInstances(OWLClassExpression ce, boolean direct)
Gets the individuals which are instances of the specified class expression.Node<OWLObjectPropertyExpression>
getInverseObjectProperties(OWLObjectPropertyExpression pe)
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.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.OWLOntology
getOntology()
Returns the (root) ontology loaded into the reasoner.OWLDataFactory
getOWLDataFactory()
Returns the OWL data factory of this reasoner.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.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.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.Set<InferenceType>
getPrecomputableInferenceTypes()
Returns the set ofInferenceType
s that are precomputable by reasoner.String
getReasonerInfo()
Gets comprehensive reasoner info (multiline).String
getReasonerName()
Gets the name of this reasoner.Version
getReasonerVersion()
Gets the version of this reasoner.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<OWLObjectPropertyExpression>
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.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<OWLObjectPropertyExpression>
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.Stream<EntityDescription<OWLClass>>
getTBox()
Returns the TBox loaded into this reasoner.long
getTimeOut()
Gets the time out (in milliseconds) for the most basic reasoning operations.Node<OWLClass>
getTopClassNode()
Gets theNode
corresponding to the top node (containingowl:Thing
) in the class hierarchy.Node<OWLDataProperty>
getTopDataPropertyNode()
Gets theNode
corresponding to the top node (containingowl:topDataProperty
) in the data property hierarchy.Node<OWLObjectPropertyExpression>
getTopObjectPropertyNode()
Gets theNode
corresponding to the top node (containingowl:topObjectProperty
) in the object property hierarchy.NodeSet<OWLClass>
getTypes(OWLNamedIndividual ind, boolean direct)
Gets the named classes which are (potentially direct) types of the specified named individual.Node<OWLClass>
getUnsatisfiableClasses()
A convenience method that obtains the classes in the signature of the root ontology that are unsatisfiable.void
interrupt()
Asks the reasoner to interrupt what it is currently doing.boolean
isCoherent()
Checks the coherence of the root ontology.boolean
isCompatible(SemanticDescription resource, SemanticDescription request)
This method is the same asisCompatible(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.boolean
isCompatible(IRI resourceIri, IRI requestIri)
boolean
isCompatible(OWLNamedIndividual resource, OWLNamedIndividual request)
Determines if a supplied resource and a requested semantic profile are compatible (that is, whether the semantic description of the resource does not contain any information in conflict with the request).boolean
isConsistent()
Determines if the set of reasoner axioms is consistent.boolean
isConsistent(IRI iri)
Refer toisConsistent(OWLNamedIndividual)
.boolean
isConsistent(OWLNamedIndividual individual)
Checks whether the given individual 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
isInstance(OWLNamedIndividual individual, OWLClass owlClass)
Checks whether the specified individual is an instance of a certain class.boolean
isPrecomputed(InferenceType inferenceType)
Determines if a specific set of inferences have been precomputed.boolean
isSatisfiable(SemanticDescription description)
Determines if the specified description is satisfiable with respect to the root ontology.boolean
isSatisfiable(OWLClassExpression ce)
A convenience method that determines if the specified class expression is satisfiable with respect to the reasoner axioms.boolean
isSubClass(IRI subClassIri, IRI superClassIri)
Refer toisSubClass(OWLClass, OWLClass)
.boolean
isSubClass(OWLClass subClass, OWLClass superClass)
Checks whether a subclass relation holds between two classes.boolean
isSubsumed(SemanticDescription subsumed, SemanticDescription subsumer)
This method is the same asisSubsumed(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.boolean
isSubsumed(IRI subsumedIri, IRI subsumerIri)
boolean
isSubsumed(OWLNamedIndividual subsumed, OWLNamedIndividual subsumer)
Determines if a subsumption relation holds between two semantic profiles (that is, if one is more general than the other), in which case they are referred to as subsumer and subsumed.Reasoner
loadIndividual(EntityDescription<OWLNamedIndividual> description, IndividualType type)
Loads the specified individual into the reasoner as either a resource or a request.Reasoner
loadIndividuals(String ontologyPath, IndividualType type)
Reasoner
loadIndividuals(OWLOntology ontology, IndividualType type)
Loads the individuals present in the signature of the specified ontology.double
maxPenalty(SemanticDescription description)
This method is the same asmaxPenalty(OWLNamedIndividual)
, with the difference that the provided description doesn't need to belong to an individual loaded into the reasoner.double
maxPenalty(IRI iri)
Refer tomaxPenalty(OWLNamedIndividual)
.double
maxPenalty(OWLNamedIndividual individual)
Computes the maximum penalty associated with the specified individual.SemanticDescription
normalize(SemanticDescription description)
Performs the unfolding and CNF normalization of the specified semantic description.void
precomputeInferences(InferenceType... inferenceTypes)
Asks the reasoner to precompute certain types of inferences.Reasoner
tellIndividualType(IRI iri, IndividualType type)
Reasoner
tellIndividualType(OWLNamedIndividual individual, IndividualType type)
Tells the reasoner that the individual is of the specified type.Reasoner
unloadIndividual(IRI iri)
Refer tounloadIndividual(OWLNamedIndividual)
.Reasoner
unloadIndividual(OWLNamedIndividual individual)
Unloads the specified individual.Reasoner
unloadIndividuals(IndividualType type)
Unloads all the individuals of a given type.Reasoner
unloadIndividuals(OWLOntology ontology)
Unloads the individuals present in the signature of the specified ontology.
-
Method Details
-
loadIndividual
public Reasoner loadIndividual(EntityDescription<OWLNamedIndividual> description, IndividualType type)Loads the specified individual into the reasoner as either a resource or a request.- Parameters:
description
- Description of the individual to load.type
- Type of the individual to load (resource, request or both).- Returns:
- This reasoner.
-
loadIndividuals
Loads the individuals present in the signature of the specified ontology.- Parameters:
ontology
- Ontology containing the individuals.type
- Type of the loaded individuals (resource, request or both).- Returns:
- This reasoner.
-
loadIndividuals
public Reasoner loadIndividuals(String ontologyPath, IndividualType type) throws OWLOntologyCreationException- Parameters:
ontologyPath
- Path of the ontology.type
- Type of the individual (resource, request or both).- Returns:
- This reasoner.
- Throws:
OWLOntologyCreationException
- If the ontology cannot be created.
-
tellIndividualType
Tells the reasoner that the individual is of the specified type.- Parameters:
individual
- Individual whose type should be updated.type
- Type of the individual (resource, request or both).- Returns:
- This reasoner.
-
tellIndividualType
- Parameters:
iri
- IRI of the individual.type
- Type of the individual (resource, request or both).- Returns:
- This reasoner.
-
unloadIndividual
Unloads the specified individual.- Parameters:
individual
- Individual to unload.- Returns:
- This reasoner.
-
unloadIndividual
Refer tounloadIndividual(OWLNamedIndividual)
.- Parameters:
iri
- IRI of the individual.- Returns:
- This reasoner.
-
unloadIndividuals
Unloads the individuals present in the signature of the specified ontology.- Parameters:
ontology
- Ontology containing the individuals.- Returns:
- This reasoner.
-
unloadIndividuals
Unloads all the individuals of a given type.- Parameters:
type
- Type of the individuals to unload (resource, request or both).- Returns:
- This reasoner.
-
getOntology
Returns the (root) ontology loaded into the reasoner.- Returns:
- Ontology loaded into the reasoner.
-
getDataFactory
Returns the data factory of this reasoner.- Returns:
- DataFactory instance.
-
getOWLDataFactory
Returns the OWL data factory of this reasoner.- Returns:
- OWLDataFactory instance.
-
getTBox
Returns the TBox loaded into this reasoner.- Returns:
- The TBox.
-
getABox
Returns the ABox loaded into this reasoner.- Returns:
- The ABox.
-
getIndividuals
Retrieves all the individuals of a specified type.- Parameters:
type
- Type of individuals to retrieve (resource, request or both).- Returns:
- Individuals of the specified type.
-
getDescription
Returns the normalized semantic description of the specified class.- Parameters:
owlClass
- Class whose description should be retrieved.- Returns:
- Description of the specified class.
-
getDescription
Returns the normalized semantic description of the specified individual.- Parameters:
individual
- Individual whose description should be retrieved.- Returns:
- Description of the specified individual.
-
getClassDescription
Refer togetDescription(OWLClass)
.- Parameters:
iri
- IRI of the class.- Returns:
- Description of the specified class.
-
getIndividualDescription
Refer togetDescription(OWLNamedIndividual)
.- Parameters:
iri
- IRI of the individual.- Returns:
- Description of the specified individual.
-
classify
Computes the taxonomy of classes present in the root ontology.- Returns:
- This reasoner.
-
isCoherent
public boolean isCoherent()Checks the coherence of the root ontology.- Returns:
- True if the ontology is coherent, false otherwise.
- See Also:
- Moguillansky et al., IBERAMIA 2010.
-
normalize
Performs the unfolding and CNF normalization of the specified semantic description. The description is mutated in-place and returned.- Parameters:
description
- Semantic description to normalize.- Returns:
- Normalized description.
-
fold
Folds the specified semantic description. The description is mutated in-place and returned.- Parameters:
description
- Semantic description to fold.- Returns:
- Folded description.
-
isSubClass
Checks whether a subclass relation holds between two classes.- Parameters:
subClass
- Subclass.superClass
- Superclass.- Returns:
- True if the relation holds, false otherwise.
-
isSubClass
Refer toisSubClass(OWLClass, OWLClass)
.- Parameters:
subClassIri
- IRI of the subclass.superClassIri
- IRI of the superclass.- Returns:
- True if the relation holds, false otherwise.
-
getDirectSubClasses
Retrieves the direct subclasses of the specified class.- Parameters:
owlClass
- Class whose subclasses should be retrieved.- Returns:
- Direct subclasses.
-
getDirectSuperClasses
Retrieves the direct superclasses of the specified class.- Parameters:
owlClass
- Class whose superclasses should be retrieved.- Returns:
- Direct superclasses.
-
isConsistent
Checks whether the given individual is consistent.- Parameters:
individual
- Individual whose consistency should be checked.- Returns:
- True if the individual is consistent, false otherwise.
-
isConsistent
Refer toisConsistent(OWLNamedIndividual)
.- Parameters:
iri
- IRI of the individual.- Returns:
- True if the individual is consistent, false otherwise.
-
isSubsumed
Determines if a subsumption relation holds between two semantic profiles (that is, if one is more general than the other), in which case they are referred to as subsumer and subsumed. The profiles are OWL individuals previously loaded into the reasoner, either because they were present in the root ontology, or because they were loaded using theloadIndividuals(OWLOntology, IndividualType)
andloadIndividual(EntityDescription, IndividualType)
methods.If the subsumption relation holds, two conclusions can be drawn:
- The subsumer is more general than the subsumed, hence the former (usually a requested semantic profile) is satisfied by the latter (usually a supplied resource) in every aspect.
- The two elements involved in the relation are compatible.
If the relation does not hold,
abduction(OWLNamedIndividual, OWLNamedIndividual)
may be used to compute what should be hypothesized in the subsumed individual in order to completely satisfy the subsumer individual.- Parameters:
subsumed
- Subsumed element in the subsumption relation.subsumer
- Subsumer element in the subsumption relation.- Returns:
- True if the subsumption relation holds, false otherwise.
-
isSubsumed
- Parameters:
subsumedIri
- IRI of the subsumed individual.subsumerIri
- IRI of the subsumer individual.- Returns:
- True if the subsumption relation holds, false otherwise.
-
isSubsumed
This method is the same asisSubsumed(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.- Parameters:
subsumed
- Subsumed description.subsumer
- Subsumer description.- Returns:
- True if the subsumption relation holds, false otherwise.
-
isInstance
Checks whether the specified individual is an instance of a certain class.- Parameters:
individual
- Individual.owlClass
- Class.- Returns:
- True if the individual is an instance of the class, false otherwise.
- API Note:
- This is currently incomplete since the reasoner does not process the ABox.
-
isCompatible
Determines if a supplied resource and a requested semantic profile are compatible (that is, whether the semantic description of the resource does not contain any information in conflict with the request). Resource and request are OWL individuals previously loaded into the reasoner, either because they were present in the root ontology, or because they were loaded using theloadIndividuals(OWLOntology, IndividualType)
andloadIndividual(EntityDescription, IndividualType)
methods.If the compatibility relation between the two individuals holds, then they don't contain any conflicting part. If the relation does not hold,
contraction(OWLNamedIndividual, OWLNamedIndividual)
may be used to compute the conflicting part.- Parameters:
resource
- Resource individual.request
- Request individual.- Returns:
- True if the compatibility relation holds, false otherwise.
-
isCompatible
- Parameters:
resourceIri
- IRI of the resource.requestIri
- IRI of the request.- Returns:
- True if the compatibility relation holds, false otherwise.
-
isCompatible
This method is the same asisCompatible(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.- Parameters:
resource
- Resource description.request
- Request description.- Returns:
- True if the compatibility relation holds, false otherwise.
-
abduction
Performs the Concept Abduction non-standard matchmaking task, comparing a requested semantic profile with a supplied resource. Resource and request are OWL individuals previously loaded into the reasoner, either because they were present in the root ontology, or because they were loaded using theloadIndividuals(OWLOntology, IndividualType)
andloadIndividual(EntityDescription, IndividualType)
methods.- Parameters:
resource
- Resource.request
- Request.- Returns:
- Result of the abduction inference service.
- See Also:
- Ruta et al., WIAS 2011 (Section 4, Chapter 2) for a technical description of the Concept Abduction Problem.
-
abduction
- Parameters:
resourceIri
- IRI of the resource individual.requestIri
- IRI of the request individual.- Returns:
- Result of the abduction inference service.
-
abduction
This method is the same asabduction(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.- Parameters:
resource
- Resource description.request
- Request description.- Returns:
- Result of the abduction inference service.
-
bonus
Performs the Concept Bonus non-standard matchmaking task, comparing a requested semantic profile with a supplied resource. Resource and request are OWL individuals previously loaded into the reasoner, either because they were present in the root ontology, or because they were loaded using theloadIndividuals(OWLOntology, IndividualType)
andloadIndividual(EntityDescription, IndividualType)
methods.- Parameters:
resource
- Resource.request
- Request.- Returns:
- Result of the bonus inference service.
- See Also:
- Scioscia et al., SRLGIPD18 for a technical description of the Concept Bonus Problem.
-
bonus
- Parameters:
resourceIri
- IRI of the resource individual.requestIri
- IRI of the request individual.- Returns:
- Result of the bonus inference service.
-
bonus
This method is the same asbonus(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.- Parameters:
resource
- Resource description.request
- Request description.- Returns:
- Result of the bonus inference service.
-
contraction
Performs the Concept Contraction non-standard matchmaking task, comparing a requested semantic profile with a supplied resource. Resource and request are OWL individuals previously loaded into the reasoner, either because they were present in the root ontology, or because they were loaded using theloadIndividuals(OWLOntology, IndividualType)
andloadIndividual(EntityDescription, IndividualType)
methods.- Parameters:
resource
- Resource individual.request
- Request individual.- Returns:
- Result of the contraction inference service.
- See Also:
- Ruta et al., WIAS 2011 (Section 4, Chapter 2) for a technical description of the Concept Contraction Problem.
-
contraction
- Parameters:
resourceIri
- IRI of the resource individual.requestIri
- IRI of the request individual.- Returns:
- Result of the contraction inference service.
-
contraction
This method is the same ascontraction(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.- Parameters:
resource
- Resource description.request
- Request description.- Returns:
- Result of the contraction inference service.
-
covering
Performs the Concept Covering non-standard matchmaking task, comparing a requested semantic profile with available resources. Request is an OWL individuals previously loaded into the reasoner using theloadIndividuals(OWLOntology, IndividualType)
andloadIndividual(EntityDescription, IndividualType)
methods.- Parameters:
request
- Request.- Returns:
- Result of the covering inference service.
- See Also:
- Di Noia et al., Concept Covering for a technical description of the Concept Covering Problem.
-
covering
Refer tocovering(OWLNamedIndividual)
.- Parameters:
iri
- IRI of the request individual.- Returns:
- Result of the covering inference service.
-
covering
This method is the same ascovering(OWLNamedIndividual)
, with the difference that the provided description doesn't need to belong to an individual loaded into the reasoner.- Parameters:
request
- Request description.- Returns:
- Result of the covering inference service.
-
isSatisfiable
Determines if the specified description is satisfiable with respect to the root ontology.- Parameters:
description
- Description whose satisfiability should be checked.- Returns:
- True if the description is satisfiable, false otherwise.
-
difference
Computes the Concept Difference between two individuals.- Parameters:
lhs
- LHS of the difference.rhs
- RHS of the difference.- Returns:
- Result of the difference task.
-
difference
- Parameters:
lhs
- IRI of the LHS individual.rhs
- IRI of the RHS individual.- Returns:
- Result of the difference task.
-
difference
This method is the same asdifference(OWLNamedIndividual, OWLNamedIndividual)
, with the difference that the provided descriptions don't need to belong to individuals loaded into the reasoner.- Parameters:
lhs
- LHS of the difference.rhs
- RHS of the difference.- Returns:
- Result of the difference task.
-
maxPenalty
Computes the maximum penalty associated with the specified individual.- Parameters:
individual
- Individual.- Returns:
- Maximum penalty.
-
maxPenalty
Refer tomaxPenalty(OWLNamedIndividual)
.- Parameters:
iri
- IRI of the individual.- Returns:
- Maximum penalty.
-
maxPenalty
This method is the same asmaxPenalty(OWLNamedIndividual)
, with the difference that the provided description doesn't need to belong to an individual loaded into the reasoner.- Parameters:
description
- Semantic description.- Returns:
- Maximum penalty.
-
getReasonerInfo
Gets comprehensive reasoner info (multiline).- Returns:
- A string containing info about this reasoner.
-
getReasonerName
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the name of this reasoner.- Specified by:
getReasonerName
in interfaceOWLReasoner
- Returns:
- A string that represents the name of this reasoner.
-
getReasonerVersion
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the version of this reasoner.- Specified by:
getReasonerVersion
in interfaceOWLReasoner
- Returns:
- The version of this reasoner. Not
null
.
-
getBufferingMode
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the buffering mode of this reasoner.- Specified by:
getBufferingMode
in interfaceOWLReasoner
- Returns:
- The buffering mode of this reasoner.
-
flush
public void flush()Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
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. If the reasoner buffering mode isBufferingMode.NON_BUFFERING
then this method will have no effect.- Specified by:
flush
in interfaceOWLReasoner
-
getPendingChanges
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
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 theOWLReasoner.flush()
method is called the set of pending changes will be empty.- Specified by:
getPendingChanges
in interfaceOWLReasoner
- Returns:
- A set of changes. Note that the changes represent the raw changes as applied to the imports closure of the root ontology.
-
getPendingAxiomAdditions
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
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. If the buffering mode isBufferingMode.NON_BUFFERING
then there will be no pending axiom additions.- Specified by:
getPendingAxiomAdditions
in interfaceOWLReasoner
- Returns:
- The set of axioms that need to added to the reasoner to the reasoner to synchronise it with the root ontology imports closure.
-
getPendingAxiomRemovals
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
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. If the buffering mode isBufferingMode.NON_BUFFERING
then there will be no pending axiom additions.- Specified by:
getPendingAxiomRemovals
in interfaceOWLReasoner
- Returns:
- The set of axioms that need to added to the reasoner to the reasoner to synchronise it with the root ontology imports closure.
-
getRootOntology
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the "root" ontology that is loaded into this reasoner. The reasoner takes into account the axioms in this ontology and its imports closure, plus the axioms returned byOWLReasoner.getPendingAxiomRemovals()
, minus the axioms returned byOWLReasoner.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.- Specified by:
getRootOntology
in interfaceOWLReasoner
- Returns:
- The root ontology that is loaded into the reasoner.
-
interrupt
public void interrupt()Description copied from interface:org.semanticweb.owlapi.reasoner.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 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.- Specified by:
interrupt
in interfaceOWLReasoner
-
precomputeInferences
Description copied from interface:org.semanticweb.owlapi.reasoner.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.- Specified by:
precomputeInferences
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Determines if a specific set of inferences have been precomputed.- Specified by:
isPrecomputed
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Returns the set ofInferenceType
s that are precomputable by reasoner.- Specified by:
getPrecomputableInferenceTypes
in interfaceOWLReasoner
- Returns:
- A set of
InferenceType
s that can be precomputed by this reasoner.
-
isConsistent
public boolean isConsistent()Description copied from interface:org.semanticweb.owlapi.reasoner.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.- Specified by:
isConsistent
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
A convenience method that determines if the specified class expression is satisfiable with respect to the reasoner axioms.- Specified by:
isSatisfiable
in interfaceOWLReasoner
- Parameters:
ce
- 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.- Throws:
ClassExpressionNotInProfileException
- ifclassExpression
is not within the profile that is supported by this reasoner.
-
getUnsatisfiableClasses
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
A convenience method that obtains the classes in the signature of the root ontology that are unsatisfiable.- Specified by:
getUnsatisfiableClasses
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
A convenience method that determines if the specified axiom is entailed by the set of reasoner axioms.- Specified by:
isEntailed
in interfaceOWLReasoner
- 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.- Throws:
UnsupportedEntailmentTypeException
- if the reasoner cannot perform a check to see if the specified axiom is entailed- See Also:
OWLReasoner.isEntailmentCheckingSupported(org.semanticweb.owlapi.model.AxiomType)
-
isEntailed
public boolean isEntailed(Set<? extends OWLAxiom> axioms) throws UnsupportedEntailmentTypeExceptionDescription copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Determines if the specified set of axioms is entailed by the reasoner axioms.- Specified by:
isEntailed
in interfaceOWLReasoner
- 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
.- Throws:
UnsupportedEntailmentTypeException
- if the reasoner cannot perform a check to see if the specified axiom is entailed- See Also:
OWLReasoner.isEntailmentCheckingSupported(org.semanticweb.owlapi.model.AxiomType)
-
isEntailmentCheckingSupported
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Determines if entailment checking for the specified axiom type is supported.- Specified by:
isEntailmentCheckingSupported
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets theNode
corresponding to the top node (containingowl:Thing
) in the class hierarchy.- Specified by:
getTopClassNode
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets theNode
corresponding to the bottom node (containingowl:Nothing
) in the class hierarchy.- Specified by:
getBottomClassNode
in interfaceOWLReasoner
- 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
public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) throws ClassExpressionNotInProfileExceptionDescription copied from interface:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getSubClasses
in interfaceOWLReasoner
- 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
, 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. - Throws:
ClassExpressionNotInProfileException
- ifclassExpression
is not within the profile that is supported by this reasoner.
-
getSuperClasses
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws ClassExpressionNotInProfileExceptionDescription copied from interface:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getSuperClasses
in interfaceOWLReasoner
- 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
, 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. - Throws:
ClassExpressionNotInProfileException
- ifclassExpression
is not within the profile that is supported by this reasoner.
-
getEquivalentClasses
public Node<OWLClass> getEquivalentClasses(OWLClassExpression ce) throws ClassExpressionNotInProfileExceptionDescription copied from interface:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getEquivalentClasses
in interfaceOWLReasoner
- 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
. - Throws:
ClassExpressionNotInProfileException
- ifclassExpression
is not within the profile that is supported by this reasoner.
-
getDisjointClasses
public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce) throws ClassExpressionNotInProfileExceptionDescription copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the classes that are disjoint with the specified class expressionce
. The classes are returned as aNodeSet
.- Specified by:
getDisjointClasses
in interfaceOWLReasoner
- 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))
. - Throws:
ClassExpressionNotInProfileException
- ifclassExpression
is not within the profile that is supported by this reasoner.
-
getTopObjectPropertyNode
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets theNode
corresponding to the top node (containingowl:topObjectProperty
) in the object property hierarchy.- Specified by:
getTopObjectPropertyNode
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets theNode
corresponding to the bottom node (containingowl:bottomObjectProperty
) in the object property hierarchy.- Specified by:
getBottomObjectPropertyNode
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getSubObjectProperties
in interfaceOWLReasoner
- 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
, 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getSuperObjectProperties
in interfaceOWLReasoner
- 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
, 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getEquivalentObjectProperties
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the simplified object property expressions that are disjoint with the specified object property expressionpe
. The object properties are returned as aNodeSet
.- Specified by:
getDisjointObjectProperties
in interfaceOWLReasoner
- 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
public Node<OWLObjectPropertyExpression> getInverseObjectProperties(OWLObjectPropertyExpression pe)Description copied from interface:org.semanticweb.owlapi.reasoner.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
- Specified by:
getInverseObjectProperties
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getObjectPropertyDomains
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getObjectPropertyRanges
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets theNode
corresponding to the top node (containingowl:topDataProperty
) in the data property hierarchy.- Specified by:
getTopDataPropertyNode
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets theNode
corresponding to the bottom node (containingowl:bottomDataProperty
) in the data property hierarchy.- Specified by:
getBottomDataPropertyNode
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getSubDataProperties
in interfaceOWLReasoner
- 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
, 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getSuperDataProperties
in interfaceOWLReasoner
- 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
, 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getEquivalentDataProperties
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the data properties that are disjoint with the specified data property expressionpe
. The data properties are returned as aNodeSet
.- Specified by:
getDisjointDataProperties
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.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
.- Specified by:
getDataPropertyDomains
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the named classes which are (potentially direct) types of the specified named individual. The classes are returned as aNodeSet
.- Specified by:
getTypes
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the individuals which are instances of the specified class expression. The individuals are returned a aNodeSet
.- Specified by:
getInstances
in interfaceOWLReasoner
- 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:
IndividualNodeSetPolicy
-
getObjectPropertyValues
public NodeSet<OWLNamedIndividual> getObjectPropertyValues(OWLNamedIndividual ind, OWLObjectPropertyExpression pe)Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the object property values for the specified individual and object property expression. The individuals are returned as aNodeSet
.- Specified by:
getObjectPropertyValues
in interfaceOWLReasoner
- 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:
IndividualNodeSetPolicy
-
getDataPropertyValues
Description copied from interface:org.semanticweb.owlapi.reasoner.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.- Specified by:
getDataPropertyValues
in interfaceOWLReasoner
- 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:
IndividualNodeSetPolicy
-
getSameIndividuals
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the individuals that are the same as the specified individual.- Specified by:
getSameIndividuals
in interfaceOWLReasoner
- 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:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the individuals which are entailed to be different from the specified individual. The individuals are returned as aNodeSet
.- Specified by:
getDifferentIndividuals
in interfaceOWLReasoner
- 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)
.
-
getTimeOut
public long getTimeOut()Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the time out (in milliseconds) 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 aTimeOutException
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 theOWLReasoner.interrupt()
method.- Specified by:
getTimeOut
in interfaceOWLReasoner
- Returns:
- The time out in milliseconds for basic reasoner operation. By
default this is the value of
Long.MAX_VALUE
.
-
getFreshEntityPolicy
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the Fresh Entity Policy in use by this reasoner. The policy is set at reasoner creation time.- Specified by:
getFreshEntityPolicy
in interfaceOWLReasoner
- Returns:
- The policy.
-
getIndividualNodeSetPolicy
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Gets the IndividualNodeSetPolicy in use by this reasoner. The policy is set at reasoner creation time.- Specified by:
getIndividualNodeSetPolicy
in interfaceOWLReasoner
- Returns:
- The policy.
-
dispose
public void dispose()Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasoner
Disposes of this reasoner. This frees up any resources used by the reasoner and detaches the reasoner as anOWLOntologyChangeListener
from theOWLOntologyManager
that manages the ontologies contained within the reasoner.- Specified by:
dispose
in interfaceOWLReasoner
-