org.mycore.services.plugins
Interface TextFilterPlugin

All Known Implementing Classes:
MSWordPlugin, OoTextPlugin, OpenDocumentTextPlugin, OpenOfficeBasePlugin, PdfPlugin, PlainTextPlugin, PostScriptPlugin, XmlHtmlPlugin

public interface TextFilterPlugin

The Plugin spec for filtering several documents for the fulltext search. A class implementing this interface may throw a FilterPluginInstantiationException if it fails to initialize correctly and though is not usable.

Author:
Thomas Scheffler (yagee)

Method Summary
 String getInfo()
          may contain some additional Information on the plugin
 int getMajorNumber()
          should return the major version number
 int getMinorNumber()
          should return the minor version number
 String getName()
          should return a Name of the plugin
 HashSet getSupportedContentTypes()
          returns a list of all supported MCRFileContentTypes.
 Reader transform(MCRFileContentType ct, InputStream input)
          onverts a given Inputstream to Textstream which should contain a textual representation of the source.
 

Method Detail

getName

String getName()
should return a Name of the plugin

Returns:
Plugin name

getMajorNumber

int getMajorNumber()
should return the major version number

Returns:
major version number

getMinorNumber

int getMinorNumber()
should return the minor version number

Returns:
minor version number

getInfo

String getInfo()
may contain some additional Information on the plugin

Returns:
further Informations on the plugin

getSupportedContentTypes

HashSet getSupportedContentTypes()
returns a list of all supported MCRFileContentTypes. These file extensions must be delivered without the leading dot.

Returns:
HashSet List of file extensions

transform

Reader transform(MCRFileContentType ct,
                 InputStream input)
                 throws FilterPluginTransformException
onverts a given Inputstream to Textstream which should contain a textual representation of the source.

Parameters:
input - File in foreign format
Returns:
Inputstream textual representation of input
Throws:
FilterPluginTransformException