net.sf.eos.analyzer.lucene
Class LuceneTokenizerWrapper

java.lang.Object
  extended by net.sf.eos.analyzer.TokenFilter
      extended by net.sf.eos.analyzer.lucene.LuceneTokenizerWrapper
All Implemented Interfaces:
Tokenizer

public final class LuceneTokenizerWrapper
extends TokenFilter

Wraps the functionality of the εοs Tokenizer for the reuse of Lucene tokenizer.

Author:
Sascha Kohlmann

Constructor Summary
LuceneTokenizerWrapper(org.apache.lucene.analysis.Tokenizer tokenizer)
          Creates a new wrapper.
LuceneTokenizerWrapper(Tokenizer source, org.apache.lucene.analysis.Tokenizer tokenizer)
          Creates a new wrapper.
 
Method Summary
 Token next()
          Implementations should use TokenFilter.getSource() to fetch the source Tokenizer an handle the resulting Token.
 
Methods inherited from class net.sf.eos.analyzer.TokenFilter
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneTokenizerWrapper

public LuceneTokenizerWrapper(org.apache.lucene.analysis.Tokenizer tokenizer)
Creates a new wrapper.

Parameters:
tokenizer - a Lucene tokenizer to reuse in the εοs environment

LuceneTokenizerWrapper

public LuceneTokenizerWrapper(Tokenizer source,
                              org.apache.lucene.analysis.Tokenizer tokenizer)
Creates a new wrapper.

Parameters:
source - a εοs tokenizer
tokenizer - a Lucene tokenizer to reuse in the εοs environment
Method Detail

next

public Token next()
           throws TokenizerException
Description copied from class: TokenFilter
Implementations should use TokenFilter.getSource() to fetch the source Tokenizer an handle the resulting Token.

Specified by:
next in interface Tokenizer
Specified by:
next in class TokenFilter
Returns:
the next token or null
Throws:
TokenizerException - if an error occurs


Copyright © 2008. All Rights Reserved.