|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.io.IOHandler | +--y.io.YGFIOHandler
Reading and Writing graphs in Y Graph Format (YGF).
Constructor Summary | |
YGFIOHandler()
Instantiates a new YGFIOHandler. |
Method Summary | |
static void |
addEncoding(String encodedName,
String decodedName)
Adds a new class name encoding to YGFIOHandler. |
protected Graph2D |
createInnerGraph(Node anchorNode)
Creates a new graph instance that is used as inner graph for a Graph2DNodeRealizer in case the read in graph is not part of a graph hierarchy. |
static String |
decode(String encodedName)
Decodes the external class name string generated by YGFIOHandler.encode(String) . |
static String |
encode(String decodedName)
Returns the external form of a given class name string. |
String |
getFileFormatString()
Returns the YGF file format string. |
String |
getFileNameExtension()
Returns the YGF file name extension, i.e. |
void |
read(Graph2D graph,
InputStream in)
Adds the contents reads from a stream to the given graph. |
protected void |
read(Graph2D graph,
ObjectInputStream in)
Fills the contents of the given graph from an ObjectInputStream. |
protected void |
readEdgeInfo(Graph2D graph,
Edge e,
ObjectInputStream in)
Reads edge information from the given input stream. |
protected void |
readEdgeRealizer(Graph2D graph,
Edge e,
ObjectInputStream in)
Reads edge realizer information from the input stream. |
protected void |
readFolderNodeInfo(Graph2D graph,
Node v,
ObjectInputStream in)
Reads in folder node information if the given graph was part of a graph hierarchy. |
protected void |
readGroupNodeInfo(Graph2D graph,
Node v,
ObjectInputStream in)
Reads in group node information if the given graph was part of a graph hierarchy and contained grouped nodes. |
protected void |
readInterEdgeInfo(Graph2D graph,
Edge e,
ObjectInputStream in)
Reads graph hierarchic inter edge information from the given input stream. |
protected void |
readNodeInfo(Graph2D graph,
Node v,
ObjectInputStream in)
Reads node information from the input stream. |
protected void |
readNodeRealizer(Graph2D graph,
Node v,
ObjectInputStream in)
Reads node realizer information from the input stream. |
protected void |
write(Graph2D graph,
ObjectOutputStream out)
Writes the contents of the given graph to an ObjectOutputStream. |
void |
write(Graph2D graph,
OutputStream out)
Writes the contents of the given graph in YGF format to a stream. |
protected void |
writeEdgeInfo(Graph2D graph,
Edge e,
ObjectOutputStream out)
Writes edge information to the output stream. |
protected void |
writeEdgeRealizer(Graph2D graph,
Edge e,
ObjectOutputStream out)
Writes edge realizer information to the given output stream. |
protected void |
writeFolderNodeInfo(Graph2D graph,
Node v,
ObjectOutputStream out)
Writes out folder node information if the given graph is part of a graph hierarchy. |
protected void |
writeGroupNodeInfo(Graph2D graph,
Node v,
ObjectOutputStream out)
Writes out group node information if the given graph is part of a graph hierarchy. |
protected void |
writeInterEdgeInfo(Graph2D graph,
Edge e,
ObjectOutputStream out)
Writes graph hierarchic inter edge information to the given output stream. |
protected void |
writeNodeInfo(Graph2D graph,
Node v,
ObjectOutputStream out)
Writes node information to the output stream. |
protected void |
writeNodeRealizer(Graph2D graph,
Node v,
ObjectOutputStream out)
Writes node realizer information to the output stream. |
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 YGFIOHandler()
Method Detail |
public static void addEncoding(String encodedName, String decodedName)
YGFIOHandler.encode(String)
and YGFIOHandler.decode(String)
can be used to translate between encoded and decoded names.
public static String encode(String decodedName)
public static String decode(String encodedName)
YGFIOHandler.encode(String)
. If the given name can't be
decoded, the encoded name itself will be returned.
public String getFileFormatString()
getFileFormatString
in class IOHandler
public String getFileNameExtension()
getFileNameExtension
in class IOHandler
public void write(Graph2D graph, OutputStream out) throws IOException
write
in class IOHandler
IOException
protected void write(Graph2D graph, ObjectOutputStream out) throws IOException
IOException
protected void writeEdgeInfo(Graph2D graph, Edge e, ObjectOutputStream out) throws IOException
IOException
e
- The edge for which information is written outprotected void writeEdgeRealizer(Graph2D graph, Edge e, ObjectOutputStream out) throws IOException
IOException
protected void writeInterEdgeInfo(Graph2D graph, Edge e, ObjectOutputStream out) throws IOException
IOException
protected void writeNodeInfo(Graph2D graph, Node v, ObjectOutputStream out) throws IOException
IOException
v
- The node for which information is written outprotected void writeNodeRealizer(Graph2D graph, Node v, ObjectOutputStream out) throws IOException
IOException
v
- The node for which information is written outprotected void writeFolderNodeInfo(Graph2D graph, Node v, ObjectOutputStream out) throws IOException
IOException
protected void writeGroupNodeInfo(Graph2D graph, Node v, ObjectOutputStream out) throws IOException
IOException
public void read(Graph2D graph, InputStream in) throws IOException
IOHandler
read
in class IOHandler
IOException
protected void read(Graph2D graph, ObjectInputStream in) throws IOException
IOException
protected void readNodeInfo(Graph2D graph, Node v, ObjectInputStream in) throws IOException
IOException
v
- The node for which information is read ingraph
- The graph that is the owner of the given node.protected void readNodeRealizer(Graph2D graph, Node v, ObjectInputStream in) throws IOException
IOException
v
- The node for which information is read ingraph
- The graph that is the owner of the given node.protected Graph2D createInnerGraph(Node anchorNode)
anchorNode
- the anchor node for which to create an inner graph.
protected void readFolderNodeInfo(Graph2D graph, Node v, ObjectInputStream in) throws IOException
IOException
protected void readGroupNodeInfo(Graph2D graph, Node v, ObjectInputStream in) throws IOException
IOException
protected void readEdgeInfo(Graph2D graph, Edge e, ObjectInputStream in) throws IOException
IOException
e
- The edge for which information is read in.protected void readEdgeRealizer(Graph2D graph, Edge e, ObjectInputStream in) throws IOException
IOException
e
- The edge for which information is read ingraph
- The graph that is the owner of the given edgeprotected void readInterEdgeInfo(Graph2D graph, Edge e, ObjectInputStream in) throws IOException
IOException
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |