org.writersforge.catalan.transform
Class CustomNodeProcessor

java.lang.Object
  |
  +--org.writersforge.catalan.transform.BaseNodeProcessor
        |
        +--org.writersforge.catalan.transform.CustomNodeProcessor
All Implemented Interfaces:
org.writersforge.bellows.traverse.NodeProcessor

public abstract class CustomNodeProcessor
extends BaseNodeProcessor

Base class for all user-defined NodeProcessors.

Author:
jsheets

Constructor Summary
CustomNodeProcessor(org.writersforge.bellows.Datum specs)
          Creates a new instance of CustomNodeProcessor.
 
Method Summary
protected abstract  void initSpecs(org.writersforge.bellows.Datum specs)
          Processes initialization data in the form of an XML tree.
 
Methods inherited from class org.writersforge.catalan.transform.BaseNodeProcessor
addLeftover, end, getLeftovers, getNodes, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.writersforge.bellows.traverse.NodeProcessor
processNode
 

Constructor Detail

CustomNodeProcessor

public CustomNodeProcessor(org.writersforge.bellows.Datum specs)
Creates a new instance of CustomNodeProcessor. Requires the Datum tree for this operation, from the XML transform specification.

Parameters:
specs - the processor invocation from the XML spec
Method Detail

initSpecs

protected abstract void initSpecs(org.writersforge.bellows.Datum specs)
Processes initialization data in the form of an XML tree. The format and contents of the XML specs are up to the subclass implementation to enforce. In the case of the Transformer XML spec, the CustomNodeProcessor will receive the entire <custom> element as its XML spec. This makes it easy to pass arbitrary parameters to the custom processor by simply setting them in the transform XML.

Parameters:
specs - XML data to initialize this processor
See Also:
Transformer