|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.processing.pipelets.ATransformationPipelet
public abstract class ATransformationPipelet
Abstract base class for transformation pipelets. The general properties are:
| Field Summary | |
|---|---|
protected java.lang.String |
_inputName
The name of the input attribute/attachment. |
protected Path |
_inputPath
The path of the input attribute if input type is ATTRIBUTE. |
protected SourceType |
_inputType
The type of the inputName. |
protected Log |
_log
local logger. |
protected java.lang.String |
_outputName
The name of the output attribute/attachment. |
protected Path |
_outputPath
The path of the output attribute if output type is ATTRIBUTE. |
protected SourceType |
_outputType
The type of the outputName. |
static java.lang.String |
ENCODING_ATTACHMENT
encoding to use for storing results as attachments. |
static java.lang.String |
PROP_INPUT_NAME
Name of the input Attribute/Attachment. |
static java.lang.String |
PROP_INPUT_TYPE
The type of the inputName: Attribute/Attachment. |
static java.lang.String |
PROP_OUTPUT_NAME
Name of the output Attribute/Attachment. |
static java.lang.String |
PROP_OUTPUT_TYPE
The type of the inputName: Attribute/Attachment. |
| Constructor Summary | |
|---|---|
ATransformationPipelet()
|
|
| Method Summary | |
|---|---|
void |
configure(PipeletConfiguration configuration)
set configuration of pipelet. called once after instantiation before the pipelet is actually used in a workflow. |
java.lang.String |
getInputName()
|
Path |
getInputPath()
|
SourceType |
getInputType()
|
java.lang.String |
getOutputName()
|
Path |
getOutputPath()
|
SourceType |
getOutputType()
|
boolean |
isReadFromAttribute()
Checks if to read the input from an Attribute. |
boolean |
isStoreInAttribute()
Checks if to store the output in an Attribute. |
protected byte[] |
readInput(Blackboard blackboard,
Id id)
Reads input data from the Blackboard as byte[]. |
protected java.lang.String |
readStringInput(Blackboard blackboard,
Id id)
Reads input data from the Blackboard as a String. |
protected void |
storeResult(Blackboard blackboard,
Id id,
byte[] bytes)
Stores result byte[] on the blackboard. |
protected void |
storeResult(Blackboard blackboard,
Id id,
java.lang.String result)
store result strings on the blackboard. |
protected void |
storeResults(Blackboard blackboard,
Id id,
java.util.Collection<java.lang.String> results)
store result strings on the blackboard. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.smila.processing.SimplePipelet |
|---|
process |
| Field Detail |
|---|
public static final java.lang.String PROP_INPUT_TYPE
public static final java.lang.String PROP_OUTPUT_TYPE
public static final java.lang.String PROP_INPUT_NAME
public static final java.lang.String PROP_OUTPUT_NAME
public static final java.lang.String ENCODING_ATTACHMENT
protected final Log _log
protected SourceType _inputType
protected SourceType _outputType
protected java.lang.String _inputName
protected java.lang.String _outputName
protected Path _inputPath
protected Path _outputPath
| Constructor Detail |
|---|
public ATransformationPipelet()
| Method Detail |
|---|
public void configure(PipeletConfiguration configuration)
throws ProcessingException
configure in interface IPipeletconfiguration - configuration of pipelet.
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)#configure(org.eclipse.smila.processing.configuration.PipeletConfiguration)public SourceType getInputType()
public java.lang.String getInputName()
public Path getInputPath()
public SourceType getOutputType()
public java.lang.String getOutputName()
public Path getOutputPath()
public boolean isReadFromAttribute()
public boolean isStoreInAttribute()
protected void storeResult(Blackboard blackboard,
Id id,
java.lang.String result)
throws ProcessingException
blackboard - blackboardid - record idresult - result string
ProcessingException - error.
protected void storeResults(Blackboard blackboard,
Id id,
java.util.Collection<java.lang.String> results)
throws ProcessingException
blackboard - blackboardid - record idresults - result strings
ProcessingException - error.
protected void storeResult(Blackboard blackboard,
Id id,
byte[] bytes)
throws java.lang.Exception
blackboard - the Blackboardid - the Id of the recordbytes - the byte[] to save
java.lang.Exception - if any error occurs
protected byte[] readInput(Blackboard blackboard,
Id id)
throws BlackboardAccessException,
java.io.UnsupportedEncodingException
blackboard - the Blackboardid - the Id of the record
BlackboardAccessException - if any error occurs
java.io.UnsupportedEncodingException - if converting string to bytes fails
protected java.lang.String readStringInput(Blackboard blackboard,
Id id)
throws BlackboardAccessException,
java.io.UnsupportedEncodingException
blackboard - the Blackboardid - the Id of the record
BlackboardAccessException - if any error occurs
java.io.UnsupportedEncodingException - if converting bytes to string fails
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||