org.writersforge.catalan.transform.xml
Class DatumToObject
java.lang.Object
org.writersforge.catalan.transform.BaseNodeProcessor
org.writersforge.catalan.transform.xml.DatumToObject
- All Implemented Interfaces:
- org.writersforge.bellows.traverse.NodeProcessor
- public class DatumToObject
- extends BaseNodeProcessor
A text processor which converts Datum content into a List of java objects.
This processor accepts only Datum input, and produces only String, Number,
and Date output.
- Author:
- jsheets
|
Constructor Summary |
DatumToObject(org.writersforge.bellows.Datum xml)
Creates a new instance of DatumToObject from the XML spec. |
DatumToObject(org.writersforge.bellows.ListDatum[] queries)
Creates a new instance of DatumToObject. |
|
Method Summary |
java.util.List |
processNode(java.lang.Object node)
Process a single node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatumToObject
public DatumToObject(org.writersforge.bellows.Datum xml)
- Creates a new instance of DatumToObject from the XML spec.
- Parameters:
xml - XML initializing spec
DatumToObject
public DatumToObject(org.writersforge.bellows.ListDatum[] queries)
- Creates a new instance of DatumToObject.
- Parameters:
queries - an array of XML queries to pass the input data through
processNode
public java.util.List processNode(java.lang.Object node)
- Process a single node. The processing action can be any arbitrary
task, such as text replacement, data restructuring, or even
statistical gathering. The processor should return a processed
version of the node; this can be the same object untouched, or the
same object modified, or a new set of objects.
- Parameters:
node - the node to process
- Returns:
- a List of processing results (can be empty)