SMILA (incubation) API documentation

org.eclipse.smila.processing.pipelets
Class SetAnnotationPipelet

java.lang.Object
  extended by org.eclipse.smila.processing.pipelets.SetAnnotationPipelet
All Implemented Interfaces:
IPipelet, SimplePipelet

public class SetAnnotationPipelet
extends java.lang.Object
implements SimplePipelet

Pipelet that sets an root metadata object or attribute annotation on the records in process. The annotation to set is specified in the pipelet configuration. The possible properties are:

Author:
jschumacher

Field Summary
static java.lang.String PROP_ANONVALUE
          Name of the AnonValue property: "AnonValue".
static java.lang.String PROP_NAME
          Name of the Name property: "Name".
static java.lang.String PROP_NAMEDVALUE
          Name of the NamedValue property: "NamedValue".
static java.lang.String PROP_PATH
          Name of the Path property: "Path".
 
Constructor Summary
SetAnnotationPipelet()
           
 
Method Summary
protected  void addAnonValue(java.lang.String value)
          add an anonymous value.
 void configure(PipeletConfiguration configuration)
          set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow.
 Id[] process(Blackboard blackboard, Id[] recordIds)
          set configured annotation on each record on blackboard as specified by the recordIds.
protected  void putNamedValue(java.lang.String name, java.lang.String value)
           
protected  void setAnnotationName(java.lang.String value)
           
protected  void setAttributePath(java.lang.String value)
          create path for annotation from string. sets index of final step to PathStep.ATTRIBUTE_ANNOTATION regardless of the actual final index given in the string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_PATH

public static final java.lang.String PROP_PATH
Name of the Path property: "Path".

See Also:
Constant Field Values

PROP_NAME

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

See Also:
Constant Field Values

PROP_ANONVALUE

public static final java.lang.String PROP_ANONVALUE
Name of the AnonValue property: "AnonValue".

See Also:
Constant Field Values

PROP_NAMEDVALUE

public static final java.lang.String PROP_NAMEDVALUE
Name of the NamedValue property: "NamedValue".

See Also:
Constant Field Values
Constructor Detail

SetAnnotationPipelet

public SetAnnotationPipelet()
Method Detail

configure

public void configure(PipeletConfiguration 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 IPipelet
Parameters:
configuration - configuration of pipelet.
Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)
See Also:
#configure(org.eclipse.smila.processing.configuration.PipeletConfiguration)

putNamedValue

protected void putNamedValue(java.lang.String name,
                             java.lang.String value)
Parameters:
name - name of an named value
value - value

addAnonValue

protected void addAnonValue(java.lang.String value)
add an anonymous value.

Parameters:
value - another anonymous value

setAnnotationName

protected void setAnnotationName(java.lang.String value)
Parameters:
value - name of annotation

setAttributePath

protected void setAttributePath(java.lang.String value)
create path for annotation from string. sets index of final step to PathStep.ATTRIBUTE_ANNOTATION regardless of the actual final index given in the string.

Parameters:
value - a path string

process

public Id[] process(Blackboard blackboard,
                    Id[] recordIds)
             throws ProcessingException
set configured annotation on each record on blackboard as specified by the recordIds. process records on Blackboard service.

Specified by:
process in interface SimplePipelet
Parameters:
blackboard - Blackboard service managing the records.
recordIds - Ids of records to process.
Returns:
Ids of result records.
Throws:
ProcessingException - error during processing.
See Also:
SimplePipelet.process(org.eclipse.smila.blackboard.Blackboard, org.eclipse.smila.datamodel.id.Id[])

SMILA (incubation) API documentation