|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.jsword.book.basic.AbstractBook
public abstract class AbstractBook
AbstractBook implements a few of the more generic methods of Book. This class does a lot of work in helping make search easier, and implementing some basic write methods.
for license details.
The copyright to this program is held by it's authors.| Field Summary | |
|---|---|
private BookMetaData |
bmd
The meta data for this book |
private EventListenerList |
listeners
The list of property change listeners |
private Searcher |
searcher
How do we perform searches |
| Constructor Summary | |
|---|---|
AbstractBook(BookMetaData bmd)
|
|
| 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. |
void |
addIndexStatusListener(IndexStatusListener listener)
Adds a IndexStatusListener to the listener list. |
int |
compareTo(Object obj)
|
void |
deactivate(Lock lock)
Called to indicate that the Book should release whatever system resources it can to make way for other uses. |
boolean |
equals(Object obj)
|
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. |
protected void |
firePropertyChange(IndexStatus oldStatus,
IndexStatus newStatus)
Reports bound property changes. |
Book |
getBook()
|
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. |
String |
getFullName()
Calculated field: The full name of the book, for example The format is "name, (Driver)" |
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. |
Map |
getProperties()
Get a list of all the properties available to do with this Book. |
String |
getProperty(String key)
|
String |
getUnlockKey()
Gets the unlock key for the module. |
boolean |
hasFeature(FeatureType feature)
Return whether the feature is supported by the book. |
int |
hashCode()
|
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. |
void |
putProperty(String key,
String value)
|
void |
removeIndexStatusListener(IndexStatusListener listener)
Removes a IndexStatusListener from the listener list. |
void |
setBookMetaData(BookMetaData bmd)
Set the meta-information for this book. |
void |
setIndexStatus(IndexStatus newStatus)
This method does not alter the index status, however it is for Indexers that are responsible for indexing and have changed the status themselves. |
org.jdom.Document |
toOSIS()
Get an OSIS representation of information concerning this Book. |
String |
toString()
|
boolean |
unlock(String unlockKey)
Unlocks a book with the given key. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.crosswire.jsword.book.Book |
|---|
getData, getRawData |
| Methods inherited from interface org.crosswire.jsword.passage.KeyFactory |
|---|
createEmptyKeyList, getGlobalKeyList, getKey, getValidKey |
| Field Detail |
|---|
private Searcher searcher
private BookMetaData bmd
private EventListenerList listeners
| Constructor Detail |
|---|
public AbstractBook(BookMetaData bmd)
| Method Detail |
|---|
public final BookMetaData getBookMetaData()
Book
getBookMetaData in interface Bookpublic final void setBookMetaData(BookMetaData bmd)
Book
setBookMetaData in interface Bookpublic void activate(Lock lock)
Activatable
activate in interface Activatablelock - An attempt to ensure that only the Activator calls this methodpublic void deactivate(Lock lock)
Activatable
deactivate in interface Activatablelock - An attempt to ensure that only the Activator calls this method
public Key find(String request)
throws BookException
Book
find in interface Bookrequest - The search spec.
BookException - If anything goes wrong with this method
public Key find(SearchRequest request)
throws BookException
Book
find in interface Bookrequest - The search spec.
BookException - If anything goes wrong with this methodpublic Book getBook()
public BookDriver getDriver()
Book
getDriver in interface Bookpublic String getDriverName()
Book
getDriverName in interface Bookpublic String getFullName()
Book
getFullName in interface Bookpublic IndexStatus getIndexStatus()
Book
getIndexStatus in interface BookIndexManagerpublic void setIndexStatus(IndexStatus newStatus)
Book
setIndexStatus in interface BookIndexManagerpublic String getInitials()
Book
getInitials in interface Bookpublic String getLanguage()
Book
getLanguage in interface Bookpublic String getName()
Book
getName in interface Bookpublic String getOsisID()
Book
getOsisID in interface Bookpublic Map getProperties()
Book
getProperties in interface Bookpublic String getProperty(String key)
getProperty in interface Bookkey - the key of the property.
public void putProperty(String key,
String value)
putProperty in interface Bookkey - the key of the property.value - the value of the propertypublic BookCategory getBookCategory()
Book
getBookCategory in interface Bookpublic boolean isLeftToRight()
Book
isLeftToRight in interface Bookpublic boolean isSupported()
Book
isSupported in interface Bookpublic boolean isEnciphered()
Book
isEnciphered in interface Bookpublic boolean isLocked()
Book
isLocked in interface Bookpublic boolean unlock(String unlockKey)
Book
unlock in interface BookunlockKey - the key to try
public String getUnlockKey()
Book
getUnlockKey in interface Bookpublic boolean isQuestionable()
Book
isQuestionable in interface Bookpublic boolean hasFeature(FeatureType feature)
Book
hasFeature in interface Bookpublic void addIndexStatusListener(IndexStatusListener listener)
BookIndexStatusListener to the listener list.
A IndexStatusEvent will get fired in response
to setIndexStatus.
addIndexStatusListener in interface Booklistener - the IndexStatusListener to be addedpublic void removeIndexStatusListener(IndexStatusListener listener)
BookIndexStatusListener from the listener list.
removeIndexStatusListener in interface Booklistener - the IndexStatusListener to be removed
protected void firePropertyChange(IndexStatus oldStatus,
IndexStatus newStatus)
oldValue and newValue are not equal and the
PropertyChangeEvent listener list isn't empty,
then fire a PropertyChange event to each listener.
oldStatus - the old value of the property (as an Object)newStatus - the new value of the property (as an Object)public org.jdom.Document toOSIS()
Book
toOSIS in interface Bookpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparablepublic String toString()
toString in class Object
|
Copyright ยจ 2003-2006 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||