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.Graphread(InputStream in)Reads in a graph from the given input stream.voidread(InputStream in, Graph g)Reads in a graph from the given input stream.voidread(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:SerializerThe 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.GraphElementsread are cloned when added to the graph. Consider using theread(InputStream)method when you start with an empty graph.- Specified by:
readin interfaceInputSerializer- Specified by:
readin classAbstractInputSerializer- Parameters:
in- theInputStreamfrom 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:
readin interfaceInputSerializer- Overrides:
readin 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
-