|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.txt2xml.config.ProcessorFactory
Create a Processor from a configuration file.
Config file of the form:
<txt2xml> ***** </txt2xml>
Method Summary | |
Processor |
createProcessor(java.io.Reader configReader)
Read the configuration and return the Processor defined: this will include sub-Processors or following Processors if defined in the config. |
Processor |
createProcessor(java.net.URL configUrl)
Read the configuration and return the Processor defined: this will include sub-Processors or following Processors if defined in the config. |
static ProcessorFactory |
getInstance()
|
protected Processor |
readProcessor(org.jdom.Element processorElement)
Read config for a Processor in the passed "Processor" Element and return the Processor defined there, including sub-Processors. |
protected Processor |
readProcessorSequenceFrom(org.jdom.Element parentElement)
Read config contained by the passed parent Element and return the sequence of Processors defined there, which might include sub-Processors and following Processors if defined. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ProcessorFactory getInstance()
public Processor createProcessor(java.io.Reader configReader) throws ConfigException
Read the configuration and return the Processor defined: this will include sub-Processors or following Processors if defined in the config.
configReader
- Reader for a config definition.
ConfigException
public Processor createProcessor(java.net.URL configUrl) throws ConfigException
Read the configuration and return the Processor defined: this will include sub-Processors or following Processors if defined in the config.
configUrl
- URL of a config file.
ConfigException
protected Processor readProcessorSequenceFrom(org.jdom.Element parentElement) throws ConfigException
Read config contained by the passed parent Element and return the sequence of Processors defined there, which might include sub-Processors and following Processors if defined.
Note that non-"Processor" elements are silently ignored.
parentElement
- the Element containing a Processor
definition. Only child "Processor" elements are handled.
ConfigException
protected Processor readProcessor(org.jdom.Element processorElement) throws ConfigException
Read config for a Processor in the passed "Processor" Element and return the Processor defined there, including sub-Processors.
The type of a Processor is read from the processor_types.properties configuration. The following types are pre-defined but can be overriden in a "processor_types.properties" file:
processorElement
- the top-level Processor Element.
ConfigException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |