org.eclipse.smila.processing.pipelets.xmlprocessing
Class XPathExtractorPipelet
java.lang.Object
org.eclipse.smila.processing.pipelets.ATransformationPipelet
org.eclipse.smila.processing.pipelets.xmlprocessing.AXmlTransformationPipelet
org.eclipse.smila.processing.pipelets.xmlprocessing.XPathExtractorPipelet
- All Implemented Interfaces:
- Pipelet
public class XPathExtractorPipelet
- extends AXmlTransformationPipelet
Pipelet that extracts elements selected by XPath and converts them in appropriate data types (Boolean, Double,
String). The possible properties are:
- xpath: the XPath
- seperator: the seperator (optional)
- namespace: the namespace (optional)
- inputName: name of the Attribute/Attachment to read the XML Document from
- outputName: name of the Attribute/Attachment to store the extracted value in
- inputType: the type (Attribute or Attachment of the inputName
- outputType: the type (Attribute or Attachment of the outputtName
|
Field Summary |
static java.lang.String |
PROP_NAMESPACE
The namespace property. |
static java.lang.String |
PROP_SEPARATOR
The separator property. |
static java.lang.String |
PROP_XPATH
The name of the XSLT file used for the transformation. |
|
Method Summary |
void |
configure(AnyMap configuration)
set configuration of pipelet. |
java.lang.String[] |
process(Blackboard blackboard,
java.lang.String[] recordIds)
process records on Blackboard service. |
| Methods inherited from class org.eclipse.smila.processing.pipelets.ATransformationPipelet |
getInputName, getInputType, getOutputName, getOutputType, isReadFromAttribute, isStoreInAttribute, readInput, readStringInput, storeResult, storeResult, storeResults |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_XPATH
public static final java.lang.String PROP_XPATH
- The name of the XSLT file used for the transformation.
- See Also:
- Constant Field Values
PROP_SEPARATOR
public static final java.lang.String PROP_SEPARATOR
- The separator property.
- See Also:
- Constant Field Values
PROP_NAMESPACE
public static final java.lang.String PROP_NAMESPACE
- The namespace property.
- See Also:
- Constant Field Values
XPathExtractorPipelet
public XPathExtractorPipelet()
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- Overrides:
configure in class ATransformationPipelet
- 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.
- 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.