org.schwiebert.abl4j.io
Class XmlReader
java.lang.Object
org.schwiebert.abl4j.io.XmlReader
- All Implemented Interfaces:
- IConfigurable, ITreebankReader, IXmlDeserializationVisitor
public class XmlReader
- extends Object
- implements ITreebankReader, IXmlDeserializationVisitor
AblReader-Implementation that deserializes an ITreeBank from (proprietary) XML.
- Author:
- sschwieb
- See Also:
XMLVisitor,
IOFactory
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
document
private Document document
root
private Element root
treebank
private ITreeBank treebank
currentTree
private ITree currentTree
constituent
private IConstituent constituent
reader
private Reader reader
XmlReader
public XmlReader()
configure
public void configure(PropertiesMap pm)
throws InvalidConfigurationException
- Specified by:
configure in interface IConfigurable
- Throws:
InvalidConfigurationException
readTreebank
public void readTreebank(ITreeBank tb)
throws IOException
- Specified by:
readTreebank in interface ITreebankReader
- Throws:
IOException
walk
private void walk(Element element)
throws IOException
- Throws:
IOException
visitScore
private void visitScore(Element element)
close
public void close()
throws IOException
- Specified by:
close in interface IXmlDeserializationVisitor
- Throws:
IOException
initialize
public void initialize(InputStream in)
throws IOException
- Specified by:
initialize in interface IXmlDeserializationVisitor
- Throws:
IOException
visitConstituent
public void visitConstituent(Element constituent)
throws IOException
- Specified by:
visitConstituent in interface IXmlDeserializationVisitor
- Throws:
IOException
visitNonTerminal
public void visitNonTerminal(Element nonTerminal)
throws IOException
- Specified by:
visitNonTerminal in interface IXmlDeserializationVisitor
- Throws:
IOException
visitSentence
public void visitSentence(Element sentence)
throws IOException
- Specified by:
visitSentence in interface IXmlDeserializationVisitor
- Throws:
IOException
visitTree
public void visitTree(Element tree)
throws IOException
- Specified by:
visitTree in interface IXmlDeserializationVisitor
- Throws:
IOException
visitTreeBank
public void visitTreeBank(Element treebank)
throws IOException
- Specified by:
visitTreeBank in interface IXmlDeserializationVisitor
- Throws:
IOException
visitWord
public void visitWord(Element word)
throws IOException
- Specified by:
visitWord in interface IXmlDeserializationVisitor
- Throws:
IOException
© 2007 Stephan Schwiebert