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"

(New page: == Bundle: <tt>org.eclipse.eilf.processing.pipelets.aperture.ApertureMimeTypeIdentifier</tt> == === Description === This ProcessingService is used to identify the mimetype of a document. ...)
 
Line 25: Line 25:
 
==== Example ====
 
==== Example ====
  
The following example was used in the EILF example application to identify MimeTypes of documents delivered by Filesystem- and WebCrawler.
+
The following example was used in the SMILA example application to identify MimeTypes of documents delivered by Filesystem- and WebCrawler.
  
 
'''MimeTypeConfig.xml'''
 
'''MimeTypeConfig.xml'''

Revision as of 10:09, 12 August 2008

Bundle: org.eclipse.eilf.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.

Useful Information

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

Configuration

  • configuration/org.eclipse.eilf.processing.pipelets.aperture/MimeTypeConfig.xml
Property Type Description
ContentAttachment String name of the attachment containing the document content
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/eilf/processor">
  <Property name="ContentAttachment">
    <Value>Content</Value>
  </Property>
  <Property name="FileExtensionAttribute">
    <Value>FileExtension</Value>
  </Property>  
  <Property name="MimeTypeAttribute">
    <Value>MimeType</Value>
  </Property>    
</PipeletConfiguration>

Back to the top