org.crosswire.jsword.index.lucene.analysis

## Class AbstractBookTokenFilter

- java.lang.Object
- - org.apache.lucene.util.AttributeSource
  - - org.apache.lucene.analysis.TokenStream
    - - org.apache.lucene.analysis.TokenFilter
      - - org.crosswire.jsword.index.lucene.analysis.AbstractBookTokenFilter

- All Implemented Interfaces:
    Closeable, AutoCloseable
  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:
    `The GNU Lesser General Public License for details.`

- - ### 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
    Modifier and Type | Field and Description
    --- | ---
    `private Book` | `book`

    - ### Fields inherited from class org.apache.lucene.analysis.TokenFilter

      `input`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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:
        `book` - the book
        `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`