lux.search.highlight
Class StreamingElementTokens

java.lang.Object
  extended by org.apache.lucene.util.AttributeSource
      extended by org.apache.lucene.analysis.TokenStream
          extended by lux.search.highlight.StreamingElementTokens
All Implemented Interfaces:
Closeable

public final class StreamingElementTokens
extends org.apache.lucene.analysis.TokenStream

Wraps a TokenStream, modifying its CharTermAttribute so as to return the original term, and the term prefixed by each of its enclosing element's QNames, in turn.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State
 
Constructor Summary
StreamingElementTokens(org.apache.lucene.analysis.TokenStream tokens)
           
 
Method Summary
 boolean incrementToken()
           
 boolean isPlainToken()
           
 void popElement()
           
 void pushElement(QName qname)
           
 void reset()
           
 void reset(org.apache.lucene.analysis.TokenStream tokens)
           
 
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end
 
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamingElementTokens

public StreamingElementTokens(org.apache.lucene.analysis.TokenStream tokens)
Method Detail

isPlainToken

public boolean isPlainToken()
Returns:
true if this token represents the token from the XML_TEXT field, and is not prefixed by an element QName

pushElement

public void pushElement(QName qname)

popElement

public void popElement()

incrementToken

public boolean incrementToken()
                       throws IOException
Specified by:
incrementToken in class org.apache.lucene.analysis.TokenStream
Throws:
IOException

reset

public void reset(org.apache.lucene.analysis.TokenStream tokens)
           throws IOException
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class org.apache.lucene.analysis.TokenStream
Throws:
IOException


Copyright © 2013. All Rights Reserved.