org.semanticweb.owl.inference
Class NullReasoner

java.lang.Object
  extended by org.semanticweb.owl.inference.NullReasoner
All Implemented Interfaces:
OWLClassReasoner, OWLConsistencyChecker, OWLIndividualReasoner, OWLPropertyReasoner, OWLReasoner, OWLReasonerBase, OWLSatisfiabilityChecker

public class NullReasoner
extends java.lang.Object
implements OWLReasoner

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 02-Jun-2008

A reasoner that does nothing. For use in the "null object" pattern (http://en.wikipedia.org/wiki/Null_Object_pattern)


Constructor Summary
NullReasoner()
           
 
Method Summary
 void classify()
          Does nothing in this implementation
 void clearOntologies()
          Does nothing in this implementation.
 void dispose()
          Disposes of and cleans up any resources used by this reasoner.
 java.util.Set<java.util.Set<OWLClass>> getAncestorClasses(OWLDescription clsC)
          Returns the collection of all superclasses of the given description.
 java.util.Set<java.util.Set<OWLDataProperty>> getAncestorProperties(OWLDataProperty property)
           
 java.util.Set<java.util.Set<OWLObjectProperty>> getAncestorProperties(OWLObjectProperty property)
           
 java.util.Map<OWLDataProperty,java.util.Set<OWLConstant>> getDataPropertyRelationships(OWLIndividual individual)
           
 java.util.Set<java.util.Set<OWLClass>> getDescendantClasses(OWLDescription clsC)
          Returns the collection of all subclasses of the given description.
 java.util.Set<java.util.Set<OWLDataProperty>> getDescendantProperties(OWLDataProperty property)
           
 java.util.Set<java.util.Set<OWLObjectProperty>> getDescendantProperties(OWLObjectProperty property)
           
 java.util.Set<java.util.Set<OWLDescription>> getDomains(OWLDataProperty property)
           
 java.util.Set<java.util.Set<OWLDescription>> getDomains(OWLObjectProperty property)
          Gets the domains of a particular property.
 java.util.Set<OWLClass> getEquivalentClasses(OWLDescription clsC)
          Returns the collection of (named) classes which are equivalent to the given description.
 java.util.Set<OWLDataProperty> getEquivalentProperties(OWLDataProperty property)
           
 java.util.Set<OWLObjectProperty> getEquivalentProperties(OWLObjectProperty property)
           
 java.util.Set<OWLClass> getInconsistentClasses()
          A convenience methods for obtaining all classes which are inconsistent.
 java.util.Set<OWLIndividual> getIndividuals(OWLDescription clsC, boolean direct)
           
 java.util.Set<java.util.Set<OWLObjectProperty>> getInverseProperties(OWLObjectProperty property)
           
 java.util.Set<OWLOntology> getLoadedOntologies()
          Gets the ontologies that have been loaded into this reasoner.
 java.util.Map<OWLObjectProperty,java.util.Set<OWLIndividual>> getObjectPropertyRelationships(OWLIndividual individual)
           
 java.util.Set<OWLDataRange> getRanges(OWLDataProperty property)
           
 java.util.Set<OWLDescription> getRanges(OWLObjectProperty property)
           
 java.util.Set<OWLIndividual> getRelatedIndividuals(OWLIndividual subject, OWLObjectPropertyExpression property)
           
 java.util.Set<OWLConstant> getRelatedValues(OWLIndividual subject, OWLDataPropertyExpression property)
           
 java.util.Set<java.util.Set<OWLClass>> getSubClasses(OWLDescription clsC)
          Returns the collection of (named) most general subclasses of the given description.
 java.util.Set<java.util.Set<OWLDataProperty>> getSubProperties(OWLDataProperty property)
           
 java.util.Set<java.util.Set<OWLObjectProperty>> getSubProperties(OWLObjectProperty property)
           
 java.util.Set<java.util.Set<OWLClass>> getSuperClasses(OWLDescription clsC)
          Returns the collection of (named) most specific superclasses of the given description.
 java.util.Set<java.util.Set<OWLDataProperty>> getSuperProperties(OWLDataProperty property)
           
 java.util.Set<java.util.Set<OWLObjectProperty>> getSuperProperties(OWLObjectProperty property)
           
 java.util.Set<java.util.Set<OWLClass>> getTypes(OWLIndividual individual, boolean direct)
           
 boolean hasDataPropertyRelationship(OWLIndividual subject, OWLDataPropertyExpression property, OWLConstant object)
           
 boolean hasObjectPropertyRelationship(OWLIndividual subject, OWLObjectPropertyExpression property, OWLIndividual object)
           
 boolean hasType(OWLIndividual individual, OWLDescription type, boolean direct)
           
 boolean isAntiSymmetric(OWLObjectProperty property)
           
 boolean isClassified()
          Determines if the reasoner has classified the ontology.
 boolean isConsistent(OWLOntology ontology)
          Checks to see if the ontology that have been loaded into the reasoner are consistent in combination.
 boolean isDefined(OWLClass cls)
          Determines if the specified class is defined in the reasoner.
 boolean isDefined(OWLDataProperty prop)
          Determines if the specified property is defined in the reasoner.
 boolean isDefined(OWLIndividual ind)
          Determines if the specified individual is defined in the reasoner.
 boolean isDefined(OWLObjectProperty prop)
          Determines if the specified property is defined in the reasoner.
 boolean isEquivalentClass(OWLDescription clsC, OWLDescription clsD)
          Checks whether the first class is equivalent to the second class
 boolean isFunctional(OWLDataProperty property)
           
 boolean isFunctional(OWLObjectProperty property)
           
 boolean isInverseFunctional(OWLObjectProperty property)
           
 boolean isIrreflexive(OWLObjectProperty property)
           
 boolean isRealised()
          Determines if the types of individuals have been computed by this reasoner (if supported).
 boolean isReflexive(OWLObjectProperty property)
           
 boolean isSatisfiable(OWLDescription description)
          Determines if the specified class is satisfiable.
 boolean isSubClassOf(OWLDescription clsC, OWLDescription clsD)
          Checks whether the first class is a subclass of the second class
 boolean isSymmetric(OWLObjectProperty property)
           
 boolean isTransitive(OWLObjectProperty property)
           
 void loadOntologies(java.util.Set<OWLOntology> ontologies)
          Loads the specified ontologies.
 void realise()
          Does nothing in this implementation.
 void unloadOntologies(java.util.Set<OWLOntology> ontologies)
          Does nothing in this implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullReasoner

public NullReasoner()
Method Detail

isConsistent

public boolean isConsistent(OWLOntology ontology)
                     throws OWLReasonerException
Description copied from interface: OWLConsistencyChecker
Checks to see if the ontology that have been loaded into the reasoner are consistent in combination.

Specified by:
isConsistent in interface OWLConsistencyChecker
Parameters:
ontology - Implementations should ignore this parameter. It is here for legacy reasons.
Returns:
Always returns true in this implementation.
Throws:
OWLReasonerException

loadOntologies

public void loadOntologies(java.util.Set<OWLOntology> ontologies)
                    throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Loads the specified ontologies. The reasoner will then take into consideration the logical axioms in each ontology. Note that this methods does not load any ontologies in the imports closure - all imports must be loaded explicitly.

Specified by:
loadOntologies in interface OWLReasonerBase
Parameters:
ontologies - The ontolgies to be loaded.
Throws:
OWLReasonerException

isClassified

public boolean isClassified()
                     throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Determines if the reasoner has classified the ontology.

Specified by:
isClassified in interface OWLReasonerBase
Returns:
Always true
Throws:
OWLReasonerException

classify

public void classify()
              throws OWLReasonerException
Does nothing in this implementation

Specified by:
classify in interface OWLReasonerBase
Throws:
OWLReasonerException

isRealised

public boolean isRealised()
                   throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Determines if the types of individuals have been computed by this reasoner (if supported).

Specified by:
isRealised in interface OWLReasonerBase
Returns:
Always returns true
Throws:
OWLReasonerException

realise

public void realise()
             throws OWLReasonerException
Does nothing in this implementation.

Specified by:
realise in interface OWLReasonerBase
Throws:
OWLReasonerException

isDefined

public boolean isDefined(OWLClass cls)
                  throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Determines if the specified class is defined in the reasoner. If a class is defined then the reasoner "knows" about it, if a class is not defined then the reasoner doesn't know about it.

Specified by:
isDefined in interface OWLReasonerBase
Parameters:
cls - The class to check for.
Returns:
Always returns true in this implementation
Throws:
OWLReasonerException

isDefined

public boolean isDefined(OWLObjectProperty prop)
                  throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Determines if the specified property is defined in the reasoner. If a property is defined then the reasoner "knows" about it, if a property is not defined then the reasoner doesn't know about it.

Specified by:
isDefined in interface OWLReasonerBase
Parameters:
prop - The property to check for.
Returns:
Always returns true
Throws:
OWLReasonerException

isDefined

public boolean isDefined(OWLDataProperty prop)
                  throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Determines if the specified property is defined in the reasoner. If a property is defined then the reasoner "knows" about it, if a property is not defined then the reasoner doesn't know about it.

Specified by:
isDefined in interface OWLReasonerBase
Parameters:
prop - The property to check for.
Returns:
Always returns true in this implementation
Throws:
OWLReasonerException

isDefined

public boolean isDefined(OWLIndividual ind)
                  throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Determines if the specified individual is defined in the reasoner. If an individual is defined then the reasoner "knows" about it, if a individual is not defined then the reasoner doesn't know about it.

Specified by:
isDefined in interface OWLReasonerBase
Parameters:
ind - The individual to check for.
Returns:
Always returns true in this implementation
Throws:
OWLReasonerException

getLoadedOntologies

public java.util.Set<OWLOntology> getLoadedOntologies()
Description copied from interface: OWLReasonerBase
Gets the ontologies that have been loaded into this reasoner.

Specified by:
getLoadedOntologies in interface OWLReasonerBase
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

unloadOntologies

public void unloadOntologies(java.util.Set<OWLOntology> ontologies)
                      throws OWLReasonerException
Does nothing in this implementation.

Specified by:
unloadOntologies in interface OWLReasonerBase
Parameters:
ontologies - The ontologies to be unloaded.
Throws:
OWLReasonerException

clearOntologies

public void clearOntologies()
                     throws OWLReasonerException
Does nothing in this implementation.

Specified by:
clearOntologies in interface OWLReasonerBase
Throws:
OWLReasonerException

dispose

public void dispose()
             throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Disposes of and cleans up any resources used by this reasoner.

Specified by:
dispose in interface OWLReasonerBase
Throws:
OWLReasonerException

isSubClassOf

public boolean isSubClassOf(OWLDescription clsC,
                            OWLDescription clsD)
                     throws OWLReasonerException
Description copied from interface: OWLClassReasoner
Checks whether the first class is a subclass of the second class

Specified by:
isSubClassOf in interface OWLClassReasoner
Returns:
Always returns false in this implementation
Throws:
OWLReasonerException

isEquivalentClass

public boolean isEquivalentClass(OWLDescription clsC,
                                 OWLDescription clsD)
                          throws OWLReasonerException
Description copied from interface: OWLClassReasoner
Checks whether the first class is equivalent to the second class

Specified by:
isEquivalentClass in interface OWLClassReasoner
Returns:
Always returns false in this implementation
Throws:
OWLReasonerException

getSuperClasses

public java.util.Set<java.util.Set<OWLClass>> getSuperClasses(OWLDescription clsC)
                                                       throws OWLReasonerException
Description copied from interface: OWLClassReasoner
Returns the collection of (named) most specific superclasses of the given description. The result of this will be a set of sets, where each set in the collection represents an equivalence class.

Specified by:
getSuperClasses in interface OWLClassReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getAncestorClasses

public java.util.Set<java.util.Set<OWLClass>> getAncestorClasses(OWLDescription clsC)
                                                          throws OWLReasonerException
Description copied from interface: OWLClassReasoner
Returns the collection of all superclasses of the given description. The result of this will be a set of sets, where each set in the collection represents an equivalence class.

Specified by:
getAncestorClasses in interface OWLClassReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getSubClasses

public java.util.Set<java.util.Set<OWLClass>> getSubClasses(OWLDescription clsC)
                                                     throws OWLReasonerException
Description copied from interface: OWLClassReasoner
Returns the collection of (named) most general subclasses of the given description. The result of this will be a set of sets, where each set in the collection represents an equivalence class.

Specified by:
getSubClasses in interface OWLClassReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getDescendantClasses

public java.util.Set<java.util.Set<OWLClass>> getDescendantClasses(OWLDescription clsC)
                                                            throws OWLReasonerException
Description copied from interface: OWLClassReasoner
Returns the collection of all subclasses of the given description. The result of this will be a set of sets, where each set in the collection represents an equivalence class.

Specified by:
getDescendantClasses in interface OWLClassReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getEquivalentClasses

public java.util.Set<OWLClass> getEquivalentClasses(OWLDescription clsC)
                                             throws OWLReasonerException
Description copied from interface: OWLClassReasoner
Returns the collection of (named) classes which are equivalent to the given description.

Specified by:
getEquivalentClasses in interface OWLClassReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getInconsistentClasses

public java.util.Set<OWLClass> getInconsistentClasses()
                                               throws OWLReasonerException
Description copied from interface: OWLClassReasoner
A convenience methods for obtaining all classes which are inconsistent.

Specified by:
getInconsistentClasses in interface OWLClassReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

isSatisfiable

public boolean isSatisfiable(OWLDescription description)
                      throws OWLReasonerException
Description copied from interface: OWLSatisfiabilityChecker
Determines if the specified class is satisfiable.

Specified by:
isSatisfiable in interface OWLSatisfiabilityChecker
Returns:
Always returns true in this implementation
Throws:
OWLReasonerException

getTypes

public java.util.Set<java.util.Set<OWLClass>> getTypes(OWLIndividual individual,
                                                       boolean direct)
                                                throws OWLReasonerException
Specified by:
getTypes in interface OWLIndividualReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getIndividuals

public java.util.Set<OWLIndividual> getIndividuals(OWLDescription clsC,
                                                   boolean direct)
                                            throws OWLReasonerException
Specified by:
getIndividuals in interface OWLIndividualReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getObjectPropertyRelationships

public java.util.Map<OWLObjectProperty,java.util.Set<OWLIndividual>> getObjectPropertyRelationships(OWLIndividual individual)
                                                                                             throws OWLReasonerException
Specified by:
getObjectPropertyRelationships in interface OWLIndividualReasoner
Returns:
Always returns an empty map in this implementation.
Throws:
OWLReasonerException

getDataPropertyRelationships

public java.util.Map<OWLDataProperty,java.util.Set<OWLConstant>> getDataPropertyRelationships(OWLIndividual individual)
                                                                                       throws OWLReasonerException
Specified by:
getDataPropertyRelationships in interface OWLIndividualReasoner
Returns:
Always returns an empty map in this implementation.
Throws:
OWLReasonerException

hasType

public boolean hasType(OWLIndividual individual,
                       OWLDescription type,
                       boolean direct)
                throws OWLReasonerException
Specified by:
hasType in interface OWLIndividualReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

hasObjectPropertyRelationship

public boolean hasObjectPropertyRelationship(OWLIndividual subject,
                                             OWLObjectPropertyExpression property,
                                             OWLIndividual object)
                                      throws OWLReasonerException
Specified by:
hasObjectPropertyRelationship in interface OWLIndividualReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

hasDataPropertyRelationship

public boolean hasDataPropertyRelationship(OWLIndividual subject,
                                           OWLDataPropertyExpression property,
                                           OWLConstant object)
                                    throws OWLReasonerException
Specified by:
hasDataPropertyRelationship in interface OWLIndividualReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

getRelatedIndividuals

public java.util.Set<OWLIndividual> getRelatedIndividuals(OWLIndividual subject,
                                                          OWLObjectPropertyExpression property)
                                                   throws OWLReasonerException
Specified by:
getRelatedIndividuals in interface OWLIndividualReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getRelatedValues

public java.util.Set<OWLConstant> getRelatedValues(OWLIndividual subject,
                                                   OWLDataPropertyExpression property)
                                            throws OWLReasonerException
Specified by:
getRelatedValues in interface OWLIndividualReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getSuperProperties

public java.util.Set<java.util.Set<OWLObjectProperty>> getSuperProperties(OWLObjectProperty property)
                                                                   throws OWLReasonerException
Specified by:
getSuperProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getSubProperties

public java.util.Set<java.util.Set<OWLObjectProperty>> getSubProperties(OWLObjectProperty property)
                                                                 throws OWLReasonerException
Specified by:
getSubProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getAncestorProperties

public java.util.Set<java.util.Set<OWLObjectProperty>> getAncestorProperties(OWLObjectProperty property)
                                                                      throws OWLReasonerException
Specified by:
getAncestorProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getDescendantProperties

public java.util.Set<java.util.Set<OWLObjectProperty>> getDescendantProperties(OWLObjectProperty property)
                                                                        throws OWLReasonerException
Specified by:
getDescendantProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getInverseProperties

public java.util.Set<java.util.Set<OWLObjectProperty>> getInverseProperties(OWLObjectProperty property)
                                                                     throws OWLReasonerException
Specified by:
getInverseProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getEquivalentProperties

public java.util.Set<OWLObjectProperty> getEquivalentProperties(OWLObjectProperty property)
                                                         throws OWLReasonerException
Specified by:
getEquivalentProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getDomains

public java.util.Set<java.util.Set<OWLDescription>> getDomains(OWLObjectProperty property)
                                                        throws OWLReasonerException
Description copied from interface: OWLPropertyReasoner
Gets the domains of a particular property. A domain class, A, of a property, P, is a named class such that A is an ancestor of \exists p Top ("p some Thing").

Specified by:
getDomains in interface OWLPropertyReasoner
Parameters:
property - The property whose domains are to be retrieved.
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getRanges

public java.util.Set<OWLDescription> getRanges(OWLObjectProperty property)
                                        throws OWLReasonerException
Specified by:
getRanges in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

isFunctional

public boolean isFunctional(OWLObjectProperty property)
                     throws OWLReasonerException
Specified by:
isFunctional in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

isInverseFunctional

public boolean isInverseFunctional(OWLObjectProperty property)
                            throws OWLReasonerException
Specified by:
isInverseFunctional in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

isSymmetric

public boolean isSymmetric(OWLObjectProperty property)
                    throws OWLReasonerException
Specified by:
isSymmetric in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

isTransitive

public boolean isTransitive(OWLObjectProperty property)
                     throws OWLReasonerException
Specified by:
isTransitive in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

isReflexive

public boolean isReflexive(OWLObjectProperty property)
                    throws OWLReasonerException
Specified by:
isReflexive in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

isIrreflexive

public boolean isIrreflexive(OWLObjectProperty property)
                      throws OWLReasonerException
Specified by:
isIrreflexive in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

isAntiSymmetric

public boolean isAntiSymmetric(OWLObjectProperty property)
                        throws OWLReasonerException
Specified by:
isAntiSymmetric in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException

getSuperProperties

public java.util.Set<java.util.Set<OWLDataProperty>> getSuperProperties(OWLDataProperty property)
                                                                 throws OWLReasonerException
Specified by:
getSuperProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getSubProperties

public java.util.Set<java.util.Set<OWLDataProperty>> getSubProperties(OWLDataProperty property)
                                                               throws OWLReasonerException
Specified by:
getSubProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getAncestorProperties

public java.util.Set<java.util.Set<OWLDataProperty>> getAncestorProperties(OWLDataProperty property)
                                                                    throws OWLReasonerException
Specified by:
getAncestorProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getDescendantProperties

public java.util.Set<java.util.Set<OWLDataProperty>> getDescendantProperties(OWLDataProperty property)
                                                                      throws OWLReasonerException
Specified by:
getDescendantProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getEquivalentProperties

public java.util.Set<OWLDataProperty> getEquivalentProperties(OWLDataProperty property)
                                                       throws OWLReasonerException
Specified by:
getEquivalentProperties in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getDomains

public java.util.Set<java.util.Set<OWLDescription>> getDomains(OWLDataProperty property)
                                                        throws OWLReasonerException
Specified by:
getDomains in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

getRanges

public java.util.Set<OWLDataRange> getRanges(OWLDataProperty property)
                                      throws OWLReasonerException
Specified by:
getRanges in interface OWLPropertyReasoner
Returns:
Always returns an empty set in this implementation.
Throws:
OWLReasonerException

isFunctional

public boolean isFunctional(OWLDataProperty property)
                     throws OWLReasonerException
Specified by:
isFunctional in interface OWLPropertyReasoner
Returns:
Always returns false in this implementation.
Throws:
OWLReasonerException