org.apache.jackrabbit.core.query
Class XMLTextFilter

java.lang.Object
  extended byorg.apache.jackrabbit.core.query.XMLTextFilter
All Implemented Interfaces:
org.apache.jackrabbit.core.query.TextFilter

public class XMLTextFilter
extends Object
implements org.apache.jackrabbit.core.query.TextFilter

Extracts texts from XML documents.


Constructor Summary
XMLTextFilter()
           
 
Method Summary
 boolean canFilter(String mimeType)
           
 Map doFilter(org.apache.jackrabbit.core.state.PropertyState data, String encoding)
          Returns a map with a single entry for field FieldNames.FULLTEXT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLTextFilter

public XMLTextFilter()
Method Detail

canFilter

public boolean canFilter(String mimeType)
Specified by:
canFilter in interface org.apache.jackrabbit.core.query.TextFilter
Returns:
true for text/xml, false otherwise.

doFilter

public Map doFilter(org.apache.jackrabbit.core.state.PropertyState data,
                    String encoding)
             throws RepositoryException
Returns a map with a single entry for field FieldNames.FULLTEXT.

Specified by:
doFilter in interface org.apache.jackrabbit.core.query.TextFilter
Parameters:
data - object containing RTF document data
encoding - text encoding is not used, since it is specified in the data.
Returns:
a map with a single Reader value for field FieldNames.FULLTEXT.
Throws:
RepositoryException - if data is a multi-value property or if the content can't be extracted


Copyright © -2006 The Apache Software Foundation. All Rights Reserved.