|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Book
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).
for license details.
The copyright to this program is held by it's authors.
Method Summary | |
---|---|
void |
addIndexStatusListener(IndexStatusListener li)
Adds a IndexStatusListener to the listener list. |
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. |
BookCategory |
getBookCategory()
What category of content is this, a Bible or a reference work like a Dictionary or Commentary. |
BookMetaData |
getBookMetaData()
Meta-Information: What version of the Bible is this? |
BookDriver |
getDriver()
Accessor for the driver that runs this Book. |
String |
getDriverName()
Calculated field: The name of the name, which could be helpful to distinguish similar Books available through 2 BookDrivers. |
IndexStatus |
getIndexStatus()
Has anyone generated a search index for this Book? |
String |
getInitials()
The initials of this book - how people familiar with this book will know it, for example "NIV", "KJV". |
String |
getLanguage()
The language of the book is the common name for the iso639 code. |
String |
getName()
The name of the book, for example "King James Version" or "Bible in Basic English" or "Greek". |
String |
getOsisID()
Calculated field: Get an OSIS identifier for the OsisText.setOsisIDWork() and the Work.setOsisWork() methods. |
Iterator |
getOsisIterator(Key key,
boolean allowEmpty)
Return an iterator that returns each key's OSIS in turn. |
Map |
getProperties()
Get a list of all the properties available to do with this Book. |
String |
getProperty(String key)
|
String |
getRawText(Key key)
Returns the raw text that getData(Key key) builds into OSIS. |
String |
getUnlockKey()
Gets the unlock key for the module. |
boolean |
hasFeature(FeatureType feature)
Return whether the feature is supported by the book. |
boolean |
isEnciphered()
Indicate whether this book is enciphered. |
boolean |
isLeftToRight()
Return the orientation of the language of the Book. |
boolean |
isLocked()
Indicate whether this book is enciphered and without a key. |
boolean |
isQuestionable()
Indicate whether this book is questionable. |
boolean |
isSupported()
Indicate whether this book is supported by JSword. |
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. |
boolean |
match(String name)
Return the likelihood that we have a match. |
void |
putProperty(String key,
String value)
|
void |
removeIndexStatusListener(IndexStatusListener li)
Removes a IndexStatusListener from the listener list. |
void |
setAliasKey(Key alias,
Key source)
Store an alias of one key to another. |
void |
setBookMetaData(BookMetaData bmd)
Set the meta-information for this book. |
void |
setIndexStatus(IndexStatus status)
This method does not alter the index status, however it is for Indexers that are responsible for indexing and have changed the status themselves. |
void |
setRawText(Key key,
String rawData)
Store the raw text for the given key. |
org.jdom.Document |
toOSIS()
Get an OSIS representation of information concerning this Book. |
boolean |
unlock(String unlockKey)
Unlocks a book with the given key. |
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 java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
BookMetaData getBookMetaData()
void setBookMetaData(BookMetaData bmd)
Iterator getOsisIterator(Key key, boolean allowEmpty) throws BookException
allowEmpty
- indicates whether empty keys should be present.
BookException
String getRawText(Key key) throws BookException
key
- The item to locate
BookException
- If anything goes wrong with this methodboolean isWritable()
void setRawText(Key key, String rawData) throws BookException
key
- The item to locaterawData
- The text to store
BookException
- If anything goes wrong with this methodvoid setAliasKey(Key alias, Key source) throws BookException
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.
alias
- the key that aliases anothersource
- the key that holds the text
BookException
- If anything goes wrong with this methodKey find(SearchRequest request) throws BookException
request
- The search spec.
BookException
- If anything goes wrong with this methodKey find(String request) throws BookException
request
- The search spec.
BookException
- If anything goes wrong with this methodString getName()
BookCategory getBookCategory()
BookDriver getDriver()
String getLanguage()
String getInitials()
String getOsisID()
boolean match(String name)
name
-
boolean isSupported()
boolean isEnciphered()
boolean isLocked()
boolean unlock(String unlockKey)
unlockKey
- the key to try
String getUnlockKey()
boolean isQuestionable()
String getDriverName()
boolean isLeftToRight()
boolean hasFeature(FeatureType feature)
Map getProperties()
String getProperty(String key)
key
- the key of the property.
void putProperty(String key, String value)
key
- the key of the property.value
- the value of the propertyIndexStatus getIndexStatus()
IndexManager
void setIndexStatus(IndexStatus status)
IndexManager
org.jdom.Document toOSIS()
void addIndexStatusListener(IndexStatusListener li)
IndexStatusListener
to the listener list.
A IndexStatusEvent
will get fired in response
to setIndexStatus
.
li
- the IndexStatusListener
to be addedvoid removeIndexStatusListener(IndexStatusListener li)
IndexStatusListener
from the listener list.
li
- the IndexStatusListener
to be removed
|
Copyright ยจ 2003-2007 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |