Package org.graphstream.stream
Class Timeline
java.lang.Object
org.graphstream.stream.Timeline
- All Implemented Interfaces:
Iterable<Graph>
,Replayable
,Source
public class Timeline extends Object implements Source, Replayable, Iterable<Graph>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.graphstream.stream.Replayable
Replayable.Controller
-
Field Summary
Fields Modifier and Type Field Description static String
TIME_PREFIX
-
Constructor Summary
Constructors Constructor Description Timeline()
-
Method Summary
Modifier and Type Method Description void
addAttributeSink(AttributeSink sink)
Add a sink for attribute events only.void
addElementSink(ElementSink sink)
Add a sink for elements events only.void
addSink(Sink sink)
Add a sink for all graph events (attributes and graph elements) coming from this source.void
begin(Graph source)
void
begin(Source source)
void
clearAttributeSinks()
Remove all listener attribute sinks.void
clearElementSinks()
Remove all listener element sinks.void
clearSinks()
Remove all listener sinks.void
end()
Replayable.Controller
getReplayController()
Get a controller to replay the graph.boolean
hasNext()
boolean
hasPrevious()
Iterator<Graph>
iterator()
static void
main(String... strings)
void
next()
void
play()
void
play(double from, double to)
void
play(double from, double to, Sink sink)
void
play(Sink sink)
void
playback()
void
playback(Sink sink)
void
previous()
void
removeAttributeSink(AttributeSink sink)
Remove an attribute sink.void
removeElementSink(ElementSink sink)
Remove an element sink.void
removeSink(Sink sink)
Remove a sink.void
reset()
void
seek(int i)
void
seekEnd()
void
seekStart()
-
Field Details
-
TIME_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Timeline
public Timeline()
-
-
Method Details
-
reset
public void reset() -
play
public void play(double from, double to) -
play
-
play
public void play() -
play
-
playback
public void playback() -
playback
-
seek
public void seek(int i) -
seekStart
public void seekStart() -
seekEnd
public void seekEnd() -
hasNext
public boolean hasNext() -
next
public void next() -
hasPrevious
public boolean hasPrevious() -
previous
public void previous() -
begin
- Parameters:
source
-
-
begin
- Parameters:
source
-
-
end
public void end() -
iterator
-
getReplayController
Description copied from interface:Replayable
Get a controller to replay the graph.- Specified by:
getReplayController
in interfaceReplayable
- Returns:
- a new replay controller
-
addSink
Description copied from interface:Source
Add a sink for all graph events (attributes and graph elements) coming from this source. This is similar to registering a sink for attributes an another for elements. -
removeSink
Description copied from interface:Source
Remove a sink.- Specified by:
removeSink
in interfaceSource
- Parameters:
sink
- The sink to remove, if it does not exist, this is ignored silently.
-
addAttributeSink
Description copied from interface:Source
Add a sink for attribute events only. Attribute events include attribute addition change and removal.- Specified by:
addAttributeSink
in interfaceSource
- Parameters:
sink
- The sink to register.
-
removeAttributeSink
Description copied from interface:Source
Remove an attribute sink.- Specified by:
removeAttributeSink
in interfaceSource
- Parameters:
sink
- The sink to remove, if it does not exist, this is ignored silently.
-
addElementSink
Description copied from interface:Source
Add a sink for elements events only. Elements events include, addition and removal of nodes and edges, as well as step events.- Specified by:
addElementSink
in interfaceSource
- Parameters:
sink
- The sink to register.
-
removeElementSink
Description copied from interface:Source
Remove an element sink.- Specified by:
removeElementSink
in interfaceSource
- Parameters:
sink
- The sink to remove, if it does not exist, this is ignored silently.
-
clearElementSinks
public void clearElementSinks()Description copied from interface:Source
Remove all listener element sinks.- Specified by:
clearElementSinks
in interfaceSource
-
clearAttributeSinks
public void clearAttributeSinks()Description copied from interface:Source
Remove all listener attribute sinks.- Specified by:
clearAttributeSinks
in interfaceSource
-
clearSinks
public void clearSinks()Description copied from interface:Source
Remove all listener sinks.- Specified by:
clearSinks
in interfaceSource
-
main
- Throws:
Exception
-