JTP API Documentation

jtp.context.owl
Class OWLReasoningContext

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
        |
        +--java.beans.beancontext.BeanContextSupport
              |
              +--jtp.context.BasicReasoningContext
                    |
                    +--jtp.frame.listen.Context
                          |
                          +--jtp.context.rdf.RDFReasoningContext
                                |
                                +--jtp.context.owl.OWLReasoningContext
All Implemented Interfaces:
BeanContext, BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, Collection, DesignMode, EventListener, PropertyChangeListener, Serializable, VetoableChangeListener, Visibility

public class OWLReasoningContext
extends RDFReasoningContext

The context for accessing JTP's OWL reasoning mechanisms.

After creating an instance of OWLReasoningContext (or an instance of a subclass of OWLReasoningContext), you should call setUp().

After setup, the various loading, asking, and telling methods can be used to load KBs and query them.

See Also:
Serialized Form

Field Summary
static String OWL_REF
           
static URL OWL_RULES
           
static URL OWL_TRIPLES
           
 
Fields inherited from class jtp.context.rdf.RDFReasoningContext
idr, RDF_REF, RDF_RULES, RDF_TRIPLES
 
Fields inherited from class jtp.frame.listen.Context
ONE_VALUE, TRIPLE, VALUE_LINK, VC
 
Fields inherited from class jtp.context.BasicReasoningContext
tracer
 
Fields inherited from class java.beans.beancontext.BeanContextSupport
bcmListeners, children, designTime, locale, okToUseGui
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
 
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
 
Constructor Summary
OWLReasoningContext()
           
 
Method Summary
protected  void createEmptyContentHolders()
           
 ReasoningStepIterator disjointnessInconsistencies()
          Checks for objects in the knowledge base that are inconsistent because they are instances of disjoint classes.
 ReasoningStepIterator equivalenceInconsistencies()
          Checks for pairs of objects in the knowledge base that are inconsistent because they are asserted or inferred to be both equivalent to and distinct from each other.
 ReasoningStepIterator exceedsMaxCard0Inconsistencies()
          Checks for objects in the knowledge base that are inconsistent because they are restricted to have zero values for a particular property, but they violate this restriction.
 ClassifierTellingReasoner getClassifierTellingReasoner()
           
 IntersectionTypeReasoner getIntersectionTypeReasoner()
           
 ReasoningStepIterator inconsistencies()
          Compiles all of the inconsistencies found by disjointnessInconsistencies(), equivalenceInconsistencies(), exceedsMaxCard0Inconsistencies(), nothingInconsistencies(), nilItemInconsistencies(), and nilRestInconsistencies().
 ReasoningStepIterator nilItemInconsistencies()
          Checks for objects in the knowledge base that are inconsistent because they have been asserted or inferred to be an item in the empty list (rdf:nil).
 ReasoningStepIterator nilRestInconsistencies()
          Checks for objects in the knowledge base that are inconsistent because they have been asserted or inferred to be a continuation (rdf:rest) of the empty list (rdf:nil).
 ReasoningStepIterator nothingInconsistencies()
          Checks for objects in the knowledge base that are inconsistent because they have been asserted or inferred to be a member of the empty class (owl:Nothing).
 void setClassifierTellingReasoner(ClassifierTellingReasoner r)
           
 void setIntersectionTypeReasoner(IntersectionTypeReasoner r)
           
 void setUp()
          Sets up the OWLReasoningContext.
 
Methods inherited from class jtp.context.rdf.RDFReasoningContext
ask, ask, assertKifString, assertString, getKifParser, getModelForAssertions, getRDFParser, loadKB, loadKB, loadKB, loadKifKB, loadRDFKB, loadRDFKB, setMaxDepth, tell, tellKifString, tellString, tellString, tellString, tellString, untell, untellString, writeRDF
 
Methods inherited from class jtp.frame.listen.Context
addLink, addListener, addRule, addRule, createContentHolders, getDamlParser, getFrameKB, loadSpecs, loadSpecs, orderLiterals, setFrameKB
 
