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 Details

    • GMLReader

      public GMLReader()
      Constructs a new GMLReader
  • Method Details

    • getExtensions

      public String[] getExtensions()
      Returns the extensions supported by this reader.
      Returns:
      the extensions supported by this reader.
    • getFileTypeDescriptions

      public String[] getFileTypeDescriptions()
      Description copied from interface: Serializer
      The file type descriptions of the files the serializer can read or write.
      Returns:
      DOCUMENT ME!
    • read

      public void read​(InputStream in, Graph g) throws IOException
      Reads in a graph from the given input stream. GraphElements read are cloned when added to the graph. Consider using the read(InputStream) method when you start with an empty graph.
      Specified by:
      read in interface InputSerializer
      Specified by:
      read in class AbstractInputSerializer
      Parameters:
      in - the InputStream from which to read in the graph.
      g - the graph in which to read in the file.
      Throws:
      IOException
    • read

      public Graph read​(InputStream in) throws IOException
      Reads in a graph from the given input stream. This implementation returns an instance of OptAdjListGraph (that's what the parser returns).
      Specified by:
      read in interface InputSerializer
      Overrides:
      read in class AbstractInputSerializer
      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

      public void read​(Reader reader, Graph newGraph)