org.mindswap.pellet.owlapi
Class Reasoner

java.lang.Object
  extended by org.mindswap.pellet.owlapi.Reasoner
All Implemented Interfaces:
org.semanticweb.owl.inference.OWLClassReasoner, org.semanticweb.owl.inference.OWLConsistencyChecker, org.semanticweb.owl.inference.OWLIndividualReasoner, org.semanticweb.owl.inference.OWLPropertyReasoner, org.semanticweb.owl.inference.OWLReasoner, org.semanticweb.owl.inference.OWLReasonerBase, org.semanticweb.owl.inference.OWLSatisfiabilityChecker, org.semanticweb.owl.model.OWLOntologyChangeListener

public class Reasoner
extends java.lang.Object
implements org.semanticweb.owl.inference.OWLReasoner, org.semanticweb.owl.model.OWLOntologyChangeListener

Title:

Description:

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Field Summary
static java.util.logging.Logger log
           
 
Constructor Summary
Reasoner(org.semanticweb.owl.model.OWLOntologyManager manager)
          Create an empty reasoner.
Reasoner(org.semanticweb.owl.model.OWLOntologyManager manager, KnowledgeBase kb)
          Create a reasoner instance with the given KB.
 
Method Summary
 void classify()
           
 void clearOntologies()
           
 org.semanticweb.owl.model.OWLAxiom convertAxiom(aterm.ATermAppl term)
          Convert an axiom represented in ATermAppl format to OWLAxiom
 java.util.Set<org.semanticweb.owl.model.OWLAxiom> convertAxioms(java.util.Set<aterm.ATermAppl> terms)
          Convert a set of axioms represented in ATermAppl format to a set of OWLAxioms
 void dispose()
           
 java.util.Set<org.semanticweb.owl.model.OWLClass> getAllEquivalentClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getAncestorClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getAncestorProperties(org.semanticweb.owl.model.OWLDataProperty p)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getAncestorProperties(org.semanticweb.owl.model.OWLObjectProperty p)
           
 java.util.Set<org.semanticweb.owl.model.OWLClass> getClasses()
          Return the set of all named classes defined in any of the ontologies loaded in the reasoner.
 java.util.Set<org.semanticweb.owl.model.OWLClass> getComplementClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<org.semanticweb.owl.model.OWLDataProperty> getDataProperties()
           
 java.util.Map<org.semanticweb.owl.model.OWLIndividual,java.util.Set<org.semanticweb.owl.model.OWLConstant>> getDataPropertyAssertions(org.semanticweb.owl.model.OWLDataProperty prop)
           
 java.util.Map<org.semanticweb.owl.model.OWLDataProperty,java.util.Set<org.semanticweb.owl.model.OWLConstant>> getDataPropertyRelationships(org.semanticweb.owl.model.OWLIndividual individual)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getDescendantClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getDescendantProperties(org.semanticweb.owl.model.OWLDataProperty p)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getDescendantProperties(org.semanticweb.owl.model.OWLObjectProperty p)
           
 java.util.Set<org.semanticweb.owl.model.OWLIndividual> getDifferentFromIndividuals(org.semanticweb.owl.model.OWLIndividual ind)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getDisjointClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDescription>> getDomains(org.semanticweb.owl.model.OWLDataProperty p)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDescription>> getDomains(org.semanticweb.owl.model.OWLObjectProperty p)
           
 java.util.Set<org.semanticweb.owl.model.OWLClass> getEquivalentClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<org.semanticweb.owl.model.OWLDataProperty> getEquivalentProperties(org.semanticweb.owl.model.OWLDataProperty p)
           
 java.util.Set<org.semanticweb.owl.model.OWLObjectProperty> getEquivalentProperties(org.semanticweb.owl.model.OWLObjectProperty p)
           
 java.util.Set<org.semanticweb.owl.model.OWLAxiom> getExplanation()
          Returns the explanation for the last performed reasoning operation.
 java.util.Set<org.semanticweb.owl.model.OWLClass> getInconsistentClasses()
           
 java.util.Set<org.semanticweb.owl.model.OWLIndividual> getIndividuals()
          Return the set of all individuals defined in any of the ontologies loaded in the reasoner.
 java.util.Set<org.semanticweb.owl.model.OWLIndividual> getIndividuals(org.semanticweb.owl.model.OWLDescription clsC, boolean direct)
          Returns all or only direct instances of a concept expression
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getInverseProperties(org.semanticweb.owl.model.OWLObjectProperty prop)
           
 KnowledgeBase getKB()
           
 java.util.Set<org.semanticweb.owl.model.OWLOntology> getLoadedOntologies()
           
 PelletLoader getLoader()
           
 org.semanticweb.owl.model.OWLOntologyManager getManager()
           
 java.util.Set<org.semanticweb.owl.model.OWLObjectProperty> getObjectProperties()
           
 java.util.Map<org.semanticweb.owl.model.OWLIndividual,java.util.Set<org.semanticweb.owl.model.OWLIndividual>> getObjectPropertyAssertions(org.semanticweb.owl.model.OWLObjectProperty prop)
           
 java.util.Map<org.semanticweb.owl.model.OWLObjectProperty,java.util.Set<org.semanticweb.owl.model.OWLIndividual>> getObjectPropertyRelationships(org.semanticweb.owl.model.OWLIndividual individual)
           
 java.util.Set<org.semanticweb.owl.model.OWLProperty<?,?>> getProperties()
          Return all the object and data properties defined in the loaded ontologies
 java.util.Set<org.semanticweb.owl.model.OWLDataRange> getRanges(org.semanticweb.owl.model.OWLDataProperty p)
           
 java.util.Set<org.semanticweb.owl.model.OWLDescription> getRanges(org.semanticweb.owl.model.OWLObjectProperty p)
           
 java.util.Set<? extends org.semanticweb.owl.model.OWLObject> getRelated(org.semanticweb.owl.model.OWLIndividual ind, org.semanticweb.owl.model.OWLPropertyExpression<?,?> prop)
           
 org.semanticweb.owl.model.OWLIndividual getRelatedIndividual(org.semanticweb.owl.model.OWLIndividual subject, org.semanticweb.owl.model.OWLObjectPropertyExpression property)
           
 java.util.Set<org.semanticweb.owl.model.OWLIndividual> getRelatedIndividuals(org.semanticweb.owl.model.OWLIndividual subject, org.semanticweb.owl.model.OWLObjectPropertyExpression property)
           
 org.semanticweb.owl.model.OWLConstant getRelatedValue(org.semanticweb.owl.model.OWLIndividual subject, org.semanticweb.owl.model.OWLDataPropertyExpression property)
           
 java.util.Set<org.semanticweb.owl.model.OWLConstant> getRelatedValues(org.semanticweb.owl.model.OWLIndividual subject, org.semanticweb.owl.model.OWLDataPropertyExpression property)
           
 java.util.Set<org.semanticweb.owl.model.OWLIndividual> getSameAsIndividuals(org.semanticweb.owl.model.OWLIndividual ind)
          Return a set of sameAs individuals given a specific individual based on axioms in the ontology
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getSubClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getSubProperties(org.semanticweb.owl.model.OWLDataProperty p)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getSubProperties(org.semanticweb.owl.model.OWLObjectProperty p)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getSuperClasses(org.semanticweb.owl.model.OWLDescription c)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getSuperProperties(org.semanticweb.owl.model.OWLDataProperty p)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getSuperProperties(org.semanticweb.owl.model.OWLObjectProperty p)
           
 org.semanticweb.owl.model.OWLClass getType(org.semanticweb.owl.model.OWLIndividual ind)
          Return the named class that this individual is a direct type of.
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getTypes(org.semanticweb.owl.model.OWLIndividual individual)
           
 java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getTypes(org.semanticweb.owl.model.OWLIndividual ind, boolean direct)
          Returns all the named classes that this individual belongs.
 boolean hasDataPropertyRelationship(org.semanticweb.owl.model.OWLIndividual subject, org.semanticweb.owl.model.OWLDataPropertyExpression property, org.semanticweb.owl.model.OWLConstant object)
           
 boolean hasDomain(org.semanticweb.owl.model.OWLDataProperty p, org.semanticweb.owl.model.OWLDescription c)
           
 boolean hasDomain(org.semanticweb.owl.model.OWLObjectProperty p, org.semanticweb.owl.model.OWLDescription c)
           
 boolean hasObjectPropertyRelationship(org.semanticweb.owl.model.OWLIndividual subject, org.semanticweb.owl.model.OWLObjectPropertyExpression property, org.semanticweb.owl.model.OWLIndividual object)
           
 boolean hasRange(org.semanticweb.owl.model.OWLDataProperty p, org.semanticweb.owl.model.OWLDataRange d)
           
 boolean hasRange(org.semanticweb.owl.model.OWLObjectProperty p, org.semanticweb.owl.model.OWLDescription c)
           
 boolean hasType(org.semanticweb.owl.model.OWLIndividual individual, org.semanticweb.owl.model.OWLDescription type)
          Checks if the given individual is an instance of the given type
 boolean hasType(org.semanticweb.owl.model.OWLIndividual individual, org.semanticweb.owl.model.OWLDescription type, boolean direct)
          Checks if the given individual is a direct or indirect instance of the given type
 boolean isAntiSymmetric(org.semanticweb.owl.model.OWLObjectProperty p)
           
 boolean isClassified()
           
 boolean isComplementOf(org.semanticweb.owl.model.OWLDescription c1, org.semanticweb.owl.model.OWLDescription c2)
           
 boolean isConsistent()
          Returns true if the loaded ontology is consistent.
 boolean isConsistent(org.semanticweb.owl.model.OWLDescription d)
          Deprecated. Use isSatisfiable(OWLDescription) instead
 boolean isConsistent(org.semanticweb.owl.model.OWLOntology ontology)
           
 boolean isDefined(org.semanticweb.owl.model.OWLClass cls)
           
 boolean isDefined(org.semanticweb.owl.model.OWLDataProperty prop)
           
 boolean isDefined(org.semanticweb.owl.model.OWLIndividual ind)
           
 boolean isDefined(org.semanticweb.owl.model.OWLObjectProperty prop)
           
 boolean isDifferentFrom(org.semanticweb.owl.model.OWLIndividual ind1, org.semanticweb.owl.model.OWLIndividual ind2)
          Test if two individuals are owl:DifferentFrom each other.
 boolean isDisjointWith(org.semanticweb.owl.model.OWLDataProperty p1, org.semanticweb.owl.model.OWLDataProperty p2)
           
 boolean isDisjointWith(org.semanticweb.owl.model.OWLDescription c1, org.semanticweb.owl.model.OWLDescription c2)
           
 boolean isDisjointWith(org.semanticweb.owl.model.OWLObjectProperty p1, org.semanticweb.owl.model.OWLObjectProperty p2)
           
 boolean isEntailed(org.semanticweb.owl.model.OWLAxiom axiom)
           
 boolean isEntailed(org.semanticweb.owl.model.OWLOntology ont)
           
 boolean isEntailed(java.util.Set<? extends org.semanticweb.owl.model.OWLAxiom> axioms)
           
 boolean isEquivalentClass(org.semanticweb.owl.model.OWLDescription c1, org.semanticweb.owl.model.OWLDescription c2)
           
 boolean isEquivalentProperty(org.semanticweb.owl.model.OWLDataProperty p1, org.semanticweb.owl.model.OWLDataProperty p2)
           
 boolean isEquivalentProperty(org.semanticweb.owl.model.OWLObjectProperty p1, org.semanticweb.owl.model.OWLObjectProperty p2)
           
 boolean isFunctional(org.semanticweb.owl.model.OWLDataProperty p)
           
 boolean isFunctional(org.semanticweb.owl.model.OWLObjectProperty p)
           
 boolean isInverseFunctional(org.semanticweb.owl.model.OWLObjectProperty p)
           
 boolean isInverseOf(org.semanticweb.owl.model.OWLObjectProperty p1, org.semanticweb.owl.model.OWLObjectProperty p2)
           
 boolean isIrreflexive(org.semanticweb.owl.model.OWLObjectProperty p)
           
 boolean isRealised()
           
 boolean isReflexive(org.semanticweb.owl.model.OWLObjectProperty p)
           
 boolean isSameAs(org.semanticweb.owl.model.OWLIndividual ind1, org.semanticweb.owl.model.OWLIndividual ind2)
          Test if two individuals are owl:DifferentFrom each other.
 boolean isSatisfiable(org.semanticweb.owl.model.OWLDescription d)
          Returns true if the given class is satisfiable.
 boolean isSubClassOf(org.semanticweb.owl.model.OWLDescription c1, org.semanticweb.owl.model.OWLDescription c2)
           
 boolean isSubPropertyOf(org.semanticweb.owl.model.OWLDataProperty c1, org.semanticweb.owl.model.OWLDataProperty c2)
           
 boolean isSubPropertyOf(org.semanticweb.owl.model.OWLObjectProperty c1, org.semanticweb.owl.model.OWLObjectProperty c2)
           
 boolean isSubTypeOf(org.semanticweb.owl.model.OWLDataType d1, org.semanticweb.owl.model.OWLDataType d2)
           
 boolean isSymmetric(org.semanticweb.owl.model.OWLObjectProperty p)
           
 boolean isTransitive(org.semanticweb.owl.model.OWLObjectProperty p)
           
 void loadOntologies(java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
           
 void loadOntology(org.semanticweb.owl.model.OWLOntology ontology)
           
 void ontologiesChanged(java.util.List<? extends org.semanticweb.owl.model.OWLOntologyChange> changes)
          Listens to ontology changes and refreshes the underlying KB.
 void realise()
           
 void refresh()
           
 void setOntology(org.semanticweb.owl.model.OWLOntology ontology)
          This will first clear the ontologies and then load the give ontology with is imports
 void unloadOntologies(java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
           
 void unloadOntology(org.semanticweb.owl.model.OWLOntology ontology)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static java.util.logging.Logger log
Constructor Detail

Reasoner

public Reasoner(org.semanticweb.owl.model.OWLOntologyManager manager)
Create an empty reasoner.

Parameters:
manager - ontology manager for this reasoner

Reasoner

public Reasoner(org.semanticweb.owl.model.OWLOntologyManager manager,
                KnowledgeBase kb)
Create a reasoner instance with the given KB. Any changes to the KB will effect this reasoner.

Parameters:
manager - ontology manager for this reasoner
kb - underlying KB instance
Method Detail

classify

public void classify()
Specified by:
classify in interface org.semanticweb.owl.inference.OWLReasonerBase

clearOntologies

public void clearOntologies()
Specified by:
clearOntologies in interface org.semanticweb.owl.inference.OWLReasonerBase

convertAxiom

public org.semanticweb.owl.model.OWLAxiom convertAxiom(aterm.ATermAppl term)
Convert an axiom represented in ATermAppl format to OWLAxiom

Parameters:
term - - axiom represented as an ATermAppl
Returns:
axiom as an OWLAxiom or null if conversion fails

convertAxioms

public java.util.Set<org.semanticweb.owl.model.OWLAxiom> convertAxioms(java.util.Set<aterm.ATermAppl> terms)
                                                                throws org.semanticweb.owl.model.OWLRuntimeException
Convert a set of axioms represented in ATermAppl format to a set of OWLAxioms

Parameters:
terms - - axioms represented as an ATermAppl
Returns:
axioms as OWLAxiom objects
Throws:
org.semanticweb.owl.model.OWLRuntimeException - - if conversion fails for one of the axioms

dispose

public void dispose()
Specified by:
dispose in interface org.semanticweb.owl.inference.OWLReasonerBase

getAncestorClasses

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getAncestorClasses(org.semanticweb.owl.model.OWLDescription c)
Specified by:
getAncestorClasses in interface org.semanticweb.owl.inference.OWLClassReasoner

getAncestorProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getAncestorProperties(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
getAncestorProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getAncestorProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getAncestorProperties(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
getAncestorProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getClasses

public java.util.Set<org.semanticweb.owl.model.OWLClass> getClasses()
Return the set of all named classes defined in any of the ontologies loaded in the reasoner.

Returns:
set of OWLClass objects

getComplementClasses

public java.util.Set<org.semanticweb.owl.model.OWLClass> getComplementClasses(org.semanticweb.owl.model.OWLDescription c)

getDataProperties

public java.util.Set<org.semanticweb.owl.model.OWLDataProperty> getDataProperties()

getDataPropertyRelationships

public java.util.Map<org.semanticweb.owl.model.OWLDataProperty,java.util.Set<org.semanticweb.owl.model.OWLConstant>> getDataPropertyRelationships(org.semanticweb.owl.model.OWLIndividual individual)
Specified by:
getDataPropertyRelationships in interface org.semanticweb.owl.inference.OWLIndividualReasoner

getDescendantClasses

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getDescendantClasses(org.semanticweb.owl.model.OWLDescription c)
Specified by:
getDescendantClasses in interface org.semanticweb.owl.inference.OWLClassReasoner

getDescendantProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getDescendantProperties(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
getDescendantProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getDescendantProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getDescendantProperties(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
getDescendantProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getDifferentFromIndividuals

public java.util.Set<org.semanticweb.owl.model.OWLIndividual> getDifferentFromIndividuals(org.semanticweb.owl.model.OWLIndividual ind)

getDisjointClasses

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getDisjointClasses(org.semanticweb.owl.model.OWLDescription c)

getDomains

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDescription>> getDomains(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
getDomains in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getDomains

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDescription>> getDomains(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
getDomains in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getEquivalentClasses

public java.util.Set<org.semanticweb.owl.model.OWLClass> getEquivalentClasses(org.semanticweb.owl.model.OWLDescription c)
Specified by:
getEquivalentClasses in interface org.semanticweb.owl.inference.OWLClassReasoner

getAllEquivalentClasses

public java.util.Set<org.semanticweb.owl.model.OWLClass> getAllEquivalentClasses(org.semanticweb.owl.model.OWLDescription c)

getEquivalentProperties

public java.util.Set<org.semanticweb.owl.model.OWLDataProperty> getEquivalentProperties(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
getEquivalentProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getEquivalentProperties

public java.util.Set<org.semanticweb.owl.model.OWLObjectProperty> getEquivalentProperties(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
getEquivalentProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getExplanation

public java.util.Set<org.semanticweb.owl.model.OWLAxiom> getExplanation()
                                                                 throws org.semanticweb.owl.model.OWLRuntimeException
Returns the explanation for the last performed reasoning operation. The last reasoning operation must be a boolean query that checks for a specific entailment, e.g. concept satisfiability, subclass entailment, etc. Note that, the options for turning on the explanation feature should be enabled to retrieve any explanation.

Returns:
the explanation as a set of axioms that cause the entailment
Throws:
org.semanticweb.owl.model.OWLRuntimeException - - if no explanation was generated or axioms in the explanation cannot be converted to OWLAxioms

getInconsistentClasses

public java.util.Set<org.semanticweb.owl.model.OWLClass> getInconsistentClasses()
Specified by:
getInconsistentClasses in interface org.semanticweb.owl.inference.OWLClassReasoner

getIndividuals

public java.util.Set<org.semanticweb.owl.model.OWLIndividual> getIndividuals()
Return the set of all individuals defined in any of the ontologies loaded in the reasoner.

Returns:
set of OWLIndividual objects

getIndividuals

public java.util.Set<org.semanticweb.owl.model.OWLIndividual> getIndividuals(org.semanticweb.owl.model.OWLDescription clsC,
                                                                             boolean direct)
Returns all or only direct instances of a concept expression

Specified by:
getIndividuals in interface org.semanticweb.owl.inference.OWLIndividualReasoner

getInverseProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getInverseProperties(org.semanticweb.owl.model.OWLObjectProperty prop)
Specified by:
getInverseProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getKB

public KnowledgeBase getKB()
Returns:
Returns the kb.

getLoadedOntologies

public java.util.Set<org.semanticweb.owl.model.OWLOntology> getLoadedOntologies()
Specified by:
getLoadedOntologies in interface org.semanticweb.owl.inference.OWLReasonerBase

getLoader

public PelletLoader getLoader()

getManager

public org.semanticweb.owl.model.OWLOntologyManager getManager()

getObjectProperties

public java.util.Set<org.semanticweb.owl.model.OWLObjectProperty> getObjectProperties()

getObjectPropertyRelationships

public java.util.Map<org.semanticweb.owl.model.OWLObjectProperty,java.util.Set<org.semanticweb.owl.model.OWLIndividual>> getObjectPropertyRelationships(org.semanticweb.owl.model.OWLIndividual individual)
Specified by:
getObjectPropertyRelationships in interface org.semanticweb.owl.inference.OWLIndividualReasoner

getProperties

public java.util.Set<org.semanticweb.owl.model.OWLProperty<?,?>> getProperties()
Return all the object and data properties defined in the loaded ontologies


getDataPropertyAssertions

public java.util.Map<org.semanticweb.owl.model.OWLIndividual,java.util.Set<org.semanticweb.owl.model.OWLConstant>> getDataPropertyAssertions(org.semanticweb.owl.model.OWLDataProperty prop)

getRelated

public java.util.Set<? extends org.semanticweb.owl.model.OWLObject> getRelated(org.semanticweb.owl.model.OWLIndividual ind,
                                                                               org.semanticweb.owl.model.OWLPropertyExpression<?,?> prop)

getObjectPropertyAssertions

public java.util.Map<org.semanticweb.owl.model.OWLIndividual,java.util.Set<org.semanticweb.owl.model.OWLIndividual>> getObjectPropertyAssertions(org.semanticweb.owl.model.OWLObjectProperty prop)

getRanges

public java.util.Set<org.semanticweb.owl.model.OWLDataRange> getRanges(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
getRanges in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getRanges

public java.util.Set<org.semanticweb.owl.model.OWLDescription> getRanges(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
getRanges in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getRelatedIndividual

public org.semanticweb.owl.model.OWLIndividual getRelatedIndividual(org.semanticweb.owl.model.OWLIndividual subject,
                                                                    org.semanticweb.owl.model.OWLObjectPropertyExpression property)

getRelatedIndividuals

public java.util.Set<org.semanticweb.owl.model.OWLIndividual> getRelatedIndividuals(org.semanticweb.owl.model.OWLIndividual subject,
                                                                                    org.semanticweb.owl.model.OWLObjectPropertyExpression property)
Specified by:
getRelatedIndividuals in interface org.semanticweb.owl.inference.OWLIndividualReasoner

getRelatedValue

public org.semanticweb.owl.model.OWLConstant getRelatedValue(org.semanticweb.owl.model.OWLIndividual subject,
                                                             org.semanticweb.owl.model.OWLDataPropertyExpression property)

getRelatedValues

public java.util.Set<org.semanticweb.owl.model.OWLConstant> getRelatedValues(org.semanticweb.owl.model.OWLIndividual subject,
                                                                             org.semanticweb.owl.model.OWLDataPropertyExpression property)
Specified by:
getRelatedValues in interface org.semanticweb.owl.inference.OWLIndividualReasoner

getSameAsIndividuals

public java.util.Set<org.semanticweb.owl.model.OWLIndividual> getSameAsIndividuals(org.semanticweb.owl.model.OWLIndividual ind)
Return a set of sameAs individuals given a specific individual based on axioms in the ontology

Parameters:
ind - - specific individual to test
Returns:
Throws:
org.semanticweb.owl.model.OWLException

getSubClasses

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getSubClasses(org.semanticweb.owl.model.OWLDescription c)
Specified by:
getSubClasses in interface org.semanticweb.owl.inference.OWLClassReasoner

getSubProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getSubProperties(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
getSubProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getSubProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getSubProperties(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
getSubProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getSuperClasses

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getSuperClasses(org.semanticweb.owl.model.OWLDescription c)
Specified by:
getSuperClasses in interface org.semanticweb.owl.inference.OWLClassReasoner

getSuperProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLDataProperty>> getSuperProperties(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
getSuperProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getSuperProperties

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLObjectProperty>> getSuperProperties(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
getSuperProperties in interface org.semanticweb.owl.inference.OWLPropertyReasoner

getType

public org.semanticweb.owl.model.OWLClass getType(org.semanticweb.owl.model.OWLIndividual ind)
Return the named class that this individual is a direct type of. If there is more than one such class first one is returned.

Parameters:
ind -
Returns:
OWLClass
Throws:
org.semanticweb.owl.model.OWLException

getTypes

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getTypes(org.semanticweb.owl.model.OWLIndividual individual)

getTypes

public java.util.Set<java.util.Set<org.semanticweb.owl.model.OWLClass>> getTypes(org.semanticweb.owl.model.OWLIndividual ind,
                                                                                 boolean direct)
Returns all the named classes that this individual belongs. This returns a set of sets where each set is an equivalent class

Specified by:
getTypes in interface org.semanticweb.owl.inference.OWLIndividualReasoner
Parameters:
ind -
Returns:
Set of OWLDescription objects
Throws:
org.semanticweb.owl.model.OWLException

hasDataPropertyRelationship

public boolean hasDataPropertyRelationship(org.semanticweb.owl.model.OWLIndividual subject,
                                           org.semanticweb.owl.model.OWLDataPropertyExpression property,
                                           org.semanticweb.owl.model.OWLConstant object)
Specified by:
hasDataPropertyRelationship in interface org.semanticweb.owl.inference.OWLIndividualReasoner

hasDomain

public boolean hasDomain(org.semanticweb.owl.model.OWLDataProperty p,
                         org.semanticweb.owl.model.OWLDescription c)

hasDomain

public boolean hasDomain(org.semanticweb.owl.model.OWLObjectProperty p,
                         org.semanticweb.owl.model.OWLDescription c)

hasObjectPropertyRelationship

public boolean hasObjectPropertyRelationship(org.semanticweb.owl.model.OWLIndividual subject,
                                             org.semanticweb.owl.model.OWLObjectPropertyExpression property,
                                             org.semanticweb.owl.model.OWLIndividual object)
Specified by:
hasObjectPropertyRelationship in interface org.semanticweb.owl.inference.OWLIndividualReasoner

hasRange

public boolean hasRange(org.semanticweb.owl.model.OWLDataProperty p,
                        org.semanticweb.owl.model.OWLDataRange d)

hasRange

public boolean hasRange(org.semanticweb.owl.model.OWLObjectProperty p,
                        org.semanticweb.owl.model.OWLDescription c)

hasType

public boolean hasType(org.semanticweb.owl.model.OWLIndividual individual,
                       org.semanticweb.owl.model.OWLDescription type)
Checks if the given individual is an instance of the given type


hasType

public boolean hasType(org.semanticweb.owl.model.OWLIndividual individual,
                       org.semanticweb.owl.model.OWLDescription type,
                       boolean direct)
                throws org.semanticweb.owl.inference.OWLReasonerException
Checks if the given individual is a direct or indirect instance of the given type

Specified by:
hasType in interface org.semanticweb.owl.inference.OWLIndividualReasoner
Throws:
org.semanticweb.owl.inference.OWLReasonerException

isAntiSymmetric

public boolean isAntiSymmetric(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
isAntiSymmetric in interface org.semanticweb.owl.inference.OWLPropertyReasoner

isClassified

public boolean isClassified()
Specified by:
isClassified in interface org.semanticweb.owl.inference.OWLReasonerBase

isComplementOf

public boolean isComplementOf(org.semanticweb.owl.model.OWLDescription c1,
                              org.semanticweb.owl.model.OWLDescription c2)

isConsistent

public boolean isConsistent()
Returns true if the loaded ontology is consistent.

Parameters:
c -
Returns:
Throws:
org.semanticweb.owl.model.OWLException

isConsistent

public boolean isConsistent(org.semanticweb.owl.model.OWLDescription d)
Deprecated. Use isSatisfiable(OWLDescription) instead


isConsistent

public boolean isConsistent(org.semanticweb.owl.model.OWLOntology ontology)
Specified by:
isConsistent in interface org.semanticweb.owl.inference.OWLConsistencyChecker

isDefined

public boolean isDefined(org.semanticweb.owl.model.OWLClass cls)
Specified by:
isDefined in interface org.semanticweb.owl.inference.OWLReasonerBase

isDefined

public boolean isDefined(org.semanticweb.owl.model.OWLDataProperty prop)
Specified by:
isDefined in interface org.semanticweb.owl.inference.OWLReasonerBase

isDefined

public boolean isDefined(org.semanticweb.owl.model.OWLIndividual ind)
Specified by:
isDefined in interface org.semanticweb.owl.inference.OWLReasonerBase

isDefined

public boolean isDefined(org.semanticweb.owl.model.OWLObjectProperty prop)
Specified by:
isDefined in interface org.semanticweb.owl.inference.OWLReasonerBase

isDifferentFrom

public boolean isDifferentFrom(org.semanticweb.owl.model.OWLIndividual ind1,
                               org.semanticweb.owl.model.OWLIndividual ind2)
Test if two individuals are owl:DifferentFrom each other.

Returns:
Throws:
org.semanticweb.owl.model.OWLException

isDisjointWith

public boolean isDisjointWith(org.semanticweb.owl.model.OWLDataProperty p1,
                              org.semanticweb.owl.model.OWLDataProperty p2)

isDisjointWith

public boolean isDisjointWith(org.semanticweb.owl.model.OWLDescription c1,
                              org.semanticweb.owl.model.OWLDescription c2)

isDisjointWith

public boolean isDisjointWith(org.semanticweb.owl.model.OWLObjectProperty p1,
                              org.semanticweb.owl.model.OWLObjectProperty p2)

isEntailed

public boolean isEntailed(org.semanticweb.owl.model.OWLOntology ont)

isEntailed

public boolean isEntailed(java.util.Set<? extends org.semanticweb.owl.model.OWLAxiom> axioms)

isEntailed

public boolean isEntailed(org.semanticweb.owl.model.OWLAxiom axiom)

isEquivalentClass

public boolean isEquivalentClass(org.semanticweb.owl.model.OWLDescription c1,
                                 org.semanticweb.owl.model.OWLDescription c2)
Specified by:
isEquivalentClass in interface org.semanticweb.owl.inference.OWLClassReasoner

isEquivalentProperty

public boolean isEquivalentProperty(org.semanticweb.owl.model.OWLDataProperty p1,
                                    org.semanticweb.owl.model.OWLDataProperty p2)

isEquivalentProperty

public boolean isEquivalentProperty(org.semanticweb.owl.model.OWLObjectProperty p1,
                                    org.semanticweb.owl.model.OWLObjectProperty p2)

isFunctional

public boolean isFunctional(org.semanticweb.owl.model.OWLDataProperty p)
Specified by:
isFunctional in interface org.semanticweb.owl.inference.OWLPropertyReasoner

isFunctional

public boolean isFunctional(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
isFunctional in interface org.semanticweb.owl.inference.OWLPropertyReasoner

isInverseFunctional

public boolean isInverseFunctional(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
isInverseFunctional in interface org.semanticweb.owl.inference.OWLPropertyReasoner

isInverseOf

public boolean isInverseOf(org.semanticweb.owl.model.OWLObjectProperty p1,
                           org.semanticweb.owl.model.OWLObjectProperty p2)

isIrreflexive

public boolean isIrreflexive(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
isIrreflexive in interface org.semanticweb.owl.inference.OWLPropertyReasoner

isRealised

public boolean isRealised()
                   throws org.semanticweb.owl.inference.OWLReasonerException
Specified by:
isRealised in interface org.semanticweb.owl.inference.OWLReasonerBase
Throws:
org.semanticweb.owl.inference.OWLReasonerException

isReflexive

public boolean isReflexive(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
isReflexive in interface org.semanticweb.owl.inference.OWLPropertyReasoner

isSameAs

public boolean isSameAs(org.semanticweb.owl.model.OWLIndividual ind1,
                        org.semanticweb.owl.model.OWLIndividual ind2)
Test if two individuals are owl:DifferentFrom each other.

Returns:
Throws:
org.semanticweb.owl.model.OWLException

isSatisfiable

public boolean isSatisfiable(org.semanticweb.owl.model.OWLDescription d)
Returns true if the given class is satisfiable.

Specified by:
isSatisfiable in interface org.semanticweb.owl.inference.OWLSatisfiabilityChecker
Parameters:
c -
Returns:
Throws:
org.semanticweb.owl.model.OWLException

isSubClassOf

public boolean isSubClassOf(org.semanticweb.owl.model.OWLDescription c1,
                            org.semanticweb.owl.model.OWLDescription c2)
Specified by:
isSubClassOf in interface org.semanticweb.owl.inference.OWLClassReasoner

isSubPropertyOf

public boolean isSubPropertyOf(org.semanticweb.owl.model.OWLDataProperty c1,
                               org.semanticweb.owl.model.OWLDataProperty c2)

isSubPropertyOf

public boolean isSubPropertyOf(org.semanticweb.owl.model.OWLObjectProperty c1,
                               org.semanticweb.owl.model.OWLObjectProperty c2)

isSubTypeOf

public boolean isSubTypeOf(org.semanticweb.owl.model.OWLDataType d1,
                           org.semanticweb.owl.model.OWLDataType d2)

isSymmetric

public boolean isSymmetric(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
isSymmetric in interface org.semanticweb.owl.inference.OWLPropertyReasoner

isTransitive

public boolean isTransitive(org.semanticweb.owl.model.OWLObjectProperty p)
Specified by:
isTransitive in interface org.semanticweb.owl.inference.OWLPropertyReasoner

loadOntologies

public void loadOntologies(java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
Specified by:
loadOntologies in interface org.semanticweb.owl.inference.OWLReasonerBase

loadOntology

public void loadOntology(org.semanticweb.owl.model.OWLOntology ontology)

ontologiesChanged

public void ontologiesChanged(java.util.List<? extends org.semanticweb.owl.model.OWLOntologyChange> changes)
Listens to ontology changes and refreshes the underlying KB. Applies some of the ontology changes incrementally but applies full reload if incremental update cannot be handled for one of the changes. All additions can be handled incrementally but removal of some axioms cannot be handled. Note that, the incremental processing here is meant to refer only loading and not reasoning, i.e. it is different from the incremental reasoning support provided by Pellet.

Specified by:
ontologiesChanged in interface org.semanticweb.owl.model.OWLOntologyChangeListener

realise

public void realise()
             throws org.semanticweb.owl.inference.OWLReasonerException
Specified by:
realise in interface org.semanticweb.owl.inference.OWLReasonerBase
Throws:
org.semanticweb.owl.inference.OWLReasonerException

refresh

public void refresh()

setOntology

public void setOntology(org.semanticweb.owl.model.OWLOntology ontology)
This will first clear the ontologies and then load the give ontology with is imports


unloadOntologies

public void unloadOntologies(java.util.Set<org.semanticweb.owl.model.OWLOntology> ontologies)
Specified by:
unloadOntologies in interface org.semanticweb.owl.inference.OWLReasonerBase

unloadOntology

public void unloadOntology(org.semanticweb.owl.model.OWLOntology ontology)


Copyright © 2004 Evren Sirin. All Rights Reserved.