|
||||||||||
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.sword.SwordDictionary
public class SwordDictionary
A Sword version of Dictionary.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private boolean |
active
Are we active |
private AbstractBackend |
backend
To read the data from the disk |
private Key |
global
The global key list |
private Map |
map
So we can quickly find a Key given the text for the key |
private SwordBookMetaData |
sbmd
The Sword configuration file |
private Key |
set
So we can implement getIndex() easily |
private static Pattern |
STRONGS_PATTERN
|
private static DecimalFormat |
ZERO_PAD
|
Constructor Summary | |
---|---|
protected |
SwordDictionary(SwordBookMetaData sbmd,
AbstractBackend backend)
Start and to as much checking as we can without using memory. |
Method Summary | |
---|---|
void |
activate(Lock lock)
Called to indicate that the Book should initialize itself, and consume whatever system resources it needs to be able to respond to other queries. |
private void |
checkActive()
Helper method so we can quickly activate ourselves on access |
Key |
createEmptyKeyList()
Fetch an empty Key to which we can add Keys. |
void |
deactivate(Lock lock)
Called to indicate that the Book should release whatever system resources it can to make way for other uses. |
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 text)
Someone has typed in a reference to find, but we need a Key to actually look it up. |
String |
getRawData(Key key)
Returns the raw text that getData(Key key) builds into OSIS. |
private Key |
getStrongsKey(String txt)
|
Key |
getValidKey(String name)
Get a Key for the name, if possible. |
Methods inherited from class org.crosswire.jsword.book.basic.AbstractBook |
---|
addIndexStatusListener, compareTo, equals, find, find, firePropertyChange, getBook, getBookCategory, getBookMetaData, getDriver, getDriverName, getFullName, getIndexStatus, getInitials, getLanguage, getName, getOsisID, getProperties, hasFeature, hashCode, isEnciphered, isLeftToRight, isQuestionable, isSupported, removeIndexStatusListener, setBookMetaData, setIndexStatus, toOSIS, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final Pattern STRONGS_PATTERN
private static final DecimalFormat ZERO_PAD
private Key global
private boolean active
private Map map
private Key set
private AbstractBackend backend
private SwordBookMetaData sbmd
Constructor Detail |
---|
protected SwordDictionary(SwordBookMetaData sbmd, AbstractBackend backend)
Method Detail |
---|
public final void activate(Lock lock)
Activatable
activate
in interface Activatable
activate
in class AbstractBook
lock
- An attempt to ensure that only the Activator calls this methodpublic final void deactivate(Lock lock)
Activatable
deactivate
in interface Activatable
deactivate
in class AbstractBook
lock
- An attempt to ensure that only the Activator calls this methodpublic BookData getData(Key key) throws BookException
Book
key
- The verses to search for
BookException
- If anything goes wrong with this methodpublic String getRawData(Key key) throws BookException
Book
key
- The verses to search for
BookException
- If anything goes wrong with this methodpublic Key getGlobalKeyList()
KeyFactory
public Key getValidKey(String name)
KeyFactory
public Key getKey(String text) throws NoSuchKeyException
KeyFactory
text
- The string to translate into a Key
NoSuchKeyException
- If the name can not be parsed.private Key getStrongsKey(String txt)
public Key createEmptyKeyList()
KeyFactory
private void checkActive()
|
Copyright ? 2003-2006 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |