org.graphstream.stream
Class GraphReplay

java.lang.Object
  extended by org.graphstream.stream.SourceBase
      extended by 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 :

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


Nested Class Summary
 
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
SourceBase.ElementType
 
Constructor Summary
GraphReplay(String id)
           
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graphstream.stream.Source
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
 

Constructor Detail

GraphReplay

public GraphReplay(String id)
Method Detail

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.