|
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.mimetype.SimpleMimeTypeIdentifier
public class SimpleMimeTypeIdentifier
The simple MIME type identifier is able to detect MIME types based on a static extension mapping.
| 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 |
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 | |
|---|---|
SimpleMimeTypeIdentifier()
|
|
| Method Summary | |
|---|---|
java.lang.String |
identify(Id id,
byte[] data)
Identifies a MimeType based an the given data. |
java.lang.String |
identify(Id id,
byte[] data,
java.lang.String extension)
Identifies a MimeType based an the given data and file extension. |
java.lang.String |
identify(Id id,
java.lang.String extension)
Identifies a MimeType based an the file extension. |
Id[] |
process(Blackboard blackboard,
Id[] recordIds)
process records on Blackboard service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BUNDLE_NAME
public static final java.lang.String CONFIG_FILE
public static final java.lang.String FILE_EXTENSION_ATTRIBUTE
public static final java.lang.String META_DATA_ATTRIBUTE
public static final java.lang.String MIME_TYPE_ATTRIBUTE
| Constructor Detail |
|---|
public SimpleMimeTypeIdentifier()
| Method Detail |
|---|
public Id[] process(Blackboard blackboard,
Id[] recordIds)
throws ProcessingException
process in interface ProcessingServiceblackboard - Blackboard service managing the records.recordIds - Ids of records to process.
ProcessingException - error during processing.ProcessingService.process(Blackboard, Id[])
public java.lang.String identify(Id id,
byte[] data)
throws MimeTypeParseException
identify in interface MimeTypeIdentifierid - the record Iddata - a byte[] containing the data
MimeTypeParseException - if any error occursMimeTypeIdentifier.identify(org.eclipse.smila.datamodel.id.Id,
byte[])
public java.lang.String identify(Id id,
java.lang.String extension)
throws MimeTypeParseException
identify in interface MimeTypeIdentifierid - the record Idextension - the extension of the filename
MimeTypeParseException - if any error occursMimeTypeIdentifier.identify(org.eclipse.smila.datamodel.id.Id,
java.lang.String)
public java.lang.String identify(Id id,
byte[] data,
java.lang.String extension)
throws MimeTypeParseException
identify in interface MimeTypeIdentifierid - the record Iddata - a byte[] containing the dataextension - the extension of the filename
MimeTypeParseException - if any error occursMimeTypeIdentifier.identify(org.eclipse.smila.datamodel.id.Id,
byte[], java.lang.String)
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||