public interface BookMetaData extends Comparable<BookMetaData>
Bible.getText(VerseRange)
. The implication of this is that there
may be many instances of the Version "NIV", as there are several different
versions of the NIV - Original American-English, Anglicised, and Inclusive
Language editions at least.
BookMetaData like Strings must be compared using .equals()
instead of ==. A Bible must have the ability to handle a book unknown to
JSword. So Books must be able to add versions to the system, and the system
must cope with books that already exist.
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
static String |
KEY_BOOK
The key for the book in the properties map
|
static String |
KEY_BOOKLIST |
static String |
KEY_CATEGORY
The key for the type in the properties map
|
static String |
KEY_DRIVER
The key for the driver in the properties map
|
static String |
KEY_FONT
The key for the font in the properties map
|
static String |
KEY_LANG
The key for the language in the properties map
|
static String |
KEY_LANGUAGE
The key for the language in the properties map
|
static String |
KEY_NAME
The key for the name in the properties map
|
static String |
KEY_SCOPE |
static String |
KEY_VERSIFICATION
The key for the Versification property.
|
Modifier and Type | Method and Description |
---|---|
String |
getAbbreviation()
The initials of this book - how people familiar with this book will know
it, for example "NIV", "KJV".
|
BookCategory |
getBookCategory()
What category of content is this, a Bible or a reference work like a
Dictionary or Commentary.
|
String |
getBookCharset()
With which Charset is this Book encoded?
|
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 internal name of this book.
|
KeyType |
getKeyType()
How this Book organizes it's keys.
|
Language |
getLanguage()
The language of the book.
|
URI |
getLibrary()
Get the base URI for library of this module.
|
URI |
getLocation()
Get the base URI for relative URIs in the document.
|
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.
|
String |
getProperty(String key)
Get the property or null.
|
Set<String> |
getPropertyKeys()
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.
|
boolean |
isEnciphered()
Indicate whether this book is enciphered.
|
boolean |
isLeftToRight()
Return the orientation of the script 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)
Save to shared storage.
|
void |
putProperty(String key,
String value,
boolean forFrontend)
Saves an entry to a particular configuration file.
|
void |
reload()
If this BookMetaData is partially loaded, reload it fully.
|
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 |
setLanguage(Language language)
Set the language for this book.
|
void |
setLibrary(URI library)
Set the base URI for library of this module.
|
void |
setLocation(URI library)
Set the base URI for relative URIs in the document.
|
void |
setProperty(String key,
String value)
Store a transient property.
|
org.jdom2.Document |
toOSIS()
Get an OSIS representation of information concerning this Book.
|
boolean |
unlock(String unlockKey)
Unlocks a book with the given key.
|
compareTo
static final String KEY_CATEGORY
static final String KEY_BOOK
static final String KEY_DRIVER
static final String KEY_NAME
static final String KEY_LANG
static final String KEY_LANGUAGE
static final String KEY_FONT
static final String KEY_VERSIFICATION
static final String KEY_BOOKLIST
static final String KEY_SCOPE
String getName()
String getBookCharset()
KeyType getKeyType()
BookCategory getBookCategory()
BookDriver getDriver()
Language getLanguage()
void setLanguage(Language language)
language
- the book's languageString getAbbreviation()
String getInitials()
String getOsisID()
boolean isSupported()
boolean isEnciphered()
boolean isLocked()
boolean unlock(String unlockKey)
unlockKey
- the key to tryString getUnlockKey()
boolean isQuestionable()
String getDriverName()
boolean isLeftToRight()
boolean hasFeature(FeatureType feature)
feature
- the feature in questionURI getLibrary()
void setLibrary(URI library) throws BookException
library
- the base URI or null if there is noneBookException
- indicates missing data filesURI getLocation()
void setLocation(URI library)
library
- the base URI or null if there is nonevoid reload() throws BookException
BookException
- when a problem is encountered loading the fileSet<String> getPropertyKeys()
String getProperty(String key)
key
- the key of the property.void setProperty(String key, String value)
key
- the key of the property to setvalue
- the value of the propertyvoid putProperty(String key, String value)
key
- the key of the property to setvalue
- the value of the propertyvoid putProperty(String key, String value, boolean forFrontend)
key
- the entry that we are savingvalue
- the value of the entryforFrontend
- when true
save to front end storage, else in shared storageIndexStatus getIndexStatus()
IndexManager
void setIndexStatus(IndexStatus status)
status
- the status for the index of this bookIndexManager
org.jdom2.Document toOSIS()