SMILA 1.0 API documentation

org.eclipse.smila.processing.pipelets
Class MimeTypeIdentifyPipelet

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

public class MimeTypeIdentifyPipelet
extends java.lang.Object
implements Pipelet

The simple MIME type identifier is able to detect MIME types based on a static extension mapping.

Author:
August Georg Schmidt (BROX), Daniel Stucky

Field Summary
static java.lang.String CONTENT_ATTACHMENT
          Constant for the configuration property ContentAttachment.
static java.lang.String FILE_EXTENSION_ATTRIBUTE
          Constant for the configuration property FileExtensionAttribute.
static java.lang.String META_DATA_ATTRIBUTE
          Constant for the configuration property MimeTypeAttribute.
static java.lang.String MIME_TYPE_ATTRIBUTE
          Constant for the configuration property MimeTypeAttribute.
 
Constructor Summary
MimeTypeIdentifyPipelet()
           
 
Method Summary
 void configure(AnyMap configuration)
          read configuration parameters.
protected  void configure(ParameterAccessor paramAccessor)
          configures the class based on a parameter accessor instance.
 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

FILE_EXTENSION_ATTRIBUTE

public static final java.lang.String FILE_EXTENSION_ATTRIBUTE
Constant for the configuration property FileExtensionAttribute.

See Also:
Constant Field Values

CONTENT_ATTACHMENT

public static final java.lang.String CONTENT_ATTACHMENT
Constant for the configuration property ContentAttachment.

See Also:
Constant Field Values

META_DATA_ATTRIBUTE

public static final java.lang.String META_DATA_ATTRIBUTE
Constant for the configuration property MimeTypeAttribute.

See Also:
Constant Field Values

MIME_TYPE_ATTRIBUTE

public static final java.lang.String MIME_TYPE_ATTRIBUTE
Constant for the configuration property MimeTypeAttribute.

See Also:
Constant Field Values
Constructor Detail

MimeTypeIdentifyPipelet

public MimeTypeIdentifyPipelet()
Method Detail

configure

public void configure(AnyMap configuration)
               throws ProcessingException
read configuration parameters. 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)

configure

protected void configure(ParameterAccessor paramAccessor)
                  throws ProcessingException
configures the class based on a parameter accessor instance.

Parameters:
paramAccessor - the ParameterAccessor instance
Throws:
ProcessingException - not all required parameters have been configured.

process

public java.lang.String[] process(Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
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.

SMILA 1.0 API documentation