|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.IOHandler y.io.GMLIOHandler y.io.XGMLIOHandler
public class XGMLIOHandler
This class is closely related to GMLIOHandler, it produces structurally the same output as GMLIOHandler but uses well formed xml for the actual writing and reading. A very simple and thus highly extensible DTD is being used for this "gml over xml" format.
Note that this class can only be used with J2SE 1.4 or higher.
Constructor Summary | |
---|---|
XGMLIOHandler()
Creates a new instance of XGMLIOHandler |
Method Summary | |
---|---|
java.lang.String |
getFileFormatString()
Returns the XGML file format string. |
java.lang.String |
getFileNameExtension()
Returns the XGML file name extension, i.e. |
protected void |
read(Graph2D graph,
org.xml.sax.InputSource source)
Fills the contents of the given graph from the given XGML document. |
void |
read(Graph2D graph,
java.io.InputStream in)
Adds the contents from the given stream to the given graph. |
protected void |
read(Graph2D graph,
java.io.Reader reader)
Fills the contents of the given graph from a reader. |
void |
read(Graph2D graph,
java.lang.String name)
Generates a FileReader and passes control
to GMLIOHandler.read(y.view.Graph2D, java.io.Reader) |
void |
write(Graph2D graph,
java.io.OutputStream out)
Writes the contents of the given graph in GML format to a stream. |
Methods inherited from class y.io.GMLIOHandler |
---|
convertColor, decodeColor, getEncoderFactory, getParserFactory, setEncoderFactory, setParserFactory |
Methods inherited from class y.io.IOHandler |
---|
canRead, canWrite, canWriteSubset, createObjectInputStream, createObjectOutputStream, hide, 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 XGMLIOHandler()
Method Detail |
---|
public java.lang.String getFileFormatString()
getFileFormatString
in class GMLIOHandler
public java.lang.String getFileNameExtension()
getFileNameExtension
in class GMLIOHandler
public void write(Graph2D graph, java.io.OutputStream out) throws java.io.IOException
GMLIOHandler
ObjectEncoder.encode(Object, y.io.gml.GMLEncoder)
method
with the graph as the first argument.
write
in class GMLIOHandler
graph
- the graph to be writtenout
- The OutputStream being written to.
java.io.IOException
- in case of an I/O Exceptionprotected void read(Graph2D graph, java.io.Reader reader) throws java.io.IOException
read
in class GMLIOHandler
graph
- the graph to be filledreader
- The reader being read from
java.io.IOException
- in case of an I/O Exceptionpublic void read(Graph2D graph, java.io.InputStream in) throws java.io.IOException
GMLIOHandler
read
in class GMLIOHandler
in
- The input stream being read from
java.io.IOException
protected void read(Graph2D graph, org.xml.sax.InputSource source) throws java.io.IOException
graph
- the graph to be filledsource
- the input source to be read from.
java.io.IOException
- in case of an I/O exceptionpublic void read(Graph2D graph, java.lang.String name) throws java.io.IOException
GMLIOHandler
FileReader
and passes control
to GMLIOHandler.read(y.view.Graph2D, java.io.Reader)
read
in class GMLIOHandler
graph
- the graphname
- the filename
java.io.IOException
- in the case of an I/O error
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |