|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.query.lucene.TextExtractorFilter
public class TextExtractorFilter
Utility base class for migrating functionality from existing implementations
of the deprecated TextFilter
interface to the new
TextExtractor
interface. Once the functionality of an existing
TextFilter has been copied to a new TextExtractor, the original class can
be replaced with the following template to keep backwards compatibility
while avoiding the burden of maintaining duplicate code:
public class SomeTextFilter extends TextExtractorFilter { public SomeTextFilter() { super(new SomeTextExtractor()); } }
Constructor Summary | |
---|---|
TextExtractorFilter(TextExtractor extractor)
Creates a text filter adapter for the given text extractor. |
Method Summary | |
---|---|
boolean |
canFilter(String mimeType)
Returns true if the adapted text extractor supports the given content type. |
Map |
doFilter(PropertyState data,
String encoding)
Extracts text content of the given binary property using the adapted text extractor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextExtractorFilter(TextExtractor extractor)
extractor
- adapted text extractorMethod Detail |
---|
public boolean canFilter(String mimeType)
canFilter
in interface TextFilter
mimeType
- content type
true
if the content type is supported,
false
otherwisepublic Map doFilter(PropertyState data, String encoding) throws RepositoryException
doFilter
in interface TextFilter
data
- binary propertyencoding
- character encoding, or null
FieldNames.FULLTEXT
entry
RepositoryException
- if the binary property can not be read
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |