Class GMLReader
java.lang.Object
org.graffiti.plugin.io.AbstractInputSerializer
org.graffiti.plugins.ios.importers.gml.GMLReader
- All Implemented Interfaces:
InputSerializer
,Serializer
public class GMLReader extends AbstractInputSerializer
This class provides a reader for graphs in gml format.
- See Also:
AbstractIOSerializer
-
Constructor Summary
Constructors Constructor Description GMLReader()
Constructs a newGMLReader
-
Method Summary
Modifier and Type Method Description String[]
getExtensions()
Returns the extensions supported by this reader.String[]
getFileTypeDescriptions()
The file type descriptions of the files the serializer can read or write.Graph
read(InputStream in)
Reads in a graph from the given input stream.void
read(InputStream in, Graph g)
Reads in a graph from the given input stream.void
read(Reader reader, Graph newGraph)
Methods inherited from class org.graffiti.plugin.io.AbstractInputSerializer
read, read, validFor
-
Constructor Details
-
GMLReader
public GMLReader()Constructs a newGMLReader
-
-
Method Details
-
getExtensions
Returns the extensions supported by this reader.- Returns:
- the extensions supported by this reader.
-
getFileTypeDescriptions
Description copied from interface:Serializer
The file type descriptions of the files the serializer can read or write.- Returns:
- DOCUMENT ME!
-
read
Reads in a graph from the given input stream.GraphElements
read are cloned when added to the graph. Consider using theread(InputStream)
method when you start with an empty graph.- Specified by:
read
in interfaceInputSerializer
- Specified by:
read
in classAbstractInputSerializer
- Parameters:
in
- theInputStream
from which to read in the graph.g
- the graph in which to read in the file.- Throws:
IOException
-
read
Reads in a graph from the given input stream. This implementation returns an instance ofOptAdjListGraph
(that's what the parser returns).- Specified by:
read
in interfaceInputSerializer
- Overrides:
read
in classAbstractInputSerializer
- Parameters:
in
- The input stream to read the graph from.- Returns:
- The newly read graph (an instance of
OptAdjListGraph
). - Throws:
IOException
- If an IO error occurs.ParserException
- DOCUMENT ME!
-
read
-