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.readings
Class ReadingsBook

    java.lang.Object
      org.crosswire.jsword.book.basic.AbstractBook
          org.crosswire.jsword.book.readings.ReadingsBook

All Implemented Interfaces:
  Comparable, Activatable, Book, KeyFactory, PreferredKey

    public class ReadingsBook

extends AbstractBook
implements PreferredKey

A Dictionary that displays daily Readings.

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

Field Summary
`private Key` | `global` The global key list
`private Map` | `hash` The store of keys and data
`private static Logger` | `log` The log stream

Constructor Summary
`ReadingsBook(ReadingsBookDriver driver, BookCategory type)` Constructor for ReadingsBook.

Method Summary
`Key` | `createEmptyKeyList()` Fetch an empty Key to which we can add Keys.
`BookData` | `getData(Key key)` Retrieval: Add to the given document some mark-up for the specified Verses.
`Key` | `getGlobalKeyList()` Get a complete list of index entries.
`Key` | `getKey(String name)` Someone has typed in a reference to find, but we need a Key to actually look it up.
`Key` | `getPreferred()` What Key would this object like us to use?
`String` | `getRawData(Key key)` Returns the raw text that getData(Key key) builds into OSIS.
`Key` | `getValidKey(String name)` Get a Key for the name, if possible.
`boolean` | `hasFeature(FeatureType feature)` Return whether the feature is supported by the book.

Methods inherited from class org.crosswire.jsword.book.basic.AbstractBook
`activate, addIndexStatusListener, compareTo, deactivate, equals, find, find, firePropertyChange, getBook, getBookCategory, getBookMetaData, getDriver, getDriverName, getFullName, getIndexStatus, getInitials, getLanguage, getName, getOsisID, getProperties, getUnlockKey, hashCode, isEnciphered, isLeftToRight, isLocked, isQuestionable, isSupported, removeIndexStatusListener, setBookMetaData, setIndexStatus, toOSIS, toString, unlock`

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

Field Detail

### global

    private Key global

  The global key list

### hash

    private Map hash

  The store of keys and data

### log

    private static final Logger log

  The log stream

Constructor Detail

### ReadingsBook

    public ReadingsBook(ReadingsBookDriver driver,
                        BookCategory type)

  Constructor for ReadingsBook.

Method Detail

### getPreferred

    public Key getPreferred()

  Description copied from interface: `PreferredKey`
  What Key would this object like us to use?

  Specified by:
    `getPreferred` in interface `PreferredKey`
  Returns:
    The preferredKey

### getData

    public BookData getData(Key key)
                     throws BookException

  Description copied from interface: `Book`
  Retrieval: Add to the given document some mark-up for the specified Verses.

  Specified by:
    `getData` in interface `Book`
  Parameters:
    `key` - The verses to search for
  Returns:
    The found Book data
  Throws:
    `BookException` - If anything goes wrong with this method

### getRawData

    public String getRawData(Key key)
                      throws BookException

  Description copied from interface: `Book`
  Returns the raw text that getData(Key key) builds into OSIS.

  Specified by:
    `getRawData` in interface `Book`
  Parameters:
    `key` - The verses to search for
  Returns:
    The found Book data
  Throws:
    `BookException` - If anything goes wrong with this method

### getValidKey

    public Key getValidKey(String name)

  Description copied from interface: `KeyFactory`
  Get a Key for the name, if possible. Otherwise return an empty Key.

  Specified by:
    `getValidKey` in interface `KeyFactory`
  Returns:
    a valid key.

### getKey

    public Key getKey(String name)
               throws NoSuchKeyException

  Description copied from interface: `KeyFactory`
  Someone has typed in a reference to find, but we need a Key to actually look it up. So we create a Key from the string if such a translation is possible. The returned Key may be a BranchKey if the string represents more than one Key.

  Specified by:
    `getKey` in interface `KeyFactory`
  Parameters:
    `name` - The string to translate into a Key
  Returns:
    The Key corresponding to the input text
  Throws:
    `NoSuchKeyException` - If the name can not be parsed.

### getGlobalKeyList

    public Key getGlobalKeyList()

  Description copied from interface: `KeyFactory`
  Get a complete list of index entries. Create a Key that encompasses all of the known valid keys for the given context. For a dictionary this will include all of the entries in the dictionary, for a Bible this will probably include all the verses in the Bible, but a commentary may well miss some out.

  Specified by:
    `getGlobalKeyList` in interface `KeyFactory`
  Returns:
    A Key that includes all of the known Keys

### createEmptyKeyList

    public Key createEmptyKeyList()

  Description copied from interface: `KeyFactory`
  Fetch an empty Key to which we can add Keys. Not all implementations of Key are able to hold any type of Key, It isn't reasonable to expect a Key of Bible verses (=Passage) to hold a dictionary Key. So each KeyFactory must be able to create you an empty Key to which you can safely add other Keys it generates.

  Specified by:
    `createEmptyKeyList` in interface `KeyFactory`
  Returns:
    An empty Key that can hold other Keys from this factory.

### hasFeature

    public boolean hasFeature(FeatureType feature)

  Description copied from interface: `Book`
  Return whether the feature is supported by the book.

  Specified by:
    `hasFeature` in interface `Book`
  Overrides:
    `hasFeature` in class `AbstractBook`

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