de.saar.chorus.domgraph.codec.mrs
Class MrsXmlInputCodec

Object
  extended by InputCodec
      extended by MrsXmlInputCodec

public class MrsXmlInputCodec
extends InputCodec


Constructor Summary
MrsXmlInputCodec(Normalisation normalisation)
           
 
Method Summary
 void decode(Reader inputStream, DomGraph graph, NodeLabels labels)
          Reads an USR representation from a Reader.
 
Methods inherited from class InputCodec
getReaderForSpecification
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MrsXmlInputCodec

public MrsXmlInputCodec(Normalisation normalisation)
Method Detail

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