org.writersforge.catalan.transform.xform
Class WrapProcessor
java.lang.Object
org.writersforge.catalan.transform.BaseNodeProcessor
org.writersforge.catalan.transform.xform.XFormProcessor
org.writersforge.catalan.transform.xform.WrapProcessor
- All Implemented Interfaces:
- org.writersforge.bellows.traverse.NodeProcessor
- public class WrapProcessor
- extends XFormProcessor
A Datum-only NodeProcessor for increasing the level of nesting for the
queried set of elements. Does not affect any attribute values.
- Author:
- jsheets
|
Constructor Summary |
WrapProcessor(org.writersforge.bellows.Datum xml)
Creates a new instance of WrapProcessor from the XML spec. |
WrapProcessor(java.lang.String query,
java.lang.String wrapper)
Creates a new instance of WrapProcessor. |
|
Method Summary |
protected org.writersforge.bellows.Datum |
transformNode(org.writersforge.bellows.Datum node,
org.writersforge.bellows.Datum root)
Performs an in-place transformation on the supplied Datum tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WrapProcessor
public WrapProcessor(org.writersforge.bellows.Datum xml)
- Creates a new instance of WrapProcessor from the XML spec.
- Parameters:
xml - XML initializing spec
WrapProcessor
public WrapProcessor(java.lang.String query,
java.lang.String wrapper)
- Creates a new instance of WrapProcessor.
- Parameters:
query - Bellows query path to select the source node(s)wrapper - the name of the new wrapper element
transformNode
protected org.writersforge.bellows.Datum transformNode(org.writersforge.bellows.Datum node,
org.writersforge.bellows.Datum root)
- Performs an in-place transformation on the supplied Datum tree.
- Specified by:
transformNode in class XFormProcessor
- Parameters:
node - the current node to operate uponroot - the root of the entire XML tree
- Returns:
- the new root Datum object (usually the same one)