jtp.time.demod
Class TimePointMapper
java.lang.Object
|
+--jtp.time.demod.TimePointMapper
- public class TimePointMapper
- extends Object
Class that searches CNFSentences for various temporal functional terms
and maps them to an instance of the appropriate data structure
(usually TimePoint
or CalendarTimePoint
).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimePointMapper
public TimePointMapper(CanonicalMapping mapping,
TimeVocabulary vocab)
getMapping
public CanonicalMapping getMapping()
setTLGraph
public void setTLGraph(TLGraph graph)
mapTimePoints
public void mapTimePoints(CNFSentence sent)
throws ReasoningException
ReasoningException
mapTimePoints
public void mapTimePoints(CNFSentence sent,
boolean mapSymbols)
throws ReasoningException
ReasoningException
mapTimePoints
public void mapTimePoints(Clause cl)
throws ReasoningException
ReasoningException
mapTimePoints
public void mapTimePoints(Clause cl,
boolean mapSymbols)
throws ReasoningException
ReasoningException
mapTimePoints
public void mapTimePoints(Literal lit)
throws ReasoningException
ReasoningException
mapTimePoints
public void mapTimePoints(Literal lit,
boolean mapSymbols)
throws ReasoningException
ReasoningException
mapTimePoints
public void mapTimePoints(List lst)
throws ReasoningException
ReasoningException
mapTimePoints
public void mapTimePoints(List lst,
boolean mapSymbols)
throws ReasoningException
ReasoningException
mapTimePoint
public TimePoint mapTimePoint(Object obj)
throws ReasoningException
ReasoningException
mapTimePoint
public TimePoint mapTimePoint(Object obj,
boolean mapSymbols)
throws ReasoningException
ReasoningException
isIntervalEndPoint
public boolean isIntervalEndPoint(List l)
isTimeIntervalFnPoint
protected boolean isTimeIntervalFnPoint(List l)
isMetricPoint
public boolean isMetricPoint(List l)
getMetricPoint
public TimePoint getMetricPoint(List datespec)
throws ReasoningException
ReasoningException
addMetricPointToGraph
protected void addMetricPointToGraph(CalendarTimePoint ctp,
CalendarTimePoint[] beforeAfter)
throws ReasoningException
ReasoningException
getTimePoint
public TimePoint getTimePoint(Object tpspec)
getTimeIntervalFnPoint
public TimePoint getTimeIntervalFnPoint(List tpspec)
throws ReasoningException
- If funtion element is of the form
(starting-point (time-interval-fn A B)), then replace
the expression with A. If it's (ending-point (time-interval-fn A B)),
then expression with B. May need to map A or B to a "real"
TimePoint.
ReasoningException