|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.basic.AbstractBook
org.crosswire.jsword.book.readings.ReadingsBook
public class ReadingsBook
A Dictionary that displays daily Readings.
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,
String setname,
BookCategory type)
Constructor for ReadingsBook. |
Method Summary | |
---|---|
Key |
createEmptyKeyList()
Fetch an empty Key to which we can add Keys. |
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. |
Iterator |
getOsisIterator(Key key,
boolean allowEmpty)
Return an iterator that returns each key's OSIS in turn. |
Key |
getPreferred()
What Key would this object like us to use? |
String |
getRawText(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. |
boolean |
isWritable()
A Book is writable if the file system allows the underlying files to be opened for writing and if the driver for the book allows writing. |
void |
setAliasKey(Key alias,
Key source)
Store an alias of one key to another. |
void |
setRawText(Key key,
String rawData)
Store the raw text for the given key. |
Methods inherited from class org.crosswire.jsword.book.basic.AbstractBook |
---|
activate, addIndexStatusListener, compareTo, deactivate, equals, find, find, firePropertyChange, getBook, getBookCategory, getBookMetaData, getDriver, getDriverName, getIndexStatus, getInitials, getLanguage, getName, getOsisID, getProperties, getProperty, getUnlockKey, hashCode, isEnciphered, isLeftToRight, isLocked, isQuestionable, isSupported, match, putProperty, removeIndexStatusListener, setBookMetaData, setIndexStatus, toOSIS, toString, unlock |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Key global
private Map hash
private static final Logger log
Constructor Detail |
---|
public ReadingsBook(ReadingsBookDriver driver, String setname, BookCategory type)
Method Detail |
---|
public Key getPreferred()
PreferredKey
getPreferred
in interface PreferredKey
public Iterator getOsisIterator(Key key, boolean allowEmpty) throws BookException
Book
getOsisIterator
in interface Book
allowEmpty
- indicates whether empty keys should be present.
BookException
public String getRawText(Key key) throws BookException
Book
getRawText
in interface Book
key
- The item to locate
BookException
- If anything goes wrong with this methodpublic boolean isWritable()
Book
isWritable
in interface Book
public void setRawText(Key key, String rawData) throws BookException
Book
setRawText
in interface Book
key
- The item to locaterawData
- The text to store
BookException
- If anything goes wrong with this methodpublic void setAliasKey(Key alias, Key source) throws BookException
Book
It should be an exception to set an alias when that alias already has raw text. Also, it should be an exception to set an alias to an alias. However, getRawText(Key) must be able to handle alias chains.
setAliasKey
in interface Book
alias
- the key that aliases anothersource
- the key that holds the text
BookException
- If anything goes wrong with this methodpublic Key getValidKey(String name)
KeyFactory
getValidKey
in interface KeyFactory
public Key getKey(String name) throws NoSuchKeyException
KeyFactory
getKey
in interface KeyFactory
name
- The string to translate into a Key
NoSuchKeyException
- If the name can not be parsed.public Key getGlobalKeyList()
KeyFactory
getGlobalKeyList
in interface KeyFactory
public Key createEmptyKeyList()
KeyFactory
createEmptyKeyList
in interface KeyFactory
public boolean hasFeature(FeatureType feature)
Book
hasFeature
in interface Book
hasFeature
in class AbstractBook
|
Copyright ยจ 2003-2007 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |