de.fu_berlin.ties
Class DocumentWriter
java.lang.Object
de.fu_berlin.ties.ConfigurableProcessor
de.fu_berlin.ties.TextProcessor
de.fu_berlin.ties.DocumentWriter
- All Implemented Interfaces:
- Processor
- Direct Known Subclasses:
- DSVtoXMLConverter
public abstract class DocumentWriter
- extends TextProcessor
Abstract base class for a Processor
that writes
XML documents.
- Version:
- $Revision: 1.3 $, $Date: 2006/10/21 16:03:52 $, $Author: siefkes $
- Author:
- Christian Siefkes
Method Summary |
protected void |
doProcess(Reader reader,
Writer writer,
ContextMap context)
Processes the contents of a reader, writing a modified version to a
writer. |
abstract Document |
process(Reader reader,
ContextMap context)
Processes the contents of a reader and stores the results of processing
in an XML document. |
DocumentWriter
public DocumentWriter(String outExt,
TiesConfiguration conf)
- Creates a new instance.
- Parameters:
outExt
- the extension to use for output filesconf
- used to configure this instance; if null
,
the standard configuration is used
doProcess
protected final void doProcess(Reader reader,
Writer writer,
ContextMap context)
throws IOException,
ProcessingException
- Processes the contents of a reader, writing a modified version to a
writer. This implementation delegates to
process(Reader, ContextMap)
.
- Specified by:
doProcess
in class TextProcessor
- Parameters:
reader
- reader containing the text to process; not closed
by this methodwriter
- the writer to write the processed text to; flushed
but not closed by this methodcontext
- a map of objects that are made available for processing
- Throws:
IOException
- if an I/O error occurs
ProcessingException
- if an error occurs during processing
process
public abstract Document process(Reader reader,
ContextMap context)
throws IOException,
ProcessingException
- Processes the contents of a reader and stores the results of processing
in an XML document.
- Parameters:
reader
- reader containing the text to process; not closed
by this methodcontext
- a map of objects that are made available for processing
- Returns:
- the created document
- Throws:
IOException
- if an I/O error occurs
ProcessingException
- if an error occurs during processing
Copyright © 2003-2007 Christian Siefkes. All Rights Reserved.