|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines an interface for extracting text out of binary properties according to their mime-type.
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)
Method Summary | |
boolean |
canFilter(String mimeType)
Returns true if this TextFilter can index
content of mimeType ; false otherwise. |
Map |
doFilter(PropertyState data,
String encoding)
Creates an text representation of a binary property data . |
Method Detail |
public 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
.public Map doFilter(PropertyState data, String encoding) throws 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.
RepositoryException
- if an error occurs while reading from the
node or if the data is malformed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |