Class OutputCodec

java.lang.Object
de.saar.chorus.domgraph.codec.OutputCodec
Direct Known Subclasses:
DomgraphUdrawOutputCodec, DotOutputCodec, MultiOutputCodec

public abstract class OutputCodec extends Object
The abstract base class for all output codecs. Derived classes implement the method encode, which is responsible for writing an encoding of the labelled dominance graph to a writer.
Author:
Alexander Koller
  • Constructor Details

    • OutputCodec

      public OutputCodec()
  • Method Details

    • encode

      public abstract void encode(DomGraph graph, NodeLabels labels, Writer writer) throws IOException, MalformedDomgraphException
      Encodes a dominance graph into a string representation for this output codec. The dominance graph is defined by the arguments graph and labels. The USR is written to the writer.

      Parameters:
      graph - the dominance graph
      labels - the node labels for this dominance graph
      writer - the writer to which the encoded USR will be written
      Throws:
      IOException - if an I/O error occurred while writing to the writer
      MalformedDomgraphException - if the graph cannot be encoded by this codec