Class MrsXmlInputCodec

java.lang.Object
de.saar.chorus.domgraph.codec.InputCodec
de.saar.chorus.domgraph.codec.mrs.MrsXmlInputCodec

public class MrsXmlInputCodec extends InputCodec
  • Constructor Details

  • Method Details

    • decode

      public void decode(Reader inputStream, DomGraph graph, NodeLabels labels) throws MalformedDomgraphException, IOException, ParserException
      Description copied from class: InputCodec
      Reads an USR representation from a Reader. This method converts the USR into an equivalent labelled dominance graph and stores this graph in a DomGraph and the labels in a NodeLabels object. You must implement this method in every concrete input codec.

      The graph and labels objects passed to this method need not be empty; it is the responsibility of this method to clear them first.

      Specified by:
      decode in class InputCodec
      Parameters:
      inputStream - the reader from which the USR is read
      graph - the dominance graph into which the USR is converted
      labels - the node labels of the labelled dominance graph
      Throws:
      MalformedDomgraphException - if a semantic error occurred, i.e. the USR cannot be converted into a dominance graph
      IOException - if an I/O error occurred while reading from reader
      ParserException - if a syntactic error occurred while parsing the USR