com.raritantechnologies.quickstart.userInterface
Class HighlightingDocumentContentHandler
java.lang.Object
com.raritantechnologies.quickstart.userInterface.DocumentContentHandlerFilter
com.raritantechnologies.quickstart.userInterface.HighlightingDocumentContentHandler
- All Implemented Interfaces:
- IConfigurable, IDocumentContentHandler, IProcessDocumentContentHandler
- public class HighlightingDocumentContentHandler
- extends DocumentContentHandlerFilter
Applies highlighting of query words (and stemmed variants) found in a content stream:
XML Configuration schema:
<ContentHandler
contentType="[Quickstart content type]"
class="com.raritantechnologies.quickstart.userInterface.HighlightingDocumentContentHandler"
queryParam="[name of query parameter in last query to use for highlighting]"
hlBegin="[ tag to start highlighted section e.g. <span class="foo">]"
hlEnd="[tag to end highlighted section e.g. </span>"
minWordLength="3" >
<StopWords>
<StopWord>ignore word 1</StopWord>
<StopWord>ignore word 2</StopWord>
</StopWords>
<ContentHandler class="real content handler class" .../>
</ContentHandler>
Developed by
Raritan Technologies Inc..
- Author:
- Kepler Gelotte
|
Method Summary |
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
protected byte[] |
processContent(java.io.ByteArrayOutputStream baos,
RaritanPageContext rpc,
java.lang.Integer queryID)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
minWordLength
protected int minWordLength
stopWords
protected java.util.HashSet stopWords
HighlightingDocumentContentHandler
public HighlightingDocumentContentHandler()
processContent
protected byte[] processContent(java.io.ByteArrayOutputStream baos,
RaritanPageContext rpc,
java.lang.Integer queryID)
- Overrides:
processContent in class DocumentContentHandlerFilter
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IDocumentContentHandler- Overrides:
initialize in class DocumentContentHandlerFilter