TextExtractor
interfacepublic interface TextFilter
TextFilter
implementations are asked if they can handle a certain
mime type (canFilter(String)
and if one of them returns
true
the text representation is created with
doFilter(PropertyState, String)
Modifier and Type | Method and Description |
---|---|
boolean |
canFilter(String mimeType)
Deprecated.
Returns
true if this TextFilter can index
content of mimeType ; false otherwise. |
Map |
doFilter(org.apache.jackrabbit.core.state.PropertyState data,
String encoding)
Deprecated.
Creates an text representation of a binary property
data . |
boolean canFilter(String mimeType)
true
if this TextFilter
can index
content of mimeType
; false
otherwise.mimeType
- the mime type of the content to index.TextFilter
can index content of
mimeType
.Map doFilter(org.apache.jackrabbit.core.state.PropertyState data, String encoding) throws javax.jcr.RepositoryException
data
.
The returned map contains Reader
values. Keys to the
reader values are String
s that serve as field names.
E.g. a TextFilter for a html document may extract multiple fields: one
for the title and one for the whole content.data
- the data property that contains the binary content.encoding
- the encoding of the content or null
if
data
does not use encoding.javax.jcr.RepositoryException
- if an error occurs while reading from the
node or if the data is malformed.Copyright © 2016. All rights reserved.