Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/ApertureMimeTypeIdentifier"

(Description)
Line 11: Line 11:
  
 
The javadoc for the implemented interface can be found [http://build.eclipse.org/rt/smila/javadoc/current/index.html?org/eclipse/smila/common/mimetype/package-summary.html here].
 
The javadoc for the implemented interface can be found [http://build.eclipse.org/rt/smila/javadoc/current/index.html?org/eclipse/smila/common/mimetype/package-summary.html here].
 
  
 
==== Useful Information ====
 
==== Useful Information ====
  
 
Note that this ProcessingService also is a DeclarativeService that implements interface <tt>org.eclipse.smila.processing.pipelets.aperture.MimeTypeIdentifier</tt> and can be used outside the workflow as well.
 
Note that this ProcessingService also is a DeclarativeService that implements interface <tt>org.eclipse.smila.processing.pipelets.aperture.MimeTypeIdentifier</tt> and can be used outside the workflow as well.
 +
 +
==== Interaction with the MimeTypeIdentifyPipelet ====
 +
 +
The MimeTypeIdentifyPipelet uses OSGi to access a MimeTypeIdentifier service.
 +
 +
So if you want to use the Aperture mime type identifier you should start the aperture bundle and take care not to start the <tt>org.eclipse.smila.common.mimetype.impl</tt> bundle that contains the <tt>SimpleMimeTypeIdentifier</tt>, which is a mime type identifier that only identifies mime types based on the file extensions using a mapping file. (see [http://build.eclipse.org/rt/smila/javadoc/current/index.html?org/eclipse/smila/common/mimetype/impl/package-summary.html org.eclipse.smila.common.mimetype.impl]).
  
 
=== Configuration ===
 
=== Configuration ===

Revision as of 06:31, 16 September 2011

This component is not yet available in our repository. As soon as the new Aperture release is available we will submit appropriate CQs and hopefully get permission to use it in our project.

Bundle: org.eclipse.smila.processing.pipelets.aperture.ApertureMimeTypeIdentifier

Description

This ProcessingService is used to identify the mimetype of a document. The service uses either the document's content (a byte[]), a file extension or both. So it is not required that the record contains a value for both properties ContentAttachment and FileExtensionAttribute. The identified MimeType is store in an attribute in the record.

It is strongly recommended that you use both (input data and extension) to identify the mime type of the data, since the aperture mime type identification mainly focuses on the magic numbers in the file and so often fails to determine e.g. office documents' mime types when no conten is given.

For further information on the aperture mime type extraction please consult the apropriate Aperture documentation pages (e.g. MIMETypeIdentification).

The javadoc for the implemented interface can be found here.

Useful Information

Note that this ProcessingService also is a DeclarativeService that implements interface org.eclipse.smila.processing.pipelets.aperture.MimeTypeIdentifier and can be used outside the workflow as well.

Interaction with the MimeTypeIdentifyPipelet

The MimeTypeIdentifyPipelet uses OSGi to access a MimeTypeIdentifier service.

So if you want to use the Aperture mime type identifier you should start the aperture bundle and take care not to start the org.eclipse.smila.common.mimetype.impl bundle that contains the SimpleMimeTypeIdentifier, which is a mime type identifier that only identifies mime types based on the file extensions using a mapping file. (see org.eclipse.smila.common.mimetype.impl).

Configuration

For information on how to configure the mime type identification pipelet, which accesses the MimeTypeIdentifier service please refer to MimeTypeIdentifyPipelet.

Back to the top