com.twitter.common.text.token
Class TokenStream2LuceneTokenizerWrapper

java.lang.Object
  extended by org.apache.lucene.util.AttributeSource
      extended by org.apache.lucene.analysis.TokenStream
          extended by org.apache.lucene.analysis.Tokenizer
              extended by com.twitter.common.text.token.TokenStream2LuceneTokenizerWrapper
All Implemented Interfaces:
Closeable

public class TokenStream2LuceneTokenizerWrapper
extends org.apache.lucene.analysis.Tokenizer

Converts a TokenStream instance to a Lucene's Tokenizer instance.


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
 
Field Summary
 
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
 
Constructor Summary
TokenStream2LuceneTokenizerWrapper(TokenStream stream, Reader input)
           
 
Method Summary
 boolean incrementToken()
           
 void reset(Reader input)
           
 
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
 
Methods inherited from class org.apache.lucene.analysis.TokenStream
end, reset
 
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TokenStream2LuceneTokenizerWrapper

public TokenStream2LuceneTokenizerWrapper(TokenStream stream,
                                          Reader input)
                                   throws IOException
Throws:
IOException
Method Detail

incrementToken

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

reset

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