Package moss

Class LiNoG

All Implemented Interfaces:
Serializable

public class LiNoG extends FreeNtn
Class for a simple line notation for (attributed) graphs
Since:
2007.07.02
See Also:
  • Constructor Details

    • LiNoG

      public LiNoG()
      Create an attributed graph line notation object.

      By default this notation uses FreeTypeMgr objects for the type managers, which can be extended dynamically.

      Since:
      2007.07.02 (Christian Borgelt)
    • LiNoG

      public LiNoG(TypeMgr nodemgr, TypeMgr edgemgr)
      Create an attributed graph line notation object.
      Parameters:
      nodemgr - the manager for the node types
      edgemgr - the manager for the edge types
      Since:
      2007.07.02 (Christian Borgelt)
  • Method Details

    • isLine

      public boolean isLine()
      Whether this is a line notation (single line description).
      Specified by:
      isLine in class Notation
      Returns:
      true, since LiNoG is a line notation
      Since:
      2007.07.02 (Christian Borgelt)
    • parse

      public Graph parse(Reader reader) throws IOException
      Parse a description of an attributed graph.
      Specified by:
      parse in class Notation
      Parameters:
      reader - the reader to read from
      Returns:
      the parsed attributed graph
      Throws:
      IOException - if a parse error or an i/o error occurs
      Since:
      2007.07.02 (Christian Borgelt)
    • describe

      public String describe(Graph graph)
      Create a description of a given attributed graph.
      Specified by:
      describe in class Notation
      Parameters:
      graph - the graph to describe
      Returns:
      a description of the given graph
      Since:
      2007.07.02 (Christian Borgelt)
    • write

      public void write(Graph graph, Writer writer) throws IOException
      Write a description of a graph.
      Specified by:
      write in class Notation
      Parameters:
      graph - the graph to write
      writer - the writer to write to
      Throws:
      IOException - if a read error occurred
      Since:
      2007.07.05 (Christian Borgelt)
    • main

      public static void main(String[] args)
      Main function for testing basic functionality.

      It is tried to parse the first argument as an LiNoG description of a graph. If this is successful, the parsed graph is printed using the function describe().

      Parameters:
      args - the command line arguments
      Since:
      2007.07.02 (Christian Borgelt)