Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.book
Class BookFilters

    java.lang.Object
      org.crosswire.jsword.book.BookFilters

    public final class BookFilters

extends Object

Some common implementations of BookFilter.

Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Nested Class Summary
`(package private) static class` | `BookFilters.AllBookFilter` Filter for all books
`(package private) static class` | `BookFilters.BookCategoryFilter` Filter for books by category
`(package private) static class` | `BookFilters.BookFeatureFilter` Filter for books by feature
`(package private) static class` | `BookFilters.CustomBookFilter` Custom Filter
`(package private) static class` | `BookFilters.NotBookCategoryFilter` Filter for books by category

Field Summary
`private static boolean` | `commentariesWithBibles` Whether biblesBookFilter includes commentaries.
`(package private) static Logger` | `log` The log stream

Constructor Summary
`private` | `BookFilters()` Ensure we cant be created

Method Summary
`static BookFilter` | `both(BookFilter b1, BookFilter b2)` A filter that accepts Books that match two criteria.
`static BookFilter` | `either(BookFilter b1, BookFilter b2)` A filter that accepts Books that match either of two criteria.
`static BookFilter` | `getAll()` A simple default filter that returns everything
`static BookFilter` | `getBibles()` A filter that accepts everything that implements Bible or Commentary, when commentaries are listed with Bibles.
`static BookFilter` | `getBooksByDriver(BookDriver driver)` A filter that accepts Books that match by book driver.
`static BookFilter` | `getCommentaries()` A filter that accepts everything that implements Commentary
`static BookFilter` | `getCustom(String match)` A simple default filter that returns everything.
`static BookFilter` | `getDailyDevotionals()` A filter that accepts everything that implements DailyDevotionals
`static BookFilter` | `getDictionaries()` A filter that accepts everything that implements Dictionary
`static BookFilter` | `getGeneralBooks()` A filter that accepts everything that implements GeneralBook
`static BookFilter` | `getGlossaries()` A filter that accepts everything that implements Dictionary
`static BookFilter` | `getGreekDefinitions()` A filter that accepts everything that is a Greek Definition Dictionary
`static BookFilter` | `getGreekParse()` A filter that accepts everything that is a Greek Parse/Morphology Dictionary
`static BookFilter` | `getHebrewDefinitions()` A filter that accepts everything that is a Hebrew Definition Dictionary
`static BookFilter` | `getHebrewParse()` A filter that accepts everything that is a Hebrew Parse/Morphology Dictionary
`static BookFilter` | `getNonBibles()` A filter that accepts everything that's not a Bible or a Commentary, when commentaries are listed with Bibles.
`static BookFilter` | `getOnlyBibles()` A filter that accepts everything that implements Bible.
`static boolean` | `isCommentariesWithBibles()` Determine whether the getBible should return the current Bible or the user's chosen default.
`static void` | `setCommentariesWithBibles(boolean current)` Establish whether the getBible should return the current Bible or the user's chosen default.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### commentariesWithBibles

    private static boolean commentariesWithBibles

  Whether biblesBookFilter includes commentaries. Initally false.

### log

    static final Logger log

  The log stream

Constructor Detail

### BookFilters

    private BookFilters()

  Ensure we cant be created

Method Detail

### getAll

    public static BookFilter getAll()

  A simple default filter that returns everything

### getBibles

    public static BookFilter getBibles()

  A filter that accepts everything that implements Bible or Commentary, when commentaries are listed with Bibles.

### getOnlyBibles

    public static BookFilter getOnlyBibles()

  A filter that accepts everything that implements Bible.

### getNonBibles

    public static BookFilter getNonBibles()

  A filter that accepts everything that's not a Bible or a Commentary, when commentaries are listed with Bibles.

### getDictionaries

    public static BookFilter getDictionaries()

  A filter that accepts everything that implements Dictionary

### getGlossaries

    public static BookFilter getGlossaries()

  A filter that accepts everything that implements Dictionary

### getDailyDevotionals

    public static BookFilter getDailyDevotionals()

  A filter that accepts everything that implements DailyDevotionals

### getCommentaries

    public static BookFilter getCommentaries()

  A filter that accepts everything that implements Commentary

### getGeneralBooks

    public static BookFilter getGeneralBooks()

  A filter that accepts everything that implements GeneralBook

### getGreekDefinitions

    public static BookFilter getGreekDefinitions()

  A filter that accepts everything that is a Greek Definition Dictionary

### getGreekParse

    public static BookFilter getGreekParse()

  A filter that accepts everything that is a Greek Parse/Morphology Dictionary

### getHebrewDefinitions

    public static BookFilter getHebrewDefinitions()

  A filter that accepts everything that is a Hebrew Definition Dictionary

### getHebrewParse

    public static BookFilter getHebrewParse()

  A filter that accepts everything that is a Hebrew Parse/Morphology Dictionary

### isCommentariesWithBibles

    public static boolean isCommentariesWithBibles()

  Determine whether the getBible should return the current Bible or the user's chosen default.

  Returns:
    true if the bible tracks the user's selection

### setCommentariesWithBibles

    public static void setCommentariesWithBibles(boolean current)

  Establish whether the getBible should return the current Bible or the user's chosen default.

  Parameters:
    `current` -

### both

    public static BookFilter both(BookFilter b1,
                                  BookFilter b2)

  A filter that accepts Books that match two criteria.

### either

    public static BookFilter either(BookFilter b1,
                                    BookFilter b2)

  A filter that accepts Books that match either of two criteria.

### getBooksByDriver

    public static BookFilter getBooksByDriver(BookDriver driver)

  A filter that accepts Books that match by book driver.

### getCustom

    public static BookFilter getCustom(String match)

  A simple default filter that returns everything. The match parameter is a set of name value pairs like this:
  `initials=ESV;type=Bible;driverName=Sword`
  Before the = there must be the name of a property on Book and after the value to match (.toString()) is called on the results of the getter.

  Parameters:
    `match` - a ; separated list of properties (of Book) to match
  See Also:
    `Book`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD