|
||||||||||
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()
|
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 |
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 |
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 transient EventListenerList listeners
Constructor Detail |
---|
public AbstractBook()
Method Detail |
---|
public final BookMetaData getBookMetaData()
Book
getBookMetaData
in interface Book
public final void setBookMetaData(BookMetaData bmd)
Book
setBookMetaData
in interface Book
public void activate(Lock lock)
Activatable
activate
in interface Activatable
lock
- An attempt to ensure that only the Activator calls this methodpublic void deactivate(Lock lock)
Activatable
deactivate
in interface Activatable
lock
- An attempt to ensure that only the Activator calls this methodpublic Key find(String request) throws BookException
Book
find
in interface Book
request
- The search spec.
BookException
- If anything goes wrong with this methodpublic Key find(SearchRequest request) throws BookException
Book
find
in interface Book
request
- The search spec.
BookException
- If anything goes wrong with this methodpublic Book getBook()
public BookDriver getDriver()
Book
getDriver
in interface Book
public String getDriverName()
Book
getDriverName
in interface Book
public String getFullName()
Book
getFullName
in interface Book
public IndexStatus getIndexStatus()
Book
getIndexStatus
in interface Book
IndexManager
public void setIndexStatus(IndexStatus newStatus)
Book
setIndexStatus
in interface Book
IndexManager
public String getInitials()
Book
getInitials
in interface Book
public String getLanguage()
Book
getLanguage
in interface Book
public String getName()
Book
getName
in interface Book
public String getOsisID()
Book
getOsisID
in interface Book
public Map getProperties()
Book
getProperties
in interface Book
public BookCategory getBookCategory()
Book
getBookCategory
in interface Book
public boolean isLeftToRight()
Book
isLeftToRight
in interface Book
public boolean isSupported()
Book
isSupported
in interface Book
public boolean isEnciphered()
Book
isEnciphered
in interface Book
public boolean isLocked()
Book
isLocked
in interface Book
public boolean unlock(String unlockKey)
Book
unlock
in interface Book
unlockKey
- the key to try
public String getUnlockKey()
Book
getUnlockKey
in interface Book
public boolean isQuestionable()
Book
isQuestionable
in interface Book
public boolean hasFeature(FeatureType feature)
Book
hasFeature
in interface Book
public void addIndexStatusListener(IndexStatusListener listener)
Book
IndexStatusListener
to the listener list.
A IndexStatusEvent
will get fired in response
to setIndexStatus
.
addIndexStatusListener
in interface Book
listener
- the IndexStatusListener
to be addedpublic void removeIndexStatusListener(IndexStatusListener listener)
Book
IndexStatusListener
from the listener list.
removeIndexStatusListener
in interface Book
listener
- the IndexStatusListener
to be removedprotected 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 Book
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object obj)
compareTo
in interface Comparable
public 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 |