Package edu.fiu.jtlex.data
Class Timeline
java.lang.Object
edu.fiu.jtlex.data.Timeline
Default implementation of
ITimeline.- Since:
- Revision 260
- Author:
- Emmanuel Garcia
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a List containing the breaking points.Returns the first timepoint in the Timeline.Returns the last timepoint in the Timeline.Returns theList<String>representation of the main Timeline in the graph.Returns an ArrayList containing the Timelines belonging to the subordinating subgraphs.intReturns the number of events in the timeline.intReturns the total number of subordination branches in the graph.intReturns number of timepoints.booleanhasNext()Checks if there are Timeline elements remaining in the list.iterator()Returns an iterator object that is used in for-each loops.next()Returns next String representation of an event on the timeline.toJSON()Returns the JSON (RFC 8259) representation of the Timeline.toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
Timeline
Represents a Timeline of a TimeML graph, which is an ordered list of the events extracted from a TimeML Graph. TimeML annotations are converted into a collection of main and subordinated timelines arranged into a trunk-and-branch style structure. This class takes an ordered timeline, a set of attachment links, arranging them into a Timeline.- Parameters:
Timeline- produced by the Solve() method in the GraphTCSP.java class.singleSlinks-Set<ILink>produced by the partitionLinks() method in the Partitioner.java class.- Throws:
NullPointerException- if Timeline argument isnull
-
-
Method Details
-
iterator
Returns an iterator object that is used in for-each loops. -
hasNext
public boolean hasNext()Checks if there are Timeline elements remaining in the list. -
next
Returns next String representation of an event on the timeline. -
getMainTimeline
Returns theList<String>representation of the main Timeline in the graph.- Specified by:
getMainTimelinein interfaceITimeline- Returns:
- the
List<String>representation of the main Timeline in the graph. - Since:
- Revision 260
-
getSubordinationTimelines
Returns an ArrayList containing the Timelines belonging to the subordinating subgraphs.- Specified by:
getSubordinationTimelinesin interfaceITimeline- Returns:
- an ArrayList containing the Timelines belonging to the subordinating subgraphs.
- Since:
- Revision 260
-
getTotalTimePoints
public int getTotalTimePoints()Returns number of timepoints.- Specified by:
getTotalTimePointsin interfaceITimeline- Returns:
- the number of timepoints.
- Since:
- Revision 260
-
getAttachmentPoints
Returns a List containing the breaking points.- Specified by:
getAttachmentPointsin interfaceITimeline- Returns:
- a List containing the breaking points.
- Since:
- Revision 260
-
getFirstPoint
Returns the first timepoint in the Timeline.- Specified by:
getFirstPointin interfaceITimeline- Returns:
- the first timepoint in the Timeline.
- Since:
- Revision 260
-
getLastPoint
Returns the last timepoint in the Timeline.- Specified by:
getLastPointin interfaceITimeline- Returns:
- the last timepoint in the Timeline.
- Since:
- Revision 260
-
getTimelineLength
public int getTimelineLength()Returns the number of events in the timeline.- Specified by:
getTimelineLengthin interfaceITimeline- Returns:
- the number of events in the timeline.
- Since:
- Revision 260
-
getTotalSubordinationBranches
public int getTotalSubordinationBranches()Returns the total number of subordination branches in the graph.- Specified by:
getTotalSubordinationBranchesin interfaceITimeline- Returns:
- the total number of subordination branches in the graph.
- Since:
- Revision 260
-
toString
-
toJSON
Returns the JSON (RFC 8259) representation of the Timeline.
-