SMILA 1.0 API documentation

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

java.lang.Object
  extended by org.eclipse.smila.processing.pipelets.ATransformationPipelet
      extended by org.eclipse.smila.processing.pipelets.xmlprocessing.XmlSplitterPipelet
All Implemented Interfaces:
Pipelet

public class XmlSplitterPipelet
extends ATransformationPipelet

Pipelet that splits a XML stream into multiple xml snippets. For each snippet a new Record is created where the XML snippet is stored in either an attribute or attachment. The created records are not returned as a PipeletResult (this is just the same as the incoming RecordIds) but are directly send to the ConnectivityManager and are routed once more to the Queue. On each created record the Annotation MessageProperties is set with the key value pair isXmlSnippet=true. This can be used in Listener rules to select for XML snippets to process. The possible properties are:


Field Summary
static java.lang.String ATTRIBUTE_IS_XML_SNIPPET
          Name of 'isXmlSnippet' internal attribute.
static java.lang.String DEFAULT_ID_SEPARATOR
          default id separator.
static int DEFAULT_MAX_BUFFER_SIZE
          Constant for the default max buffer size (20).
static java.lang.String PROP_BEGIN_TAG_NAME
          Constant for the property beginTagName.
static java.lang.String PROP_BEGIN_TAG_NAMESPACE
          Constant for the property beginTagNamespace.
static java.lang.String PROP_END_TAG_NAME
          Constant for the property endTagName.
static java.lang.String PROP_END_TAG_NAMESPACE
          Constant for the property endTagNamespace.
static java.lang.String PROP_ID_SEPARATOR
          Constant for the property idSeparator.
static java.lang.String PROP_JOB_NAME
          Constant for the configuration property for the jobName to submit split records to.
static java.lang.String PROP_KEY_TAG_NAME
          Constant for the property keyTagName.
static java.lang.String PROP_MAX_BUFFER_SIZE
          Constant for the property maxBufferSize.
 
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
XmlSplitterPipelet()
           
 
Method Summary
 java.lang.String[] process(Blackboard blackboard, java.lang.String[] recordIds)
          process given records.
 void setConnectivityManager(ConnectivityManager connectivityManager)
          Sets the ConnectivityManager.
 
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
 

Field Detail

PROP_BEGIN_TAG_NAME

public static final java.lang.String PROP_BEGIN_TAG_NAME
Constant for the property beginTagName.

See Also:
Constant Field Values

PROP_BEGIN_TAG_NAMESPACE

public static final java.lang.String PROP_BEGIN_TAG_NAMESPACE
Constant for the property beginTagNamespace.

See Also:
Constant Field Values

PROP_END_TAG_NAME

public static final java.lang.String PROP_END_TAG_NAME
Constant for the property endTagName.

See Also:
Constant Field Values

PROP_END_TAG_NAMESPACE

public static final java.lang.String PROP_END_TAG_NAMESPACE
Constant for the property endTagNamespace.

See Also:
Constant Field Values

PROP_KEY_TAG_NAME

public static final java.lang.String PROP_KEY_TAG_NAME
Constant for the property keyTagName.

See Also:
Constant Field Values

PROP_MAX_BUFFER_SIZE

public static final java.lang.String PROP_MAX_BUFFER_SIZE
Constant for the property maxBufferSize.

See Also:
Constant Field Values

PROP_ID_SEPARATOR

public static final java.lang.String PROP_ID_SEPARATOR
Constant for the property idSeparator.

See Also:
Constant Field Values

PROP_JOB_NAME

public static final java.lang.String PROP_JOB_NAME
Constant for the configuration property for the jobName to submit split records to.

See Also:
Constant Field Values

ATTRIBUTE_IS_XML_SNIPPET

public static final java.lang.String ATTRIBUTE_IS_XML_SNIPPET
Name of 'isXmlSnippet' internal attribute.

See Also:
Constant Field Values

DEFAULT_ID_SEPARATOR

public static final java.lang.String DEFAULT_ID_SEPARATOR
default id separator.

See Also:
Constant Field Values

DEFAULT_MAX_BUFFER_SIZE

public static final int DEFAULT_MAX_BUFFER_SIZE
Constant for the default max buffer size (20).

See Also:
Constant Field Values
Constructor Detail

XmlSplitterPipelet

public XmlSplitterPipelet()
Method Detail

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
process given records.

Parameters:
blackboard - Blackboard holding and managing the records.
recordIds - Ids of records to process.
Returns:
Ids of records to be passed into the next pipelet. By default this should be the same as the passed in recordIds unless there is a specific (businesslogic) reason not to do so.
Throws:
ProcessingException - error during processing.

setConnectivityManager

public void setConnectivityManager(ConnectivityManager connectivityManager)
Sets the ConnectivityManager.

Parameters:
connectivityManager - the manager

SMILA 1.0 API documentation