|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.beans.beancontext.BeanContextChildSupport | +--jtp.util.PropertyImporter | +--jtp.time.TimePointKnowledgeStore
A KnowledgeStore for time points.
This KnowledgeStore interfaces with an instance of TLGraph
,
which is where the time points are actually stored and most of
the reasoning is actually performed. The methods
getAskingReasoner()
and getTellingReasoner()
return
reasoners that can be installed in dispatchers to provide time
time point reasoning functionality.
TimePoint
,
Serialized FormNested Class Summary | |
class |
TimePointKnowledgeStore.AskingReasoner
|
class |
TimePointKnowledgeStore.TellingReasoner
|
class |
TimePointKnowledgeStore.TimePointReasoningStep
|
Field Summary |
Fields inherited from class java.beans.beancontext.BeanContextChildSupport |
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport |
Constructor Summary | |
TimePointKnowledgeStore(CanonicalMapping mapping,
TimeVocabulary vocab)
|
Method Summary | |
void |
createInverseRule()
Creates inverse relation reasoning step rule. |
void |
createSubRelationRule()
Creates sub-relation reasoning step rule. |
void |
createTransitivityRule()
Creates transitivity reasoning step rule. |
Reasoner |
getAskingReasoner()
The relations that this reasoner can answer queries about include before , after , equal-point ,
before-or-equal , and after-or-equal . |
byte |
getByteRelation(Symbol r)
|
int |
getMaxDepth()
|
ReasoningStep |
getPointEqualityReasoningStep(Object tp1,
Object tp2,
List substeps)
|
ReasoningStep |
getPointRelationInverseReasoningStep(ReasoningStep sub)
|
ReasoningStep |
getPointSubRelationReasoningStep(Symbol sub,
Symbol prop,
ReasoningStep rs)
|
Symbol |
getRelationSymbol(byte r)
|
Reasoner |
getTellingReasoner()
A reasoner that handles assertions about the relations between time points. |
ReasoningStep |
getTimePointReasoningStep(Literal goal,
List substeps)
|
UndoManager |
getUndoManager()
|
void |
setMaxDepth(int m)
|
void |
setUndoManager(UndoManager undo)
|
Methods inherited from class jtp.util.PropertyImporter |
getImportedProperties, initializeBeanContextResources, setImportedProperties |
Methods inherited from class java.beans.beancontext.BeanContextChildSupport |
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, 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 |
Constructor Detail |
public TimePointKnowledgeStore(CanonicalMapping mapping, TimeVocabulary vocab)
Method Detail |
public int getMaxDepth()
public void setMaxDepth(int m)
public UndoManager getUndoManager()
public void setUndoManager(UndoManager undo)
public void createSubRelationRule()
(=> (and (subRelation ?psub ?prop) (holds ?psub ?x ?y)) (holds ?prop ?x ?y))This rule will be a substep in some of the reasoning steps returned by this reasoner.
public void createTransitivityRule()
(=> (and (type ?prop transitiveRelation) (holds ?prop ?x ?y) (holds ?prop ?y ?z)) (holds ?prop ?x ?z)) This rule will be a substep in some of the reasoning steps returned by this reasoner.Also creates reasoning step for the assertion
(type equal transitiveRelation)
.
public void createInverseRule()
(=> (and (inverse ?p1 ?p2) (holds ?p1 ?x ?y)) (holds ?p2 ?y ?x))This rule will be a substep in some of the reasoning steps returned by this reasoner.
Also creates reasoning steps for the assertions
(inverse before after)
and
(inverse before-or-equal after-or-equal)
public Reasoner getAskingReasoner()
before
, after
, equal-point
,
before-or-equal
, and after-or-equal
.
Whenever this reasoner is queried with one of the acceptable
time point relations,
at least one of the time points must not be a variable. That is,
this reasoner cannot process queries such as
(before ?x ?y)
.
The asking reasoner can also process queries which use the
relation location-of
. A query of the form
(location-of tp ?before ?after)
is asking the absolute
time points which are immediately before and after tp
on
the timeline.
This reasoner can also process queries of the form
(holds ?rel tp1 tp2)
. It will return all known relationships
between tp1
and tp2
as bindings for
?rel
.
getAskingReasoner
in interface KnowledgeStore
public Reasoner getTellingReasoner()
The relations that this reasoner can process include
before
, after
, equal-point
,
before-or-equal
, and after-or-equal
.
Time points can be specified as absolute time points or symbolic time
points. An example of an absolute time point specification is
(date (year 1998) (month 7) (day 8) (hour 0) (minute 0) (second 0))
,
which represents August 8, 1998 at 12:00:00 a.m.
The time point that represents the starting point of an interval named
foo
can be referred to as (starting-point foo)
.
Similarly, the time point that represents the ending point of foo
can be referred to as (ending-point foo)
getTellingReasoner
in interface KnowledgeStore
public byte getByteRelation(Symbol r)
public Symbol getRelationSymbol(byte r)
public ReasoningStep getTimePointReasoningStep(Literal goal, List substeps)
public ReasoningStep getPointEqualityReasoningStep(Object tp1, Object tp2, List substeps)
public ReasoningStep getPointRelationInverseReasoningStep(ReasoningStep sub)
public ReasoningStep getPointSubRelationReasoningStep(Symbol sub, Symbol prop, ReasoningStep rs)
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |