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, unlock
private 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()
BookMetaData
public Set<String> getPropertyKeys()
BookMetaData
public String getProperty(String key)
BookMetaData
key
- the key of the property.public void setProperty(String key, String value)
BookMetaData
key
- the key of the property to setvalue
- the value of the propertypublic void putProperty(String key, String value)
BookMetaData
putProperty
in interface BookMetaData
putProperty
in class AbstractBookMetaData
key
- the key of the property to setvalue
- the value of the propertypublic void putProperty(String key, String value, boolean forFrontend)
BookMetaData
key
- the entry that we are savingvalue
- the value of the entryforFrontend
- when true
save to front end storage, else in shared storagepublic BookCategory getBookCategory()
BookMetaData
public String getName()
BookMetaData
public String getAbbreviation()
BookMetaData
public String getInitials()
BookMetaData
public boolean isLeftToRight()
BookMetaData
public 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()
BookMetaData
toOSIS
in interface BookMetaData
toOSIS
in class AbstractBookMetaData
public VerseKey getScope()
private void addRow(OSISUtil.OSISFactory factory, org.jdom2.Element table, String key, String value)