|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.stream.file.FileSinkSWF
public class FileSinkSWF
This class intends to output a dynamic graph into a Flash animation.
This work may never to any usable feature. Please do not try to use it or ask for help about it.
Constructor Summary | |
---|---|
FileSinkSWF()
|
Method Summary | |
---|---|
void |
begin(OutputStream stream)
Begin the output of the given stream of graph events. |
void |
begin(String fileName)
Begin the output of the given stream of graph events. |
void |
begin(Writer writer)
Begin the output of the given stream of graph events. |
void |
edgeAdded(String graphId,
long timeId,
String edgeId,
String fromNodeId,
String toNodeId,
boolean directed)
An edge was inserted in graph. |
void |
edgeAttributeAdded(String graphId,
long timeId,
String edgeId,
String attribute,
Object value)
A edge attribute was added. |
void |
edgeAttributeChanged(String graphId,
long timeId,
String edgeId,
String attribute,
Object oldValue,
Object newValue)
A edge attribute was changed. |
void |
edgeAttributeRemoved(String graphId,
long timeId,
String edgeId,
String attribute)
A edge attribute was removed. |
void |
edgeRemoved(String graphId,
long timeId,
String edgeId)
An edge of graph was removed.The nodes the edge connects may already have been removed from the graph. |
void |
end()
End the writing process started with FileSink.begin(OutputStream) or
FileSink.begin(String) . |
void |
flush()
Ensure all data sent to the output are correctly written. |
void |
graphAttributeAdded(String graphId,
long timeId,
String attribute,
Object value)
A graph attribute was added. |
void |
graphAttributeChanged(String graphId,
long timeId,
String attribute,
Object oldValue,
Object newValue)
A graph attribute was changed. |
void |
graphAttributeRemoved(String graphId,
long timeId,
String attribute)
A graph attribute was removed. |
void |
graphCleared(String graphId,
long timeId)
The whole graph was cleared. |
static void |
main(String[] args)
|
void |
nodeAdded(String graphId,
long timeId,
String nodeId)
A node was inserted in the given graph. |
void |
nodeAttributeAdded(String graphId,
long timeId,
String nodeId,
String attribute,
Object value)
A node attribute was added. |
void |
nodeAttributeChanged(String graphId,
long timeId,
String nodeId,
String attribute,
Object oldValue,
Object newValue)
A node attribute was changed. |
void |
nodeAttributeRemoved(String graphId,
long timeId,
String nodeId,
String attribute)
A node attribute was removed. |
void |
nodeRemoved(String graphId,
long timeId,
String nodeId)
A node was removed from the graph. |
void |
stepBegins(String graphId,
long timeId,
double time)
Since dynamic graphs are based on discrete event modifications, the notion of step is defined to simulate elapsed time between events. |
void |
writeAll(Graph graph,
OutputStream stream)
Write the current graph state in one big non-interruptible operation. |
void |
writeAll(Graph graph,
String fileName)
Write the current graph state in one big non-interruptible operation. |
void |
writeAll(Graph graph,
Writer writer)
Write the current graph state in one big non-interruptible operation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileSinkSWF()
Method Detail |
---|
public void begin(String fileName) throws IOException
FileSink
Source
or you can
directly use the methods inherited from Sink
. Once the writing is
started using begin(), you must close it using FileSink.end()
when done
to ensure data is correctly stored in the file.
begin
in interface FileSink
fileName
- The name of the file where to output the graph events.
IOException
- If an I/O error occurs while writing.public void begin(OutputStream stream) throws IOException
FileSink
Source
or you can
directly use the methods inherited from Sink
. Once the writing is
started using begin(), you must close it using FileSink.end()
when done
to ensure data is correctly stored in the file.
begin
in interface FileSink
stream
- The file stream where to output the graph events.
IOException
- If an I/O error occurs while writing.public void begin(Writer writer) throws IOException
FileSink
Source
or you can
directly use the methods inherited from Sink
. Once the writing is
started using begin(), you must close it using FileSink.end()
when done
to ensure data is correctly stored in the file.
begin
in interface FileSink
writer
- The writer where to output the graph events.
IOException
- If an I/O error occurs while writing.public void end() throws IOException
FileSink
FileSink.begin(OutputStream)
or
FileSink.begin(String)
.
end
in interface FileSink
IOException
public void flush() throws IOException
FileSink
flush
in interface FileSink
IOException
- If an I/O error occurs during write.public void writeAll(Graph graph, String fileName) throws IOException
FileSink
FileSink.begin(OutputStream)
or
FileSink.begin(String)
as soon as the graph appears (or any source of
graph event, any descendant of Source
will do).
writeAll
in interface FileSink
graph
- The graph to send as events to the file.fileName
- Name of the file to write.
IOException
- if an I/O error occurs while writing.public void writeAll(Graph graph, OutputStream stream) throws IOException
FileSink
FileSink.begin(Writer)
or
FileSink.begin(OutputStream)
or FileSink.begin(String)
as soon as the
graph appears (or any source of graph event, any descendant of
Source
will do).
writeAll
in interface FileSink
graph
- The graph to send as events to the file.stream
- The stream where the graph is sent.
IOException
- if an I/O error occurs while writing.public void writeAll(Graph graph, Writer writer) throws IOException
FileSink
FileSink.begin(Writer)
or
FileSink.begin(OutputStream)
or FileSink.begin(String)
as soon as the
graph appears (or any source of graph event, any descendant of
Source
will do).
writeAll
in interface FileSink
graph
- The graph to send as events to the file.writer
- The writer where the graph is sent.
IOException
- if an I/O error occurs while writing.public void edgeAttributeAdded(String graphId, long timeId, String edgeId, String attribute, Object value)
AttributeSink
edgeAttributeAdded
in interface AttributeSink
graphId
- Identifier of the graph where the change occurred.edgeId
- Identifier of the edge whose attribute changed.attribute
- The attribute name.value
- The attribute new value.public void edgeAttributeChanged(String graphId, long timeId, String edgeId, String attribute, Object oldValue, Object newValue)
AttributeSink
edgeAttributeChanged
in interface AttributeSink
graphId
- Identifier of the graph where the change occurred.edgeId
- Identifier of the edge whose attribute changed.attribute
- The attribute name.oldValue
- The attribute old value.newValue
- The attribute new value.public void edgeAttributeRemoved(String graphId, long timeId, String edgeId, String attribute)
AttributeSink
edgeAttributeRemoved
in interface AttributeSink
graphId
- Identifier of the graph where the attribute was removed.edgeId
- Identifier of the edge whose attribute was removed.attribute
- The removed attribute name.public void graphAttributeAdded(String graphId, long timeId, String attribute, Object value)
AttributeSink
graphAttributeAdded
in interface AttributeSink
graphId
- Identifier of the graph where the attribute changed.attribute
- The attribute name.value
- The attribute new value.public void graphAttributeChanged(String graphId, long timeId, String attribute, Object oldValue, Object newValue)
AttributeSink
graphAttributeChanged
in interface AttributeSink
graphId
- Identifier of the graph where the attribute changed.attribute
- The attribute name.oldValue
- The attribute old value.newValue
- The attribute new value.public void graphAttributeRemoved(String graphId, long timeId, String attribute)
AttributeSink
graphAttributeRemoved
in interface AttributeSink
graphId
- Identifier of the graph where the attribute was removed.attribute
- The removed attribute name.public void nodeAttributeAdded(String graphId, long timeId, String nodeId, String attribute, Object value)
AttributeSink
nodeAttributeAdded
in interface AttributeSink
graphId
- Identifier of the graph where the change occurred.nodeId
- Identifier of the node whose attribute changed.attribute
- The attribute name.value
- The attribute new value.public void nodeAttributeChanged(String graphId, long timeId, String nodeId, String attribute, Object oldValue, Object newValue)
AttributeSink
nodeAttributeChanged
in interface AttributeSink
graphId
- Identifier of the graph where the change occurred.nodeId
- Identifier of the node whose attribute changed.attribute
- The attribute name.oldValue
- The attribute old value.newValue
- The attribute new value.public void nodeAttributeRemoved(String graphId, long timeId, String nodeId, String attribute)
AttributeSink
nodeAttributeRemoved
in interface AttributeSink
graphId
- Identifier of the graph where the attribute was removed.nodeId
- Identifier of the node whose attribute was removed.attribute
- The removed attribute name.public void edgeAdded(String graphId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)
ElementSink
edgeAdded
in interface ElementSink
graphId
- 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.public void edgeRemoved(String graphId, long timeId, String edgeId)
ElementSink
edgeRemoved
in interface ElementSink
graphId
- The graph where the edge will be removed.edgeId
- The edge that will be removed.public void graphCleared(String graphId, long timeId)
ElementSink
graphCleared
in interface ElementSink
graphId
- The graph cleared.public void nodeAdded(String graphId, long timeId, String nodeId)
ElementSink
nodeAdded
in interface ElementSink
graphId
- Identifier of the graph where the node was added.nodeId
- Identifier of the added node.public void nodeRemoved(String graphId, long timeId, String nodeId)
ElementSink
nodeRemoved
in interface ElementSink
graphId
- Identifier of the graph where the node will be removed.nodeId
- Identifier of the removed node.public void stepBegins(String graphId, long timeId, double time)
ElementSink
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.
stepBegins
in interface ElementSink
graphId
- 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.public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |