SMILA 1.0 API documentation

org.eclipse.smila.processing.pipelets
Class SubAttributeExtractorPipelet

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

public class SubAttributeExtractorPipelet
extends java.lang.Object
implements Pipelet

Extracts Literal values from an attribute that has a nested MObject. The attributes in the nested MObject can have nested MOBjects themselves. To address a attribute in the nested structure a path needs to be specified. The pipelet supports different execution modes:

  • FIRST: selects only the first Literal of the specified attribute
  • LAST: selects only the last Literal of the specified attribute
  • ALL_AS_LIST: selects all Literal values of the specified attribute and returns a list
  • ALL_AS_ONE: selects all Literal values of the specified attribute and concatenates them to a single string, using a seperator (default is blank)

  • Field Summary
    static java.lang.String DEFAULT_PATH_SEPARATOR
              The default path separator.
    static java.lang.String DEFAULT_SEPARATOR
              The default separator.
    static java.lang.String PROPERTY_INPUT_PATH
              Name of the property: "inputPath".
    static java.lang.String PROPERTY_MODE
              Name of the property: "mode".
    static java.lang.String PROPERTY_OUTPUT_PATH
              Name of the property: "outputPath".
    static java.lang.String PROPERTY_SEPARATOR
              Name of the property: "separator".
     
    Constructor Summary
    SubAttributeExtractorPipelet()
               
     
    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_PATH

    public static final java.lang.String PROPERTY_INPUT_PATH
    Name of the property: "inputPath".

    See Also:
    Constant Field Values

    PROPERTY_OUTPUT_PATH

    public static final java.lang.String PROPERTY_OUTPUT_PATH
    Name of the property: "outputPath".

    See Also:
    Constant Field Values

    PROPERTY_MODE

    public static final java.lang.String PROPERTY_MODE
    Name of the property: "mode".

    See Also:
    Constant Field Values

    PROPERTY_SEPARATOR

    public static final java.lang.String PROPERTY_SEPARATOR
    Name of the property: "separator".

    See Also:
    Constant Field Values

    DEFAULT_SEPARATOR

    public static final java.lang.String DEFAULT_SEPARATOR
    The default separator.

    See Also:
    Constant Field Values

    DEFAULT_PATH_SEPARATOR

    public static final java.lang.String DEFAULT_PATH_SEPARATOR
    The default path separator.

    See Also:
    Constant Field Values
    Constructor Detail

    SubAttributeExtractorPipelet

    public SubAttributeExtractorPipelet()
    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