public class DefaultBookMetaData extends AbstractBookMetaData
The GNU Lesser General Public License for details.| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFAULT_CHARSET |
private String |
initials |
private String |
name |
private Map<String,String> |
props |
private BookCategory |
type |
KEY_BOOK, KEY_BOOKLIST, KEY_CATEGORY, KEY_DRIVER, KEY_FONT, KEY_LANG, KEY_LANGUAGE, KEY_NAME, KEY_SCOPE, KEY_VERSIFICATION| Constructor and Description |
|---|
DefaultBookMetaData(BookDriver driver,
String name,
BookCategory type)
Ctor with some default values.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addRow(OSISUtil.OSISFactory factory,
org.jdom2.Element table,
String key,
String value) |
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?
|
String |
getInitials()
The internal name of this book.
|
String |
getName()
The name of the book, for example "King James Version" or
"Bible in Basic English" or "Greek".
|
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.
|
VerseKey |
getScope() |
boolean |
isLeftToRight()
Return the orientation of the script of the Book.
|
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 |
setBookCategory(BookCategory aType) |
void |
setInitials(String initials)
See note on setName() for side effect on setInitials().
|
void |
setName(String name)
Setting the name also sets some default initials, so if you wish to set
some specific initials then it should be done after setting the name.
|
void |
setProperty(String key,
String value)
Store a transient property.
|
void |
setType(String typestr) |
org.jdom2.Document |
toOSIS()
Get an OSIS representation of information concerning this Book.
|
compareTo, equals, getDriver, getDriverName, getIndexStatus, getKeyType, getLanguage, getLibrary, getLocation, getOsisID, getUnlockKey, hasFeature, hashCode, isEnciphered, isLocked, isQuestionable, isSupported, reload, setDriver, setIndexStatus, setLanguage, setLibrary, setLocation, toString, unlockprivate BookCategory type
private String name
private String initials
private static final String DEFAULT_CHARSET
public DefaultBookMetaData(BookDriver driver, String name, BookCategory type)
driver - the driver for this bookname - the name of this booktype - the type of this bookpublic String getBookCharset()
BookMetaDatapublic Set<String> getPropertyKeys()
BookMetaDatapublic String getProperty(String key)
BookMetaDatakey - the key of the property.public void setProperty(String key, String value)
BookMetaDatakey - the key of the property to setvalue - the value of the propertypublic void putProperty(String key, String value)
BookMetaDataputProperty in interface BookMetaDataputProperty in class AbstractBookMetaDatakey - the key of the property to setvalue - the value of the propertypublic void putProperty(String key, String value, boolean forFrontend)
BookMetaDatakey - the entry that we are savingvalue - the value of the entryforFrontend - when true save to front end storage, else in shared storagepublic BookCategory getBookCategory()
BookMetaDatapublic String getName()
BookMetaDatapublic String getAbbreviation()
BookMetaDatapublic String getInitials()
BookMetaDatapublic boolean isLeftToRight()
BookMetaDatapublic void setInitials(String initials)
initials - The initials to set.setName(String)public void setName(String name)
name - The name to set.setInitials(String)public void setBookCategory(BookCategory aType)
aType - The type to set.public void setType(String typestr)
typestr - The string version of the type to set.public org.jdom2.Document toOSIS()
BookMetaDatatoOSIS in interface BookMetaDatatoOSIS in class AbstractBookMetaDatapublic VerseKey getScope()
private void addRow(OSISUtil.OSISFactory factory, org.jdom2.Element table, String key, String value)