SMILA (incubation) 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 PROPPERTY_INPUT_PATH
              Name of the property: "inputPath".
    static java.lang.String PROPPERTY_MODE
              Name of the property: "mode".
    static java.lang.String PROPPERTY_OUTPUT_PATH
              Name of the property: "outputPath".
    static java.lang.String PROPPERTY_SEPARATOR
              Name of the property: "separator".
     
    Constructor Summary
    SubAttributeExtractorPipelet()
               
     
    Method Summary
     void configure(AnyMap configuration)
              set configuration of pipelet.
     java.lang.String getInputPath()
               
     org.eclipse.smila.processing.pipelets.SubAttributeExtractorPipelet.Mode getMode()
               
     java.lang.String getOutputPath()
               
     java.lang.String getSeparator()
               
     java.lang.String[] process(Blackboard blackboard, java.lang.String[] recordIds)
              process records on Blackboard service.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    PROPPERTY_INPUT_PATH

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

    See Also:
    Constant Field Values

    PROPPERTY_OUTPUT_PATH

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

    See Also:
    Constant Field Values

    PROPPERTY_MODE

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

    See Also:
    Constant Field Values

    PROPPERTY_SEPARATOR

    public static final java.lang.String PROPPERTY_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 records on Blackboard service.

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

    getInputPath

    public java.lang.String getInputPath()
    Returns:
    the input path

    getOutputPath

    public java.lang.String getOutputPath()
    Returns:
    the output path

    getMode

    public org.eclipse.smila.processing.pipelets.SubAttributeExtractorPipelet.Mode getMode()
    Returns:
    the operation mode

    getSeparator

    public java.lang.String getSeparator()
    Returns:
    the concat separator

    SMILA (incubation) API documentation