Package moss

Class GraphWriter

All Implemented Interfaces:
Closeable, Flushable, Serializable, Appendable, AutoCloseable
Direct Known Subclasses:
LineWriter, NEListWriter, SDfileWriter

public abstract class GraphWriter extends TableWriter implements Serializable
Class for a writer for graph data sets.
Since:
2007.02.24
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    the absolute support in the complement
    protected float
    the relative support in the complement
    protected String
    the description of the current graph
    static final int
    read mode: whether graphs/substructures are directed
    protected int
    the number of edges of the current graph
    static final int
    write mode mask: table input formats
    protected Graph
    the current graph
    static final int
    write mode: graphs
    protected int
    the write mode
    protected String
    the name of the current graph
    protected int
    the number of nodes of the current graph
    protected Notation
    the notation for the graphs
    protected int
    the absolute support in the focus
    protected float
    the relative support in the focus
    static final int
    write mode: substructures
    protected float
    the value associated with the current graph

    Fields inherited from class moss.TableWriter

    fldsep, HEADER, recsep

    Fields inherited from class java.io.Writer

    lock
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    GraphWriter(Writer writer, int mode)
    Create a writer for a graph data set.
  • Method Summary

    Modifier and Type
    Method
    Description
    createWriter(Writer writer, int mode, String format)
    Create a graph writer for a given format and mode.
    int
    Get the mode of the graph writer.
    Get the notation of the graph writer.
    void
    setAbsCompl(int supp)
    Set the absolute complement support of the current substructure.
    void
    setAbsSupp(int supp)
    Set the absolute focus support of the current substructure.
    void
    setGraph(Graph graph)
    Set the current graph or substructure.
    void
    Set the name of the current graph.
    void
    setRelCompl(float supp)
    Set the relative complement support of the current substructure.
    void
    setRelSupp(float supp)
    Set the relative focus support of the current substructure.
    void
    setValue(float value)
    Set the value associated with the current graph.
    abstract void
    Write the current graph description.
    abstract void
    Write a header.

    Methods inherited from class moss.TableWriter

    setChars, writeField, writeField, writeField

    Methods inherited from class java.io.BufferedWriter

    close, flush, newLine, write, write, write

    Methods inherited from class java.io.Writer

    append, append, append, nullWriter, write, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • GRAPHS

      public static final int GRAPHS
      write mode: graphs
      See Also:
    • SUBS

      public static final int SUBS
      write mode: substructures
      See Also:
    • DIRECTED

      public static final int DIRECTED
      read mode: whether graphs/substructures are directed
      See Also:
    • FMTMASK

      public static final int FMTMASK
      write mode mask: table input formats
      See Also:
    • mode

      protected int mode
      the write mode
    • ntn

      protected Notation ntn
      the notation for the graphs
    • name

      protected String name
      the name of the current graph
    • desc

      protected String desc
      the description of the current graph
    • graph

      protected Graph graph
      the current graph
    • value

      protected float value
      the value associated with the current graph
    • nodes

      protected int nodes
      the number of nodes of the current graph
    • edges

      protected int edges
      the number of edges of the current graph
    • sabs

      protected int sabs
      the absolute support in the focus
    • srel

      protected float srel
      the relative support in the focus
    • cabs

      protected int cabs
      the absolute support in the complement
    • crel

      protected float crel
      the relative support in the complement
  • Constructor Details

    • GraphWriter

      protected GraphWriter(Writer writer, int mode)
      Create a writer for a graph data set.
      Parameters:
      writer - the writer to write to
      mode - the write mode
      Since:
      2007.06.29 (Christian Borgelt)
  • Method Details

    • getMode

      public int getMode()
      Get the mode of the graph writer.
      Returns:
      the mode of the graph writer
      Since:
      2007.03.04 (Christian Borgelt)
    • getNotation

      public Notation getNotation()
      Get the notation of the graph writer.
      Returns:
      the notation of the graph writer
      Since:
      2007.03.04 (Christian Borgelt)
    • setName

      public void setName(String name)
      Set the name of the current graph.
      Parameters:
      name - the name of the current graph
      Since:
      2007.03.04 (Christian Borgelt)
    • setGraph

      public void setGraph(Graph graph)
      Set the current graph or substructure.
      Parameters:
      graph - the graph or substructure to set
      Since:
      2007.03.04 (Christian Borgelt)
    • setValue

      public void setValue(float value)
      Set the value associated with the current graph.
      Parameters:
      value - the value associated with the current graph
      Since:
      2007.03.04 (Christian Borgelt)
    • setAbsSupp

      public void setAbsSupp(int supp)
      Set the absolute focus support of the current substructure.
      Parameters:
      supp - the absolute focus support
      Since:
      2007.03.04 (Christian Borgelt)
    • setRelSupp

      public void setRelSupp(float supp)
      Set the relative focus support of the current substructure.
      Parameters:
      supp - the relative focus support
      Since:
      2007.03.04 (Christian Borgelt)
    • setAbsCompl

      public void setAbsCompl(int supp)
      Set the absolute complement support of the current substructure.
      Parameters:
      supp - the absolute complement support
      Since:
      2007.03.04 (Christian Borgelt)
    • setRelCompl

      public void setRelCompl(float supp)
      Set the relative complement support of the current substructure.
      Parameters:
      supp - the relative complement support
      Since:
      2007.03.04 (Christian Borgelt)
    • writeHeader

      public abstract void writeHeader() throws IOException
      Write a header.
      Throws:
      IOException - if an i/o error occurs
      Since:
      2007.03.04 (Christian Borgelt)
    • writeGraph

      public abstract void writeGraph() throws IOException
      Write the current graph description.
      Throws:
      IOException - if an i/o error occurs
      Since:
      2007.03.04 (Christian Borgelt)
    • createWriter

      public static GraphWriter createWriter(Writer writer, int mode, String format)
      Create a graph writer for a given format and mode.
      Parameters:
      writer - the writer to write to
      mode - the write mode
      format - the name of the format
      Returns:
      the created input/output format
      Since:
      2007.03.04 (Christian Borgelt)