SMILA (incubation) API documentation

org.eclipse.smila.processing.pipelets.xmlprocessing
Class AXmlTransformationPipelet

java.lang.Object
  extended by org.eclipse.smila.processing.pipelets.ATransformationPipelet
      extended by org.eclipse.smila.processing.pipelets.xmlprocessing.AXmlTransformationPipelet
All Implemented Interfaces:
Pipelet
Direct Known Subclasses:
RemoveElementFromXMLPipelet, TidyPipelet, XPathExtractorPipelet, XPathFilterPipelet, XslTransformationPipelet

public abstract class AXmlTransformationPipelet
extends ATransformationPipelet

Abstract base class for XML processing pipelets.


Field Summary
 
Fields inherited from class org.eclipse.smila.processing.pipelets.ATransformationPipelet
_config, _log, ENCODING_ATTACHMENT, PROP_INPUT_NAME, PROP_INPUT_TYPE, PROP_OUTPUT_NAME, PROP_OUTPUT_TYPE
 
Constructor Summary
AXmlTransformationPipelet()
           
 
Method Summary
protected  org.w3c.dom.Document createDocument(Blackboard blackboard, java.lang.String id, ParameterAccessor paramAccessor)
          Creates a Document from an Attribute or Attachment.
 java.lang.String[] process(Blackboard blackboard, java.lang.String[] recordIds)
          process records on Blackboard service.
protected abstract  void processRecord(Blackboard blackboard, ParameterAccessor paramAccessor, java.lang.String recordId)
          Processing of a single input record.
protected  void storeDocument(Blackboard blackboard, java.lang.String id, org.w3c.dom.Document doc, ParameterAccessor paramAccessor)
          Stores a Document in an Attribute or Attachment.
 
Methods inherited from class org.eclipse.smila.processing.pipelets.ATransformationPipelet
configure, getInputName, getInputType, getOutputName, getOutputType, isReadFromAttribute, isStoreInAttribute, readInput, readStringInput, storeResult, storeResult, storeResults
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AXmlTransformationPipelet

public AXmlTransformationPipelet()
Method Detail

createDocument

protected org.w3c.dom.Document createDocument(Blackboard blackboard,
                                              java.lang.String id,
                                              ParameterAccessor paramAccessor)
                                       throws java.lang.Exception
Creates a Document from an Attribute or Attachment.

Parameters:
blackboard - the Blackboard
id - the Id of the record
Returns:
a Document
Throws:
java.lang.Exception - if any error occurs

storeDocument

protected void storeDocument(Blackboard blackboard,
                             java.lang.String id,
                             org.w3c.dom.Document doc,
                             ParameterAccessor paramAccessor)
                      throws java.lang.Exception
Stores a Document in an Attribute or Attachment.

Parameters:
blackboard - the Blackboard
id - the Id of the record
doc - the Document to save
Throws:
java.lang.Exception - if any error occurs

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
Description copied from interface: Pipelet
process records on Blackboard service.

Parameters:
blackboard - Blackboard service managing the records.
recordIds - Ids of records to process.
Returns:
Ids of result records. By default this should be the same as the passed in recordIds unless there is a specific reason not to do so. This is especially true for SearchPiplets.
Throws:
ProcessingException - error during processing.

processRecord

protected abstract void processRecord(Blackboard blackboard,
                                      ParameterAccessor paramAccessor,
                                      java.lang.String recordId)
                               throws java.lang.Exception
Processing of a single input record.

Parameters:
blackboard - Blackboard service managing the records.
paramAccessor - Parameter accessor configured with pipelet configuration and current record. Should be used to access pipelet parameters.
recordId - id of the record to process
Throws:
java.lang.Exception

SMILA (incubation) API documentation