lux.search.highlight
Class TagFormatter

java.lang.Object
  extended by lux.search.highlight.TagFormatter
All Implemented Interfaces:
HighlightFormatter

public class TagFormatter
extends Object
implements HighlightFormatter

Utility class for highlighting that surrounds highlighted text with a single element


Constructor Summary
TagFormatter(String localName, String namespaceURI)
           
 
Method Summary
 void highlightTerm(XMLStreamWriter writer, String text)
          Write StAX events that "highlight" the text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagFormatter

public TagFormatter(String localName,
                    String namespaceURI)
Method Detail

highlightTerm

public void highlightTerm(XMLStreamWriter writer,
                          String text)
                   throws XMLStreamException
Description copied from interface: HighlightFormatter
Write StAX events that "highlight" the text

Specified by:
highlightTerm in interface HighlightFormatter
Parameters:
writer - writes to the highlighted document
text - a term or phrase that matched a query, to be highlighted
Throws:
XMLStreamException


Copyright © 2013. All Rights Reserved.