Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


< SMILA‎ | Documentation
Revision as of 07:04, 1 February 2013 by Unnamed Poltroon (Talk) (org.eclipse.smila.tika)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


A MimeTypeIdentifier is an OSGi service which can be used to identify the MIME type of a given byte[], InputStream or a file extension. The documentation of a pipelet which uses this service can be found at SMILA/Documentation/Bundle_org.eclipse.smila.processing.pipelets .


You can find the javaDoc API for the MimeTypeIdentifier here


It is possible to provide different implementations for the MimeTypeIdentifier interface. In general it makes sense to only activate one MimeTypeIdentifier implementation at the same time. This is achieved by simply starting just the bundle with the desired implementation. If multiple implementations are started, a client using the MimeTypeIdentifier has to use a filter to select between the available implementations. Otherwise it gets a reference randomly (or based on the service.ranking property of the service registrations). The component name could be used for filtering.

Below is a list of the currently available implementations.


The default implementation SimpleMimeTypeIdentifier cam only identify MIME types (only) by file extension. Identification by byte[] or InputStream is not supported. The mapping file mime.types (located inside the bundle) is used to map from file extension to MIME type.


There are no configuration options available for this bundle.


This implementation is not yet available in SMILA. We have to finish the CQ process for Apache Tika and its dependencies first

The bundle org.eclipse.smila.tika contains an implementation of the MimeTypeIdentifier service based on the Detector services provided by Tika. The default detector service started by Tika uses magic bytes as well as filename (i.e. filename suffix) based detection. For details see the Detector services Tika documentation.

This service has a higher service.ranking property than the default implementation so it should be selected for service references if both bundles are started.


There are no configuration options available for this bundle.

Back to the top