org.crosswire.jsword.index.lucene.analysis
Class AbstractBookTokenFilter

java.lang.Object
  extended by org.apache.lucene.util.AttributeSource
      extended by org.apache.lucene.analysis.TokenStream
          extended by org.apache.lucene.analysis.TokenFilter
              extended by org.crosswire.jsword.index.lucene.analysis.AbstractBookTokenFilter
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
KeyFilter, StrongsNumberFilter, XRefFilter

public abstract class AbstractBookTokenFilter
extends org.apache.lucene.analysis.TokenFilter

An AbstractBookTokenFilter ties a Lucene TokenFilter to a Book.

Author:
DM Smith
See Also:
for license details.
The copyright to this program is held by it's authors.

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
private  Book book
           
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
AbstractBookTokenFilter(Book book, org.apache.lucene.analysis.TokenStream input)
          Create a TokenFilter tied to a Book.
AbstractBookTokenFilter(org.apache.lucene.analysis.TokenStream input)
          Create a TokenFilter not tied to a Book.
 
Method Summary
 boolean equals(Object obj)
           
 Book getBook()
           
 int hashCode()
           
 void setBook(Book book)
           
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
 
Methods inherited from class org.apache.lucene.analysis.TokenStream
incrementToken
 
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, restoreState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

book

private Book book
Constructor Detail

AbstractBookTokenFilter

public AbstractBookTokenFilter(org.apache.lucene.analysis.TokenStream input)
Create a TokenFilter not tied to a Book.

Parameters:
input - the token stream to filter

AbstractBookTokenFilter

public AbstractBookTokenFilter(Book book,
                               org.apache.lucene.analysis.TokenStream input)
Create a TokenFilter tied to a Book.

Parameters:
input - the token stream to filter
Method Detail

getBook

public Book getBook()
Returns:
the book

setBook

public void setBook(Book book)
Parameters:
book - the book to set

equals

public boolean equals(Object obj)
Overrides:
equals in class org.apache.lucene.util.AttributeSource

hashCode

public int hashCode()
Overrides:
hashCode in class org.apache.lucene.util.AttributeSource

Copyright ? 2003-2011