SMILA 1.0 API documentation

org.eclipse.smila.processing.pipelets
Class ReplacePipelet

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

public class ReplacePipelet
extends java.lang.Object
implements Pipelet

Applies one or more patterns to the literal value in an attribute and substitutes the found occurrences by the configured replacements.

Author:
Tobias Liefke

Nested Class Summary
static class ReplacePipelet.Type
          The type of the replacement.
 
Field Summary
static java.lang.String PROPERTY_IGNORE_CASE
          Name of the property that indicates to ignore case.
static java.lang.String PROPERTY_INPUT_ATTRIBUTE
          Name of the property that contains the input attribute name.
static java.lang.String PROPERTY_MAPPING
          Name of the property that contains the mapping from pattern to replacement.
static java.lang.String PROPERTY_OUTPUT_ATTRIBUTE
          Name of the property that contains the output attribute name.
static java.lang.String PROPERTY_PATTERN
          Name of the property that contains the pattern.
static java.lang.String PROPERTY_REPLACEMENT
          Name of the property that contains the substitution.
static java.lang.String PROPERTY_TYPE
          Name of the property that contains the type of the pattern.
 
Constructor Summary
ReplacePipelet()
           
 
Method Summary
 void configure(AnyMap configuration)
          set configuration of pipelet.
 java.lang.String[] process(Blackboard blackboard, java.lang.String[] recordIds)
          process given records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_INPUT_ATTRIBUTE

public static final java.lang.String PROPERTY_INPUT_ATTRIBUTE
Name of the property that contains the input attribute name.

See Also:
Constant Field Values

PROPERTY_OUTPUT_ATTRIBUTE

public static final java.lang.String PROPERTY_OUTPUT_ATTRIBUTE
Name of the property that contains the output attribute name.

See Also:
Constant Field Values

PROPERTY_TYPE

public static final java.lang.String PROPERTY_TYPE
Name of the property that contains the type of the pattern.

See Also:
Constant Field Values

PROPERTY_MAPPING

public static final java.lang.String PROPERTY_MAPPING
Name of the property that contains the mapping from pattern to replacement.

See Also:
Constant Field Values

PROPERTY_PATTERN

public static final java.lang.String PROPERTY_PATTERN
Name of the property that contains the pattern.

See Also:
Constant Field Values

PROPERTY_REPLACEMENT

public static final java.lang.String PROPERTY_REPLACEMENT
Name of the property that contains the substitution.

See Also:
Constant Field Values

PROPERTY_IGNORE_CASE

public static final java.lang.String PROPERTY_IGNORE_CASE
Name of the property that indicates to ignore case.

See Also:
Constant Field Values
Constructor Detail

ReplacePipelet

public ReplacePipelet()
Method Detail

configure

public void configure(AnyMap configuration)
               throws ProcessingException
set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.

Specified by:
configure in interface Pipelet
Parameters:
configuration - configuration of pipelet.
Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)

process

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

Specified by:
process in interface Pipelet
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.

SMILA 1.0 API documentation