Class MrsXmlInputCodec
java.lang.Object
de.saar.chorus.domgraph.codec.InputCodec
de.saar.chorus.domgraph.codec.mrs.MrsXmlInputCodec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(Reader inputStream, DomGraph graph, NodeLabels labels) Reads an USR representation from aReader.Methods inherited from class de.saar.chorus.domgraph.codec.InputCodec
getReaderForSpecification
-
Constructor Details
-
MrsXmlInputCodec
-
-
Method Details
-
decode
public void decode(Reader inputStream, DomGraph graph, NodeLabels labels) throws MalformedDomgraphException, IOException, ParserException Description copied from class:InputCodecReads an USR representation from aReader. This method converts the USR into an equivalent labelled dominance graph and stores this graph in aDomGraphand the labels in aNodeLabelsobject. 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:
decodein classInputCodec- Parameters:
inputStream- the reader from which the USR is readgraph- the dominance graph into which the USR is convertedlabels- 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 graphIOException- if an I/O error occurred while reading fromreaderParserException- if a syntactic error occurred while parsing the USR
-