JTP API Documentation

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).


Constructor Summary
TimePointMapper(CanonicalMapping mapping, TimeVocabulary vocab)
           
 
Method Summary
protected  void addMetricPointToGraph(CalendarTimePoint ctp, CalendarTimePoint[] beforeAfter)
           
 CanonicalMapping getMapping()
           
 TimePoint getMetricPoint(List datespec)
           
 TimePoint getTimeIntervalFnPoint(List tpspec)
          If funtion element is of the form (starting-point (time-interval-fn A B)), then replace the expression with A.
 TimePoint getTimePoint(Object tpspec)
           
 boolean isIntervalEndPoint(List l)
           
 boolean isMetricPoint(List l)
           
protected  boolean isTimeIntervalFnPoint(List l)
           
 TimePoint mapTimePoint(Object obj)
           
 TimePoint mapTimePoint(Object obj, boolean mapSymbols)
           
 void mapTimePoints(Clause cl)
           
 void mapTimePoints(Clause cl, boolean mapSymbols)
           
 void mapTimePoints(CNFSentence sent)
           
 void mapTimePoints(CNFSentence sent, boolean mapSymbols)
           
 void mapTimePoints(List lst)
           
 void mapTimePoints(List lst, boolean mapSymbols)
           
 void mapTimePoints(Literal lit)
           
 void mapTimePoints(Literal lit, boolean mapSymbols)
           
 void setTLGraph(TLGraph graph)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimePointMapper

public TimePointMapper(CanonicalMapping mapping,
                       TimeVocabulary vocab)
Method Detail

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

JTP API Documentation