|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.basic.AbstractBookMetaData
org.crosswire.jsword.book.sword.SwordBookMetaData
public final class SwordBookMetaData
A utility class for loading and representing Sword book configs.
Config file format. See also: http://sword.sourceforge.net/cgi-bin/twiki/view/Swordapi/ConfFileLayout
The contents of the About field are in rtf.
\ is used as a continuation line.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private ConfigEntryTable |
cet
|
private static Map |
ENCODING_JAVA
Sword only recognizes two encodings for its modules: UTF-8 and LATIN1 Sword uses MS Windows cp1252 for Latin 1 not the standard. |
private BookCategory |
type
|
Fields inherited from interface org.crosswire.jsword.book.BookMetaData |
---|
KEY_BOOK, KEY_CATEGORY, KEY_DRIVER, KEY_FONT, KEY_INDEXSTATUS, KEY_INITIALS, KEY_LIBRARY_URI, KEY_LOCATION_URI, KEY_NAME, KEY_XML_LANG |
Constructor Summary | |
---|---|
SwordBookMetaData(byte[] buffer,
String internal)
Loads a sword config from a buffer. |
|
SwordBookMetaData(File file,
String internal,
URI bookRootPath)
Loads a sword config from a given File. |
Method Summary | |
---|---|
private void |
buildProperties()
|
BookCategory |
getBookCategory()
What category of content is this, a Bible or a reference work like a Dictionary or Commentary. |
String |
getBookCharset()
Returns the Charset of the book based on the encoding attribute |
BookType |
getBookType()
Returns the Book Type. |
String |
getConfPath()
|
Filter |
getFilter()
Returns the sourceType. |
String |
getInitials()
The initials of this book - how people familiar with this book will know it, for example "NIV", "KJV". |
String |
getName()
The name of the book, for example "King James Version" or "Bible in Basic English" or "Greek". |
Object |
getProperty(ConfigEntryType entry)
Get the string value for the property or null if it is not defined. |
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 language 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 |
setLibrary(URI library)
Set the base URI for library of this module. |
org.jdom.Document |
toOSIS()
Get an OSIS representation of information concerning this Book. |
boolean |
unlock(String unlockKey)
Unlocks a book with the given key. |
Methods inherited from class org.crosswire.jsword.book.basic.AbstractBookMetaData |
---|
compareTo, equals, getDriver, getDriverName, getIndexStatus, getLanguage, getLibrary, getLocation, getOsisID, getProperties, getProperty, hashCode, putProperty, setDriver, setIndexStatus, setLanguage, setLocation, setProperties, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final Map ENCODING_JAVA
private ConfigEntryTable cet
private BookCategory type
Constructor Detail |
---|
public SwordBookMetaData(File file, String internal, URI bookRootPath) throws IOException
file
- internal
-
IOException
public SwordBookMetaData(byte[] buffer, String internal) throws IOException
buffer
- internal
-
IOException
Method Detail |
---|
public boolean isQuestionable()
BookMetaData
isQuestionable
in interface BookMetaData
isQuestionable
in class AbstractBookMetaData
public boolean isSupported()
BookMetaData
isSupported
in interface BookMetaData
isSupported
in class AbstractBookMetaData
public boolean isEnciphered()
BookMetaData
isEnciphered
in interface BookMetaData
isEnciphered
in class AbstractBookMetaData
public boolean isLocked()
BookMetaData
isLocked
in interface BookMetaData
isLocked
in class AbstractBookMetaData
public boolean unlock(String unlockKey)
BookMetaData
unlock
in interface BookMetaData
unlock
in class AbstractBookMetaData
unlockKey
- the key to try
public String getUnlockKey()
BookMetaData
getUnlockKey
in interface BookMetaData
getUnlockKey
in class AbstractBookMetaData
public String getName()
BookMetaData
public String getBookCharset()
public BookType getBookType()
public Filter getFilter()
public String getConfPath()
public void setLibrary(URI library)
BookMetaData
setLibrary
in interface BookMetaData
setLibrary
in class AbstractBookMetaData
library
- the base URI or null if there is nonepublic BookCategory getBookCategory()
BookMetaData
public org.jdom.Document toOSIS()
BookMetaData
toOSIS
in interface BookMetaData
toOSIS
in class AbstractBookMetaData
public String getInitials()
BookMetaData
public Object getProperty(ConfigEntryType entry)
entry
- the ConfigEntryType
public boolean isLeftToRight()
BookMetaData
public boolean hasFeature(FeatureType feature)
BookMetaData
hasFeature
in interface BookMetaData
hasFeature
in class AbstractBookMetaData
private void buildProperties()
|
Copyright ยจ 2003-2007 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |