org.graphstream.stream
Class GraphReplay
java.lang.Object
org.graphstream.stream.SourceBase
org.graphstream.stream.GraphReplay
- All Implemented Interfaces:
- Source
public class GraphReplay
- extends SourceBase
- implements Source
A simple source of graph events that takes an existing graph and creates a
flow of events by enumerating all nodes, edges and attributes of the graph.
The only method of this class is replay(Graph)
that takes a graph as
argument and :
- First exports all graph attributes as attribute-addition events.
- Then exports all nodes as node-creation events.
- For each node exports all the node attributes as attribute-addition
events.
- Then exports all edges ad edge-creation events.
- For each edge exports all the edge attribute as attribute-addition
events.
In this order.
Note that this is a source, not a pipe. This means that it has its own
identifier and is a producer of "new" events. Also note that is does not
export the dynamics of the graph, only its structure at the present time (the
evolution of the graph is not stored in the graph, to produce a dynamic flow
of events of the evolution of a graph you have to register the sinks in the
graph itself just after its creation).
Method Summary |
void |
replay(Graph graph)
Echo each element and attribute of the graph to the registered sinks. |
Methods inherited from class org.graphstream.stream.SourceBase |
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBegins |
GraphReplay
public GraphReplay(String id)
replay
public void replay(Graph graph)
- Echo each element and attribute of the graph to the registered sinks.
- Parameters:
graph
- The graph to export.
Copyright © 2013. All Rights Reserved.