org.crosswire.jsword.book
Interface Book

All Superinterfaces:
Activatable, BookMetaData, Comparable, KeyFactory
All Known Implementing Classes:
AbstractBook, AbstractPassageBook, ReadingsBook, SwordBook, SwordDailyDevotion, SwordDictionary

public interface Book
extends Activatable, KeyFactory, BookMetaData

Book is the most basic store of textual data - It can retrieve data either as an XML document or as plain text - It uses Keys to refer to parts of itself, and can search for words (returning Keys).

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
 
Fields inherited from interface org.crosswire.jsword.book.BookMetaData
KEY_BOOK, KEY_CATEGORY, KEY_DRIVER, KEY_INDEXSTATUS, KEY_INITIALS, KEY_LANGUAGE, KEY_NAME
 
Method Summary
 Key find(SearchRequest request)
          Retrieval: For a given search spec find a list of references to it.
 Key find(String request)
          Retrieval: For a given search spec find a list of references to it.
 BookMetaData getBookMetaData()
          Meta-Information: What version of the Bible is this?
 BookData getData(Key key)
          Retrieval: Add to the given document some mark-up for the specified Verses.
 String getRawData(Key key)
          Returns the raw text that getData(Key key) builds into OSIS.
 void setBookMetaData(BookMetaData bmd)
          Set the meta-information for this book.
 
Methods inherited from interface org.crosswire.common.activate.Activatable
activate, deactivate
 
Methods inherited from interface org.crosswire.jsword.passage.KeyFactory
createEmptyKeyList, getGlobalKeyList, getKey, getValidKey
 
Methods inherited from interface org.crosswire.jsword.book.BookMetaData
addPropertyChangeListener, getBookCategory, getDriver, getDriverName, getFullName, getIndexStatus, getInitials, getLanguage, getName, getOsisID, getProperties, hasFeature, isEnciphered, isLeftToRight, isQuestionable, isSupported, removePropertyChangeListener, setIndexStatus, toOSIS
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getBookMetaData

BookMetaData getBookMetaData()
Meta-Information: What version of the Bible is this?

Returns:
A Version for this Bible

setBookMetaData

void setBookMetaData(BookMetaData bmd)
Set the meta-information for this book.


getData

BookData getData(Key key)
                 throws BookException
Retrieval: Add to the given document some mark-up for the specified Verses.

Parameters:
key - The verses to search for
Returns:
The found Book data
Throws:
BookException - If anything goes wrong with this method

getRawData

String getRawData(Key key)
                  throws BookException
Returns the raw text that getData(Key key) builds into OSIS.

Parameters:
key - The verses to search for
Returns:
The found Book data
Throws:
BookException - If anything goes wrong with this method

find

Key find(SearchRequest request)
         throws BookException
Retrieval: For a given search spec find a list of references to it. If there are no matches then null should be returned, otherwise a valid Key.

Parameters:
request - The search spec.
Throws:
BookException - If anything goes wrong with this method

find

Key find(String request)
         throws BookException
Retrieval: For a given search spec find a list of references to it. If there are no matches then null should be returned, otherwise a valid Key.

Parameters:
request - The search spec.
Throws:
BookException - If anything goes wrong with this method

Copyright ยจ 2003-2005