SMILA (incubation) API documentation

org.eclipse.smila.processing.pipelets
Class MimeTypeIdentifyService

java.lang.Object
  extended by org.eclipse.smila.processing.pipelets.MimeTypeIdentifyService
All Implemented Interfaces:
ProcessingService

public class MimeTypeIdentifyService
extends java.lang.Object
implements ProcessingService

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 BUNDLE_NAME
          name of bundle.
static java.lang.String CONFIG_FILE
          name of configuration file.
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.
 
Fields inherited from interface org.eclipse.smila.processing.ProcessingService
PROPERTY_NAME
 
Constructor Summary
MimeTypeIdentifyService()
           
 
Method Summary
 Id[] process(Blackboard blackboard, Id[] recordIds)
          process records on Blackboard service.
 void setMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
          Sets the MimeTypeIdentifier.
 void unsetMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
          Set the MimeTypeIdentifier to null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE_NAME

public static final java.lang.String BUNDLE_NAME
name of bundle. Used in configuration reading.

See Also:
Constant Field Values

CONFIG_FILE

public static final java.lang.String CONFIG_FILE
name of configuration file. Hardcoded for now (or fallback), configuration properties should be received from configuration service later.

See Also:
Constant Field Values

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

MimeTypeIdentifyService

public MimeTypeIdentifyService()
Method Detail

setMimeTypeIdentifier

public void setMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
Sets the MimeTypeIdentifier. Used by OSGi Declarative Services.

Parameters:
mimeTypeIdentifier - the mimeTypeIdentifier to set

unsetMimeTypeIdentifier

public void unsetMimeTypeIdentifier(MimeTypeIdentifier mimeTypeIdentifier)
Set the MimeTypeIdentifier to null. Used by OSGi Declarative Services.

Parameters:
mimeTypeIdentifier - the mimeTypeIdentifier to unset

process

public Id[] process(Blackboard blackboard,
                    Id[] recordIds)
             throws ProcessingException
process records on Blackboard service.

Specified by:
process in interface ProcessingService
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:
ProcessingService.process(Blackboard, Id[])

SMILA (incubation) API documentation