public abstract class AbstractBookMetaData extends Object implements BookMetaData
The GNU Lesser General Public License for details.
The copyright to this program is held by its authors.
Modifier and Type | Field and Description |
---|---|
private BookDriver |
driver |
private IndexStatus |
indexStatus |
private Language |
language |
private URI |
library |
private URI |
location |
KEY_BOOK, KEY_BOOKLIST, KEY_CATEGORY, KEY_DRIVER, KEY_FONT, KEY_LANG, KEY_LANGUAGE, KEY_NAME, KEY_SCOPE, KEY_VERSIFICATION
Constructor and Description |
---|
AbstractBookMetaData() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BookMetaData obj) |
boolean |
equals(Object obj) |
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?
|
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 |
getOsisID()
Calculated field: Get an OSIS identifier for the OsisText.setOsisIDWork()
and the Work.setOsisWork() methods.
|
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 |
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 |
reload()
If this BookMetaData is partially loaded, reload it fully.
|
void |
setDriver(BookDriver driver) |
void |
setIndexStatus(IndexStatus newValue)
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 location)
Set the base URI for relative URIs in the document.
|
org.jdom2.Document |
toOSIS()
Get an OSIS representation of information concerning this Book.
|
String |
toString() |
boolean |
unlock(String unlockKey)
Unlocks a book with the given key.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAbbreviation, getBookCategory, getBookCharset, getInitials, getName, getProperty, getPropertyKeys, isLeftToRight, putProperty, setProperty
private BookDriver driver
private IndexStatus indexStatus
private Language language
private URI library
private URI location
public KeyType getKeyType()
BookMetaData
getKeyType
in interface BookMetaData
public BookDriver getDriver()
BookMetaData
getDriver
in interface BookMetaData
public String getDriverName()
BookMetaData
getDriverName
in interface BookMetaData
public boolean hasFeature(FeatureType feature)
BookMetaData
hasFeature
in interface BookMetaData
feature
- the feature in questionpublic String getOsisID()
BookMetaData
getOsisID
in interface BookMetaData
public boolean isSupported()
BookMetaData
isSupported
in interface BookMetaData
public boolean isEnciphered()
BookMetaData
isEnciphered
in interface BookMetaData
public boolean isLocked()
BookMetaData
isLocked
in interface BookMetaData
public boolean unlock(String unlockKey)
BookMetaData
unlock
in interface BookMetaData
unlockKey
- the key to trypublic String getUnlockKey()
BookMetaData
getUnlockKey
in interface BookMetaData
public boolean isQuestionable()
BookMetaData
isQuestionable
in interface BookMetaData
public Language getLanguage()
BookMetaData
getLanguage
in interface BookMetaData
public void setLanguage(Language language)
BookMetaData
setLanguage
in interface BookMetaData
language
- the book's languagepublic URI getLibrary()
BookMetaData
getLibrary
in interface BookMetaData
public void setLibrary(URI library) throws BookException
BookMetaData
setLibrary
in interface BookMetaData
library
- the base URI or null if there is noneBookException
- indicates missing data filespublic void setLocation(URI location)
BookMetaData
setLocation
in interface BookMetaData
location
- the base URI or null if there is nonepublic URI getLocation()
BookMetaData
getLocation
in interface BookMetaData
public IndexStatus getIndexStatus()
BookMetaData
getIndexStatus
in interface BookMetaData
IndexManager
public void setIndexStatus(IndexStatus newValue)
BookMetaData
setIndexStatus
in interface BookMetaData
newValue
- the status for the index of this bookIndexManager
public void reload() throws BookException
BookMetaData
reload
in interface BookMetaData
BookException
- when a problem is encountered loading the filepublic void putProperty(String key, String value)
BookMetaData
putProperty
in interface BookMetaData
key
- the key of the property to setvalue
- the value of the propertypublic org.jdom2.Document toOSIS()
BookMetaData
toOSIS
in interface BookMetaData
public void setDriver(BookDriver driver)
driver
- The driver to set.public int compareTo(BookMetaData obj)
compareTo
in interface Comparable<BookMetaData>