Coverage Report - org.crosswire.jsword.index.lucene.analysis.AbstractBookTokenFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractBookTokenFilter
0%
0/10
N/A
1
 
 1  
 /**
 2  
  * Distribution License:
 3  
  * JSword is free software; you can redistribute it and/or modify it under
 4  
  * the terms of the GNU Lesser General Public License, version 2.1 or later
 5  
  * as published by the Free Software Foundation. This program is distributed
 6  
  * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 7  
  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 8  
  * See the GNU Lesser General Public License for more details.
 9  
  *
 10  
  * The License is available on the internet at:
 11  
  *      http://www.gnu.org/copyleft/lgpl.html
 12  
  * or by writing to:
 13  
  *      Free Software Foundation, Inc.
 14  
  *      59 Temple Place - Suite 330
 15  
  *      Boston, MA 02111-1307, USA
 16  
  *
 17  
  * © CrossWire Bible Society, 2008 - 2016
 18  
  *
 19  
  */
 20  
 package org.crosswire.jsword.index.lucene.analysis;
 21  
 
 22  
 import org.apache.lucene.analysis.TokenFilter;
 23  
 import org.apache.lucene.analysis.TokenStream;
 24  
 import org.crosswire.jsword.book.Book;
 25  
 
 26  
 /**
 27  
  * An AbstractBookTokenFilter ties a Lucene TokenFilter to a Book.
 28  
  * 
 29  
  * @see gnu.lgpl.License The GNU Lesser General Public License for details.
 30  
  * @author DM Smith
 31  
  */
 32  
 public abstract class AbstractBookTokenFilter extends TokenFilter {
 33  
 
 34  
     /**
 35  
      * Create a TokenFilter not tied to a Book.
 36  
      * 
 37  
      * @param input
 38  
      *            the token stream to filter
 39  
      */
 40  
     public AbstractBookTokenFilter(TokenStream input) {
 41  0
         this(null, input);
 42  0
     }
 43  
 
 44  
     /**
 45  
      * Create a TokenFilter tied to a Book.
 46  
      * 
 47  
      * @param book the book
 48  
      * @param input
 49  
      *            the token stream to filter
 50  
      */
 51  
     public AbstractBookTokenFilter(Book book, TokenStream input) {
 52  0
         super(input);
 53  0
         this.book = book;
 54  0
     }
 55  
 
 56  
     /**
 57  
      * @return the book
 58  
      */
 59  
     public Book getBook() {
 60  0
         return book;
 61  
     }
 62  
 
 63  
     /**
 64  
      * @param book
 65  
      *            the book to set
 66  
      */
 67  
     public void setBook(Book book) {
 68  0
         this.book = book;
 69  0
     }
 70  
 
 71  
     /* Define to quite FindBugs */
 72  
     @Override
 73  
     public boolean equals(Object obj) {
 74  0
         return super.equals(obj);
 75  
     }
 76  
 
 77  
     /* Define to quite FindBugs */
 78  
     @Override
 79  
     public int hashCode() {
 80  0
         return super.hashCode();
 81  
     }
 82  
 
 83  
     private Book book;
 84  
 }