org.grinvin.io
Class GraphSaver
java.lang.Object
org.grinvin.io.GraphSaver
public class GraphSaver
extends java.lang.Object
Saves a
GraphView
as a
graph.xml-section onto an output
stream.
Map | getVertexMap() - Return the vertex map for this graph.
|
void | save(OutputStream out) - Save the graph onto the output stream.
|
Element | toElement() - Create a JDOM-element that represents the abstract graph
for this initializer.
|
GraphSaver
public GraphSaver(GraphView graph)
Creates a new instance of this saver for the given abstract graph.
Initializes the vertex map.
getVertexMap
public Map getVertexMap()
Return the vertex map for this graph. This map can be used by other
savers to translate actual vertex objects to vertex numbers.
save
public void save(OutputStream out)
throws IOException
Save the graph onto the output stream.
out
- Output stream to which the result shall be written.
toElement
public Element toElement()
Create a JDOM-element that represents the abstract graph
for this initializer.