JTP API Documentation

jtp.context.daml
Class DamlReasoningContext

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

public class DamlReasoningContext
extends RDFReasoningContext

The context for accessing JTP's DAML reasoning mechanisms.

After creating an instance of DamlReasoningContext (or an instance of a subclass of DamlReasoningContext), 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 DAML_AXIOMATIC_SEMANTICS
           
static URL DAML_RULES
           
static URL DAML_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
DamlReasoningContext()
           
 
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 of a particular type for a particular property, but they violate this restriction.
 ClassifierTellingReasoner getClassifierTellingReasoner()
           
 DAMLParser getDamlParser()
          Deprecated. Use RDFReasoningContext.getRDFParser() instead.
 IntersectionTypeReasoner getIntersectionTypeReasoner()
           
 ReasoningStepIterator inconsistencies()
          Compiles all of the inconsistencies found by disjointnessInconsistencies(), equivalenceInconsistencies(), exceedsMaxCard0Inconsistencies(), nothingInconsistencies(), nilItemInconsistencies(), and nilRestInconsistencies().
 void loadDamlKB(com.hp.hpl.jena.rdf.model.Model model, URL publicLocation)
          Deprecated. Use RDFReasoningContext.loadRDFKB(Model, URL).
 void loadDamlKB(URL url, URL publicLocation)
          Deprecated. Use RDFReasoningContext.loadRDFKB(URL, URL).
 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 (daml:nil).
 ReasoningStepIterator nilRestInconsistencies()
          Checks for objects in the knowledge base that are inconsistent because they have been asserted or inferred to be a continuation (daml:rest) of the empty list (daml: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 (daml:Nothing).
 void setClassifierTellingReasoner(ClassifierTellingReasoner r)
           
 void setIntersectionTypeReasoner(IntersectionTypeReasoner r)
           
 void setUp()
          Sets up the DamlReasoningContext.
 void writeDaml(Writer writer, Snapshot snap, String baseUri, Map prefixes)
          Deprecated. Use RDFReasoningContext.writeRDF(Writer, Snapshot, String, Map).
 
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, 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

DAML_RULES

public static final URL DAML_RULES

DAML_TRIPLES

public static final URL DAML_TRIPLES

DAML_AXIOMATIC_SEMANTICS

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

DamlReasoningContext

public DamlReasoningContext()
Method Detail

getIntersectionTypeReasoner

public IntersectionTypeReasoner getIntersectionTypeReasoner()

setIntersectionTypeReasoner

public void setIntersectionTypeReasoner(IntersectionTypeReasoner r)

getClassifierTellingReasoner

public ClassifierTellingReasoner getClassifierTellingReasoner()

setClassifierTellingReasoner

public void setClassifierTellingReasoner(ClassifierTellingReasoner r)

getDamlParser

public DAMLParser getDamlParser()
Deprecated. Use RDFReasoningContext.getRDFParser() instead.

Overrides:
getDamlParser in class Context

setUp

public void setUp()
Sets up the DamlReasoningContext.

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

Overrides:
setUp in class RDFReasoningContext

createEmptyContentHolders

protected void createEmptyContentHolders()
Overrides:
createEmptyContentHolders in class Context

loadDamlKB

public void loadDamlKB(URL url,
                       URL publicLocation)
                throws ReasoningException,
                       IOException
Deprecated. Use RDFReasoningContext.loadRDFKB(URL, URL).

ReasoningException
IOException

loadDamlKB

public void loadDamlKB(com.hp.hpl.jena.rdf.model.Model model,
                       URL publicLocation)
                throws ReasoningException,
                       IOException
Deprecated. Use RDFReasoningContext.loadRDFKB(Model, URL).

ReasoningException
IOException

writeDaml

public void writeDaml(Writer writer,
                      Snapshot snap,
                      String baseUri,
                      Map prefixes)
Deprecated. Use RDFReasoningContext.writeRDF(Writer, Snapshot, String, Map).


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 (daml: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 (daml:differentIndividualFrom ?x ?y) (daml:equivalentTo ?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 of a particular type for a particular property, but they violate this restriction. Checks for instantiations of (and (daml:maxCardinalityQ ?r 0) (daml:onProperty ?r ?p) (daml:hasClassQ ?r ?c) (rdf:type ?x ?r) (?p ?x ?v) (rdf:type ?v ?c).

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 (daml:Nothing). Checks for instantiations of (rdf:type ?x daml: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 (daml:nil). Checks for instantiations of (daml:item daml: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 (daml:rest) of the empty list (daml:nil). Checks for instantiations of (daml:rest daml:nil ?l).

ReasoningException

JTP API Documentation