|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.writersforge.catalan.transform.Transformer
A XML driven data transformer for converting data from one format to another. Performs a series of operations against a List of input data objects. The input data will change content and size as it goes through the chain of transforms. For complete documentation on the Transform XML language used by the Transformer, see the Catalan User Guide.
| Constructor Summary | |
Transformer(org.writersforge.bellows.Datum transform)
Deprecated. Creates a new instance of Transformer. |
|
Transformer(org.writersforge.bellows.Datum transform,
ProcessorRegistry registry)
Deprecated. Creates a new instance of Transformer with a custom mapping registry. |
|
| Method Summary | |
java.lang.String[] |
getProcessorIds()
Deprecated. Retrieves an array of unique identifiers for all NodeProcessors in this Transformer. |
static void |
main(java.lang.String[] args)
Deprecated. Processes the Transform XML, loading data from one or more parameters. |
java.util.List |
process(java.lang.String[] ids,
java.util.List nodes)
Deprecated. Runs the List of input nodes through a set of processors, by id. |
java.util.List |
processAll(java.util.List nodes)
Deprecated. Runs the List of input nodes through every processor in the Transformer's XML specification, in order. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Transformer(org.writersforge.bellows.Datum transform)
transform - the XML specification
public Transformer(org.writersforge.bellows.Datum transform,
ProcessorRegistry registry)
transform - the XML specificationregistry - XML-to-processor mapping registry| Method Detail |
public java.util.List processAll(java.util.List nodes)
nodes - input data nodes
public java.lang.String[] getProcessorIds()
<transform> <replace old='oldtext1' new='newtext1'/> <replace id='textreplace' old='oldtext2' new='newtext2'/> <replace old='oldtext3' new='newtext3'/> <transform>
The returned ids would be:
If any processors share the same explicit id, the second and later duplicates will all be treated as if they had no explicit id. Thus, this XML specification:
<transform> <replace id='textreplace' old='oldtext1' new='newtext1'/> <replace id='textreplace' old='oldtext2' new='newtext2'/> <replace id='textreplace' old='oldtext3' new='newtext3'/> <transform>
would result in the following ids:
public java.util.List process(java.lang.String[] ids,
java.util.List nodes)
ids array, even if that means the same id
is run more than once.
ids - the ids of the transforms to runnodes - input data nodes
java.lang.IllegalArgumentException - if an id in ids does not
exist in the XML specificationpublic static void main(java.lang.String[] args)
args - the Transform XML file and any input data parameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||