org.crosswire.jsword.book
Interface Book

All Superinterfaces:
Activatable, BookMetaData, Comparable, KeyFactory
All Known Implementing Classes:
AbstractBook, PassageAbstractBook, ReadingsBook, SwordBook, 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).

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: Book.java,v 1.22 2005/03/19 01:56:47 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

Field Summary
 
Fields inherited from interface org.crosswire.jsword.book.BookMetaData
KEY_BOOK, KEY_DRIVER, KEY_INDEXSTATUS, KEY_INITIALS, KEY_LANGUAGE, KEY_NAME, KEY_TYPE
 
Method Summary
 Key find(String search)
          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
 
Methods inherited from interface org.crosswire.jsword.book.BookMetaData
addPropertyChangeListener, getDriver, getDriverName, getFullName, getIndexStatus, getInitials, getLanguage, getName, getOsisID, getProperties, getType, hasFeature, isLeftToRight, 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(String search)
         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:
search - The search spec.
Throws:
BookException - If anything goes wrong with this method

Copyright ? 2003-2004