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/SimpleMimeTypeIdentifier"

(New page: == Bundle: <tt>org.eclipse.eilf.processing.pipelets.mimetype.SimpleMimeTypeIdentifier</tt> == === Description === This ProcessingService is used to identify the mimetype of a document. Th...)
 
(Bundle: org.eclipse.eilf.processing.pipelets.mimetype.SimpleMimeTypeIdentifier)
Line 1: Line 1:
== Bundle: <tt>org.eclipse.eilf.processing.pipelets.mimetype.SimpleMimeTypeIdentifier</tt> ==
+
== Bundle: <tt>org.eclipse.smila.processing.pipelets.mimetype.SimpleMimeTypeIdentifier</tt> ==
  
 
=== Description ===
 
=== Description ===
Line 6: Line 6:
 
==== Useful Information ====
 
==== Useful Information ====
  
Note that this ProcessingService also is a DeclarativeService that implements interface <tt>org.eclipse.eilf.processing.pipelets.mimetype.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.mimetype.MimeTypeIdentifier</tt> and can be used outside the workflow as well.
  
 
=== Configuration ===
 
=== Configuration ===
  
* <tt>configuration/org.eclipse.eilf.processing.pipelets.mimetype/MimeTypeConfig.xml</tt>
+
* <tt>configuration/org.eclipse.smila.processing.pipelets.mimetype/MimeTypeConfig.xml</tt>
  
 
{| border = 1
 
{| border = 1
Line 27: Line 27:
 
'''MimeTypeConfig.xml'''
 
'''MimeTypeConfig.xml'''
 
<source lang="xml">
 
<source lang="xml">
<PipeletConfiguration xmlns="http://www.eclipse.org/eilf/processor">
+
<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor">
 
   <Property name="FileExtensionAttribute">
 
   <Property name="FileExtensionAttribute">
 
     <Value>FileExtension</Value>
 
     <Value>FileExtension</Value>

Revision as of 05:48, 13 November 2008

Bundle: org.eclipse.smila.processing.pipelets.mimetype.SimpleMimeTypeIdentifier

Description

This ProcessingService is used to identify the mimetype of a document. The service uses the file extension todo the MIME type detection. The identified MimeType is store in an attribute in the record.

Useful Information

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

Configuration

  • configuration/org.eclipse.smila.processing.pipelets.mimetype/MimeTypeConfig.xml
Property Type Description
FileExtensionAttribute String name of the attribute containing the file extension
MimeTypeAttribute String name of the attribute to store the identified MimeType in

Note that all properties are required and must be provided.

Example

The following example was used in the SMILA example application to identify MimeTypes of documents delivered by Filesystem- and WebCrawler.

MimeTypeConfig.xml

<PipeletConfiguration xmlns="http://www.eclipse.org/smila/processor">
  <Property name="FileExtensionAttribute">
    <Value>FileExtension</Value>
  </Property>  
  <Property name="MimeTypeAttribute">
    <Value>MimeType</Value>
  </Property>    
</PipeletConfiguration>

Back to the top