Methods inherited from class jtp.context.BasicReasoningContext
defaultSetup, getAskingDispatcher, getAskingReasoner, getAssertionResults, getIntermediateResultDispatcher, getMaxDepth, getParser, getStringAssertionResults, getTellingDispatcher, getTellingReasoner, getTracer, getTranslator, getUndoManager, loadClauses, loadKB, setAskingDispatcher, setAskingReasoner, setIntermediateResultDispatcher, setParser, setTellingDispatcher, setTellingReasoner, setTracer, setUndoManager, tellInternal, undo
 
Methods inherited from class java.beans.beancontext.BeanContextSupport
add, addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, bcsPreDeserializationHook, bcsPreSerializationHook, childDeserializedHook, childJustAddedHook, childJustRemovedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, createBCSChild, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, initialize, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildren
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

OWL_RULES

public static final URL OWL_RULES

OWL_TRIPLES

public static final URL OWL_TRIPLES

OWL_REF

public static final String OWL_REF
See Also:
Constant Field Values
Constructor Detail

OWLReasoningContext

public OWLReasoningContext()
Method Detail

getIntersectionTypeReasoner

public IntersectionTypeReasoner getIntersectionTypeReasoner()

setIntersectionTypeReasoner

public void setIntersectionTypeReasoner(IntersectionTypeReasoner r)

getClassifierTellingReasoner

public ClassifierTellingReasoner getClassifierTellingReasoner()

setClassifierTellingReasoner

public void setClassifierTellingReasoner(ClassifierTellingReasoner r)

setUp

public void setUp()
Sets up the OWLReasoningContext.

You should call this before loading KBs from OWL or KIF files, telling sentences, or asking queries.

Overrides:
setUp in class RDFReasoningContext

createEmptyContentHolders

protected void createEmptyContentHolders()
Overrides:
createEmptyContentHolders in class Context

inconsistencies

public ReasoningStepIterator inconsistencies()
Compiles all of the inconsistencies found by disjointnessInconsistencies(), equivalenceInconsistencies(), exceedsMaxCard0Inconsistencies(), nothingInconsistencies(), nilItemInconsistencies(), and nilRestInconsistencies().

Warning: This will take several seconds.

Overrides:
inconsistencies in class RDFReasoningContext

disjointnessInconsistencies

public ReasoningStepIterator disjointnessInconsistencies()
                                                  throws ReasoningException
Checks for objects in the knowledge base that are inconsistent because they are instances of disjoint classes. Checks (in a somewhat efficient manner) for instantiations of (and (owl:disjointWith ?c1 ?c2) (rdf:type ?x ?c1) (rdf:type ?x ?c2)).

Warning: This will take several seconds.

ReasoningException

equivalenceInconsistencies

public ReasoningStepIterator equivalenceInconsistencies()
                                                 throws ReasoningException
Checks for pairs of objects in the knowledge base that are inconsistent because they are asserted or inferred to be both equivalent to and distinct from each other. Checks for instantiations of (and (owl:differentFrom ?x ?y) (owl:sameAs ?x ?y)).

ReasoningException

exceedsMaxCard0Inconsistencies

public ReasoningStepIterator exceedsMaxCard0Inconsistencies()
                                                     throws ReasoningException
Checks for objects in the knowledge base that are inconsistent because they are restricted to have zero values for a particular property, but they violate this restriction. Checks for instantiations of (and (owl:maxCardinality ?r 0) (owl:onProperty ?r ?p) (rdf:type ?x ?r) (?p ?x ?v)) .

ReasoningException

nothingInconsistencies

public ReasoningStepIterator nothingInconsistencies()
                                             throws ReasoningException
Checks for objects in the knowledge base that are inconsistent because they have been asserted or inferred to be a member of the empty class (owl:Nothing). Checks for instantiations of (rdf:type ?x owl:Nothing).

ReasoningException

nilItemInconsistencies

public ReasoningStepIterator nilItemInconsistencies()
                                             throws ReasoningException
Checks for objects in the knowledge base that are inconsistent because they have been asserted or inferred to be an item in the empty list (rdf:nil). Checks for instantiations of (rdf:item rdf:nil ?x).

ReasoningException

nilRestInconsistencies

public ReasoningStepIterator nilRestInconsistencies()
                                             throws ReasoningException
Checks for objects in the knowledge base that are inconsistent because they have been asserted or inferred to be a continuation (rdf:rest) of the empty list (rdf:nil). Checks for instantiations of (rdf:rest rdf:nil ?l).

ReasoningException

JTP API Documentation