|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecty.io.IOHandler
y.io.GraphMLIOHandler
public class GraphMLIOHandler
Read and write a Graph2D in GraphML format.
This is mainly achieved by delegating the actual work to an instance of GraphMLHandler
which is accessible
through getGraphMLHandler()
.
For more information about the GraphML file format refer to the official GraphML Page.
![]() |
![]() |
![]() |
![]() |
Constructor Summary | |
---|---|
GraphMLIOHandler()
|
Method Summary | |
---|---|
void |
addEdgeRealizerSerializer(EdgeRealizerSerializer ers)
Convenience method to register an EdgeRealizerSerializer |
void |
addNodeRealizerSerializer(NodeRealizerSerializer nrs)
Convenience method to register a NodeRealizerSerializer |
protected Graph2DGraphMLHandler |
createGraphMLHandler()
Initialize the core GraphMLHandler. |
java.lang.String |
getFileFormatString()
Returns a descriptive string of the supported file format. |
java.lang.String |
getFileNameExtension()
Returns the file name extension of the supported file format. |
Graph2DGraphMLHandler |
getGraphMLHandler()
Get the GraphMLHandler implementation that does the low level work. |
void |
read(Graph2D graph,
org.w3c.dom.Document documentElement)
Read graph from an already parsed Document instance. |
void |
read(Graph2D graph,
java.io.InputStream in)
Adds the contents that are read from the stream to the given graph. |
void |
write(Graph2D graph,
java.io.OutputStream out)
Writes the contents of the given graph to a stream |
void |
write(Graph2D graph,
java.io.Writer out)
Write graph to a Writer instance. |
Methods inherited from class y.io.IOHandler |
---|
canRead, canWrite, canWriteSubset, createObjectInputStream, createObjectOutputStream, hide, read, read, shouldSerialize, shouldSerialize, write, writeSubset, writeSubset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphMLIOHandler()
Method Detail |
---|
public Graph2DGraphMLHandler getGraphMLHandler()
GraphMLHandler
implementation that does the low level work.
protected Graph2DGraphMLHandler createGraphMLHandler()
public void write(Graph2D graph, java.io.OutputStream out) throws java.io.IOException
IOHandler
write
in class IOHandler
java.io.IOException
public void write(Graph2D graph, java.io.Writer out) throws java.io.IOException
graph
to a Writer
instance.
java.io.IOException
public void read(Graph2D graph, java.io.InputStream in) throws java.io.IOException
IOHandler
read
in class IOHandler
java.io.IOException
public java.lang.String getFileFormatString()
IOHandler
getFileFormatString
in class IOHandler
public java.lang.String getFileNameExtension()
IOHandler
getFileNameExtension
in class IOHandler
public void addNodeRealizerSerializer(NodeRealizerSerializer nrs)
NodeRealizerSerializer
public void addEdgeRealizerSerializer(EdgeRealizerSerializer ers)
EdgeRealizerSerializer
public void read(Graph2D graph, org.w3c.dom.Document documentElement) throws java.io.IOException
graph
from an already parsed Document
instance.
Note: documentElement
must be parsed with namespace information, i.e.
DocumentBuilderFactory.setNamespaceAware(boolean)
must be set to true
.
java.io.IOException
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |