org.orbeon.oxf.processor
Class SimpleProcessor

java.lang.Object
  extended by org.orbeon.oxf.processor.ProcessorImpl
      extended by org.orbeon.oxf.processor.SimpleProcessor
All Implemented Interfaces:
Processor

public abstract class SimpleProcessor
extends ProcessorImpl

This is the class that must be extended to create a custom processor. See the Processor API section for more information.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.orbeon.oxf.processor.ProcessorImpl
ProcessorImpl.KeyValidity, ProcessorImpl.ProcessorKey, ProcessorImpl.ProcessorOutputImpl
 
Field Summary
 
Fields inherited from class org.orbeon.oxf.processor.ProcessorImpl
INPUT_CONFIG, INPUT_DATA, logger, OUTPUT_DATA, PARENT_PROCESSORS, PROCESSOR_INPUT_SCHEME, PROCESSOR_SEQUENCE_NUMBER, PROCESSOR_VALIDATION_FLAG, SAX_INSPECTION_FLAG, USER_VALIDATION_FLAG
 
Constructor Summary
SimpleProcessor()
          This constructor must be called by subclasses.
 
Method Summary
 ProcessorOutput createOutput(String name)
          Create an output.
 
Methods inherited from class org.orbeon.oxf.processor.ProcessorImpl
addInput, addInputInfo, addOutput, addOutputInfo, createInput, deleteInput, deleteOutput, findInputLastModified, findLastModified, getConnectedInputs, getConnectedOutputs, getId, getInputByName, getInputInfo, getInputKey, getInputKeyValidity, getInputNames, getInputsByName, getInputsInfo, getInputValidity, getLocationData, getName, getOutputByName, getOutputCount, getOutputsInfo, getProcessorInputSchemeInputName, getProcessorKey, getPropertySet, getSequenceNumber, getState, hasState, isInputInCache, isProcessorInputScheme, readCacheInputAsDOM, readCacheInputAsDOM4J, readCacheInputAsObject, readCacheInputAsObject, readCacheInputAsTinyTree, readInputAsDOM, readInputAsDOM4J, readInputAsSAX, readInputAsTinyTree, reset, setId, setLocationData, setName, setState, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleProcessor

public SimpleProcessor()
This constructor must be called by subclasses. Iterate through the generateXxx() methods and stores a reference to the method in outputToMethod. This checks for the following signatures: generateXxx(PipelineContext context, XMLReceiver xmlReceiver) generateXxx(PipelineContext context, ContentHandler contentHandler) For a given "Xxx", only one of the two methods should be implemented. If both are present, the ContentHandler version is ignored.

Method Detail

createOutput

public ProcessorOutput createOutput(String name)
Create an output. Delegate processing to the appropriate generateXXX() method.

Specified by:
createOutput in interface Processor
Overrides:
createOutput in class ProcessorImpl
Parameters:
name - Name of the output to create. null is allowed.
Returns:
The newly created output