public interface ElementSink
Graph elements listeners are called each time an element of the graph (node or edge) is added or removed. It is also called for special events like "steps" that introduce the notion of time in graphs.
Modifier and Type  Method and Description 

void 
edgeAdded(String sourceId,
long timeId,
String edgeId,
String fromNodeId,
String toNodeId,
boolean directed)
An edge was inserted in graph.

void 
edgeRemoved(String sourceId,
long timeId,
String edgeId)
An edge of graph was removed.The nodes the edge connects may already have
been removed from the graph.

void 
graphCleared(String sourceId,
long timeId)
The whole graph was cleared.

void 
nodeAdded(String sourceId,
long timeId,
String nodeId)
A node was inserted in the given graph.

void 
nodeRemoved(String sourceId,
long timeId,
String nodeId)
A node was removed from the graph.

void 
stepBegins(String sourceId,
long timeId,
double step)
Since dynamic graphs are based on discrete event modifications, the
notion of step is defined to simulate elapsed time between events.

void nodeAdded(String sourceId, long timeId, String nodeId)
sourceId
 Identifier of the graph where the node was added.nodeId
 Identifier of the added node.void nodeRemoved(String sourceId, long timeId, String nodeId)
sourceId
 Identifier of the graph where the node will be removed.nodeId
 Identifier of the removed node.void edgeAdded(String sourceId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)
sourceId
 Identifier of the graph where the edge was added.edgeId
 Identifier of the added edge.fromNodeId
 Identifier of the first node of the edge.toNodeId
 Identifier of the second node of the edge.directed
 If true, the edge is directed.void edgeRemoved(String sourceId, long timeId, String edgeId)
sourceId
 The graph where the edge will be removed.edgeId
 The edge that will be removed.void graphCleared(String sourceId, long timeId)
sourceId
 The graph cleared.void stepBegins(String sourceId, long timeId, double step)
Since dynamic graphs are based on discrete event modifications, the notion of step is defined to simulate elapsed time between events. So a step is a event that occurs in the graph, it does not modify it but it gives a kind of timestamp that allow the tracking of the progress of the graph over the time.
This kind of event is useful for dynamic algorithms that listen to the dynamic graph and need to measure the time in the graph's evolution.
sourceId
 Identifier of the graph where the step starts.timeId
 A numerical value that may give a timestamp to track the
evolution of the graph over the time.WebARTS Library Licensed Under the GNU  General Public License. Other Libraries licensed under their respective Open Source Licenses