|
||||||||||
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.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
Field Summary | |
---|---|
private BookMetaData |
bmd
The meta data for this book |
private Searcher |
searcher
How do we perform searches |
Fields inherited from interface org.crosswire.jsword.book.BookMetaData |
---|
KEY_BOOK, KEY_DRIVER, KEY_INDEXSTATUS, KEY_INITIALS, KEY_LANGUAGE, KEY_NAME, KEY_TYPE |
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 |
addPropertyChangeListener(PropertyChangeListener li)
Adds a PropertyChangeListener 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(String search)
Retrieval: For a given search spec find a list of references to it. |
Book |
getBook()
|
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. |
BookType |
getType()
What type of content is this, a Bible or a reference work like a Dictionary or Commentary |
boolean |
hasFeature(FeatureType feature)
Return whether the feature is supported by the book. |
int |
hashCode()
|
boolean |
isLeftToRight()
Return the orientation of the language of the Book. |
void |
removePropertyChangeListener(PropertyChangeListener li)
Removes a PropertyChangeListener from the listener list. |
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. |
org.jdom.Document |
toOSIS()
Get an OSIS representation of information concerning this Book. |
String |
toString()
|
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 |
Field Detail |
---|
private Searcher searcher
private BookMetaData bmd
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 search) throws BookException
Book
find
in interface Book
search
- The search spec.
BookException
- If anything goes wrong with this methodpublic Book getBook()
public BookDriver getDriver()
BookMetaData
getDriver
in interface BookMetaData
public String getDriverName()
BookMetaData
getDriverName
in interface BookMetaData
public String getFullName()
BookMetaData
getFullName
in interface BookMetaData
public IndexStatus getIndexStatus()
BookMetaData
getIndexStatus
in interface BookMetaData
IndexManager
public void setIndexStatus(IndexStatus status)
BookMetaData
setIndexStatus
in interface BookMetaData
IndexManager
public String getInitials()
BookMetaData
getInitials
in interface BookMetaData
public String getLanguage()
BookMetaData
getLanguage
in interface BookMetaData
public String getName()
BookMetaData
getName
in interface BookMetaData
public String getOsisID()
BookMetaData
getOsisID
in interface BookMetaData
public Map getProperties()
BookMetaData
getProperties
in interface BookMetaData
public BookType getType()
BookMetaData
getType
in interface BookMetaData
public boolean isLeftToRight()
BookMetaData
isLeftToRight
in interface BookMetaData
public boolean hasFeature(FeatureType feature)
BookMetaData
hasFeature
in interface BookMetaData
public void removePropertyChangeListener(PropertyChangeListener li)
BookMetaData
PropertyChangeListener
from the listener list.
removePropertyChangeListener
in interface BookMetaData
li
- the PropertyChangeListener
to be removedpublic void addPropertyChangeListener(PropertyChangeListener li)
BookMetaData
PropertyChangeListener
to the listener list.
The listener is registered for all properties. However the only one likely
to change at the time of writing is the Index Status.
A PropertyChangeEvent
will get fired in response
to setting a bound property, such as setIndexStatus
.
addPropertyChangeListener
in interface BookMetaData
li
- the PropertyChangeListener
to be addedpublic org.jdom.Document toOSIS()
BookMetaData
toOSIS
in interface BookMetaData
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-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |