org.apache.jackrabbit.core.query
Class TextFilterService
java.lang.Object
org.apache.jackrabbit.core.query.TextFilterService
- public class TextFilterService
- extends Object
Implements a service that looks up TextFilter
implementations that
are registered in a jar file as providers for
META-INF/services/org.apache.jackrabbit.core.query.TextFilterService
E.g. the jackrabbit jar file contains entries for some TextFilter
implementations such as TextPlainTextFilter
. Custom
TextFilter
implementations may be added to Jackrabbit by packaging
them into a jar file together with a
META-INF/services/org.apache.jackrabbit.core.query.TextFilterService
file that contains the names of the custom TextFilter
classes. Those
filters are then automatically loaded by Jackrabbit on startup.
See also:
JAR File Specification
TextFilter
implementations are asked if they can handle a certain
mime type (TextFilter.canFilter(String)
and if one of them returns
true
the text representation is created with TextFilter#doFilter(PropertyState)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extractText
public static Map extractText(PropertyState data,
String mimeType,
String encoding)
throws RepositoryException
- Extracts text from a binary property which claims to be of a certain
mime-type. This metod eventually calls
TextFilter.doFilter(PropertyState, String)
.
- Parameters:
data
- the binary datamimeType
- the mime typeencoding
- the encoding of the binary data or null
if
the data does not have an encoding or it is unknown.
- Returns:
- the extracted content
- Throws:
RepositoryException
- if an error occurs while creating the index
layout. This includes the case where
data
is not according to
mimeType
.
Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.