public enum BookType extends Enum<BookType>
The GNU Lesser General Public License for details.
Enum Constant and Description |
---|
HREF_COM
Uncompresses HREF Commentaries
|
RAW_COM
Uncompressed Commentaries
|
RAW_COM4 |
RAW_FILES
Uncompressed Commentaries
|
RAW_GEN_BOOK
Generic Books
|
RAW_LD
2-Byte Index Uncompressed Dictionaries
|
RAW_LD4
4-Byte Index Uncompressed Dictionaries
|
RAW_TEXT
Uncompressed Bibles
|
Z_COM
Compressed Commentaries
|
Z_LD
Compressed Dictionaries
|
Z_TEXT
Compressed Bibles
|
Modifier and Type | Field and Description |
---|---|
private BookCategory |
category
What category is this book
|
private KeyType |
keyType
What category is this book
|
private String |
name
The name of the BookType
|
Modifier and Type | Method and Description |
---|---|
Book |
createBook(SwordBookMetaData sbmd)
Create a Book appropriate for the BookMetaData
|
static BookType |
fromString(String name)
Lookup method to convert from a String
|
protected abstract Backend |
getBackend(SwordBookMetaData sbmd)
Create a the appropriate backend for this type of book
|
protected abstract Book |
getBook(SwordBookMetaData sbmd,
Backend backend)
Create a Book with the given backend
|
BookCategory |
getBookCategory()
The category of this book
|
static BookType |
getBookType(String name)
Find a BookType from a name.
|
KeyType |
getKeyType()
Get the way this type of Book organizes it's keys.
|
boolean |
isSupported(SwordBookMetaData sbmd)
Given a SwordBookMetaData determine whether this BookType will work for
it.
|
String |
toString() |
static BookType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BookType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BookType RAW_TEXT
public static final BookType Z_TEXT
public static final BookType RAW_COM
public static final BookType RAW_COM4
public static final BookType Z_COM
public static final BookType HREF_COM
public static final BookType RAW_FILES
public static final BookType RAW_LD
public static final BookType RAW_LD4
public static final BookType Z_LD
public static final BookType RAW_GEN_BOOK
private String name
private BookCategory category
private KeyType keyType
public static BookType[] values()
for (BookType c : BookType.values()) System.out.println(c);
public static BookType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static BookType getBookType(String name)
name
- The name of the BookType to look uppublic BookCategory getBookCategory()
public KeyType getKeyType()
public boolean isSupported(SwordBookMetaData sbmd)
sbmd
- the BookMetaData that this BookType works uponpublic Book createBook(SwordBookMetaData sbmd) throws BookException
sbmd
- the book metadataBookException
protected abstract Book getBook(SwordBookMetaData sbmd, Backend backend)
protected abstract Backend getBackend(SwordBookMetaData sbmd) throws BookException
BookException
public static BookType fromString(String name)
name
- the string representation of a book type