uk.ac.man.cs.img.owl.inference.dl
Class SimpleOWLReasoner

java.lang.Object
  |
  +--uk.ac.man.cs.img.owl.inference.dl.SimpleOWLReasoner
All Implemented Interfaces:
OntologyChangeListener, OWLClassReasoner, OWLIndividualReasoner, OWLReasoner, ReasonerProxy

public class SimpleOWLReasoner
extends Object
implements OWLClassReasoner, OWLIndividualReasoner, OntologyChangeListener, ReasonerProxy

An OWL reasoner that uses a DIG reasoner to do the work.

Version:
$Id: SimpleOWLReasoner.java,v 1.4 2004/03/05 17:34:48 sean_bechhofer Exp $

Nested Class Summary
 class SimpleOWLReasoner.ExpressivenessOutOfScopeException
           
 
Constructor Summary
SimpleOWLReasoner(uk.ac.man.cs.img.dig.reasoner.Reasoner digReasoner)
          Create a new reasoning object.
 
Method Summary
 Set ancestorClassesOf(OWLDescription d)
          Returns the collection of all superclasses of the given description.
 Set descendantClassesOf(OWLDescription d)
          Returns the collection of all subclasses of the given description.
 Set equivalentClassesOf(OWLDescription d)
          Returns the collection of (named) classes which are equivalent to the given description.
 OWLOntology getOntology()
          Get the ontology that this reasoner reasons over
 Set instancesOf(OWLDescription d1)
          Returns all the instances of the given class.
 boolean isConsistent()
           
 boolean isConsistent(OWLDescription d1)
          Returns true if the description is consistent (i.e. if it is * possible for there to exist models in which the extension of the class is non-empty.
 boolean isEquivalentClass(OWLDescription d1, OWLDescription d2)
          Returns true if d1 is equivalent to d2.
 boolean isInstanceOf(OWLIndividual i, OWLDescription d)
          Returns true if the given individual is an instance of the given description
 boolean isSubClassOf(OWLDescription d1, OWLDescription d2)
          Returns true if d1 is a subclass of d2.
static void main(String[] args)
           
 void ontologyChanged(OntologyChange event)
           
 void setOntology(OWLOntology onto)
          Set the ontology that the reasoner knows about.
 Set subClassesOf(OWLDescription d)
          Returns the collection of (named) most general subclasses of the given description.
 Set superClassesOf(OWLDescription d)
          Returns the collection of (named) most specific superclasses of the given description.
 void tell(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleOWLReasoner

public SimpleOWLReasoner(uk.ac.man.cs.img.dig.reasoner.Reasoner digReasoner)
                  throws OWLException
Create a new reasoning object. Expects a DIG reasoner that will do the actual work of reasoning about the class structure.

Parameters:
digReasoner - a Reasoner value
Method Detail

setOntology

public void setOntology(OWLOntology onto)
                 throws OWLException
Set the ontology that the reasoner knows about. The reasoner will then transmit the converted ontology to the DIG reasoner.

Specified by:
setOntology in interface OWLReasoner
OWLException

tell

public void tell(String str)
          throws OWLException
Specified by:
tell in interface ReasonerProxy
OWLException

getOntology

public OWLOntology getOntology()
Description copied from interface: OWLReasoner
Get the ontology that this reasoner reasons over

Specified by:
getOntology in interface OWLReasoner

isSubClassOf

public boolean isSubClassOf(OWLDescription d1,
                            OWLDescription d2)
                     throws OWLException
Returns true if d1 is a subclass of d2.

Specified by:
isSubClassOf in interface OWLClassReasoner
OWLException

isEquivalentClass

public boolean isEquivalentClass(OWLDescription d1,
                                 OWLDescription d2)
                          throws OWLException
Returns true if d1 is equivalent to d2.

Specified by:
isEquivalentClass in interface OWLClassReasoner
OWLException

isConsistent

public boolean isConsistent(OWLDescription d1)
                     throws OWLException
Returns true if the description is consistent (i.e. if it is * possible for there to exist models in which the extension of the class is non-empty.

Specified by:
isConsistent in interface OWLClassReasoner
OWLException

isConsistent

public boolean isConsistent()
                     throws OWLException
OWLException

superClassesOf

public Set superClassesOf(OWLDescription d)
                   throws OWLException
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:
superClassesOf in interface OWLClassReasoner
OWLException

subClassesOf

public Set subClassesOf(OWLDescription d)
                 throws OWLException
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:
subClassesOf in interface OWLClassReasoner
OWLException

ancestorClassesOf

public Set ancestorClassesOf(OWLDescription d)
                      throws OWLException
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:
ancestorClassesOf in interface OWLClassReasoner
OWLException

descendantClassesOf

public Set descendantClassesOf(OWLDescription d)
                        throws OWLException
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:
descendantClassesOf in interface OWLClassReasoner
OWLException

equivalentClassesOf

public Set equivalentClassesOf(OWLDescription d)
                        throws OWLException
Description copied from interface: OWLClassReasoner
Returns the collection of (named) classes which are equivalent to the given description.

Specified by:
equivalentClassesOf in interface OWLClassReasoner
OWLException

ontologyChanged

public void ontologyChanged(OntologyChange event)
                     throws OWLException
Specified by:
ontologyChanged in interface OntologyChangeListener
OWLException

isInstanceOf

public boolean isInstanceOf(OWLIndividual i,
                            OWLDescription d)
                     throws OWLException
Description copied from interface: OWLIndividualReasoner
Returns true if the given individual is an instance of the given description

Specified by:
isInstanceOf in interface OWLIndividualReasoner
OWLException

instancesOf

public Set instancesOf(OWLDescription d1)
                throws OWLException
Returns all the instances of the given class.

Specified by:
instancesOf in interface OWLIndividualReasoner
OWLException

main

public static void main(String[] args)


WonderWeb