org.schwiebert.abl4j.io
Class XMLVisitor
java.lang.Object
org.schwiebert.abl4j.io.XMLVisitor
- All Implemented Interfaces:
- ISerializationVisitor
public class XMLVisitor
- extends Object
- implements ISerializationVisitor
Visitor-Implementation that serializes an ITreeBank in (proprietary) XML.
- Author:
- sschwieb
- See Also:
XMLReader,
IOFactory
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
root
private Element root
document
private Document document
writer
private Writer writer
currentTree
private Element currentTree
currentConstituent
private Element currentConstituent
currentNtList
private Element currentNtList
XMLVisitor
public XMLVisitor()
close
public void close()
throws IOException
- Specified by:
close in interface ISerializationVisitor
- Throws:
IOException
initialize
public void initialize(Writer writer,
Properties properties)
throws IOException
- Specified by:
initialize in interface ISerializationVisitor
- Throws:
IOException
visitConstituent
public void visitConstituent(IConstituent constituent,
boolean begin)
throws IOException
- Specified by:
visitConstituent in interface ISerializationVisitor
- Throws:
IOException
visitNonTerminal
public void visitNonTerminal(NonTerminal nonTerminal,
boolean hasNext)
throws IOException
- Specified by:
visitNonTerminal in interface ISerializationVisitor
- Throws:
IOException
visitSentence
public void visitSentence(ISentence sentence)
throws IOException
- Specified by:
visitSentence in interface ISerializationVisitor
- Throws:
IOException
visitTree
public void visitTree(ITree tree,
boolean begin)
throws IOException
- Specified by:
visitTree in interface ISerializationVisitor
- Throws:
IOException
visitTreeBank
public void visitTreeBank(ITreeBank<?> treebank)
throws IOException
- Specified by:
visitTreeBank in interface ISerializationVisitor
- Throws:
IOException
visitWord
public void visitWord(IWord word,
boolean hasNext)
throws IOException
- Specified by:
visitWord in interface ISerializationVisitor
- Throws:
IOException
© 2007 Stephan Schwiebert