SMILA 1.0 API documentation

org.eclipse.smila.processing.pipelets
Class JSONWriterPipelet

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

public class JSONWriterPipelet
extends java.lang.Object
implements Pipelet

Writes an Any object to JSON. Copyright (c) 2012 Attensity Europe GmbH

Author:
Tobias Liefke

Field Summary
static java.lang.String INPUT_ATTRIBUTES_PROPERTY
          Name of the property that contains the names of the input attributes.
static java.lang.String OUTPUT_NAME_PROPERTY
          Name of the property that contains the type of the output (attribute/attachment).
static java.lang.String OUTPUT_TYPE_PROPERTY
          Name of the property that contains the name of the output attribute or attachment.
static java.lang.String PRINT_PRETTY_PROPERTY
          Name of the property that indicates to format the output for better readability.
 
Constructor Summary
JSONWriterPipelet()
           
 
Method Summary
 void configure(AnyMap config)
          Initializes parameters.
 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

INPUT_ATTRIBUTES_PROPERTY

public static final java.lang.String INPUT_ATTRIBUTES_PROPERTY
Name of the property that contains the names of the input attributes.

See Also:
Constant Field Values

OUTPUT_NAME_PROPERTY

public static final java.lang.String OUTPUT_NAME_PROPERTY
Name of the property that contains the type of the output (attribute/attachment).

See Also:
Constant Field Values

OUTPUT_TYPE_PROPERTY

public static final java.lang.String OUTPUT_TYPE_PROPERTY
Name of the property that contains the name of the output attribute or attachment.

See Also:
Constant Field Values

PRINT_PRETTY_PROPERTY

public static final java.lang.String PRINT_PRETTY_PROPERTY
Name of the property that indicates to format the output for better readability.

See Also:
Constant Field Values
Constructor Detail

JSONWriterPipelet

public JSONWriterPipelet()
Method Detail

configure

public void configure(AnyMap config)
               throws ProcessingException
Initializes parameters.

Specified by:
configure in interface Pipelet
Parameters:
config - configuration of pipelet.
Throws:
ProcessingException - configuration is not applicable for pipelet (missing properties, wrong datatypes)
See Also:
Pipelet.configure(AnyMap)

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
Description copied from interface: Pipelet
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.
See Also:
Pipelet.process(Blackboard, String[])

SMILA 1.0 API documentation