org.apache.cocoon.components.search
Class LuceneIndexContentHandler

java.lang.Object
  extended by org.apache.cocoon.components.search.LuceneIndexContentHandler
All Implemented Interfaces:
ContentHandler

public class LuceneIndexContentHandler
extends Object
implements ContentHandler

Parse XML and generate lucene document(s) can now be configured via SimpleLuceneXMLIndexerImpl to store specific tags in Lucene, so that you can display them with hits.

Version:
CVS $Id: LuceneIndexContentHandler.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Bernhard Huber, Jeremy Quinn

Field Summary
static String LUCENE_ATTR_TO_TEXT_ATTRIBUTE
          If this attribute is specified on element, values of all attributes are added to the text of the element, and to the document body text
static String LUCENE_URI
           
 
Constructor Summary
LuceneIndexContentHandler()
          Constructor for the LuceneIndexContentHandler object
 
Method Summary
 List allDocuments()
           
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String namespaceURI, String localName, String qName)
           
 void endPrefixMapping(String prefix)
           
 void ignorableWhitespace(char[] ch, int start, int length)
           
 Iterator iterator()
           
 void processingInstruction(String target, String data)
           
 void setDocumentLocator(Locator locator)
          Sets the documentLocator attribute of the LuceneIndexContentHandler object
 void setFieldTags(HashSet fieldTags)
          Sets the fieldTags attribute of the LuceneIndexContentHandler object
 void skippedEntity(String name)
           
 void startDocument()
           
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
           
 void startPrefixMapping(String prefix, String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LUCENE_URI

public static final String LUCENE_URI
See Also:
Constant Field Values

LUCENE_ATTR_TO_TEXT_ATTRIBUTE

public static final String LUCENE_ATTR_TO_TEXT_ATTRIBUTE
If this attribute is specified on element, values of all attributes are added to the text of the element, and to the document body text

See Also:
Constant Field Values
Constructor Detail

LuceneIndexContentHandler

public LuceneIndexContentHandler()
Constructor for the LuceneIndexContentHandler object

Method Detail

setFieldTags

public void setFieldTags(HashSet fieldTags)
Sets the fieldTags attribute of the LuceneIndexContentHandler object

Parameters:
fieldTags - The new fieldTags value

setDocumentLocator

public void setDocumentLocator(Locator locator)
Sets the documentLocator attribute of the LuceneIndexContentHandler object

Specified by:
setDocumentLocator in interface ContentHandler
Parameters:
locator - The new documentLocator value

allDocuments

public List allDocuments()

iterator

public Iterator iterator()

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler

endDocument

public void endDocument()
Specified by:
endDocument in interface ContentHandler

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
Specified by:
endElement in interface ContentHandler

endPrefixMapping

public void endPrefixMapping(String prefix)
Specified by:
endPrefixMapping in interface ContentHandler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Specified by:
ignorableWhitespace in interface ContentHandler

processingInstruction

public void processingInstruction(String target,
                                  String data)
Specified by:
processingInstruction in interface ContentHandler

skippedEntity

public void skippedEntity(String name)
Specified by:
skippedEntity in interface ContentHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface ContentHandler

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
Specified by:
startElement in interface ContentHandler

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
Specified by:
startPrefixMapping in interface ContentHandler


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.