|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.sword.ModuleType
public abstract class ModuleType
Data about module types.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
,
Serialized FormField Summary | |
---|---|
static ModuleType |
HREF_COM
Uncompresses HREF Commentaries |
private String |
name
The name of the ModuleType |
private static int |
nextObj
|
private int |
obj
|
static ModuleType |
RAW_COM
Uncompressed Commentaries |
static ModuleType |
RAW_FILES
Uncompressed Commentaries |
static ModuleType |
RAW_GEN_BOOK
Generic Books |
static ModuleType |
RAW_LD
2-Byte Index Uncompressed Dictionaries |
static ModuleType |
RAW_LD4
4-Byte Index Uncompressed Dictionaries |
static ModuleType |
RAW_TEXT
Uncompressed Bibles |
private BookType |
type
What booktype is this module |
private static ModuleType[] |
VALUES
|
static ModuleType |
Z_COM
Compressed Commentaries |
static ModuleType |
Z_LD
Compressed Dictionaries |
static ModuleType |
Z_TEXT
Compressed Bibles |
Constructor Summary | |
---|---|
ModuleType(String name,
BookType type)
Simple ctor |
Method Summary | |
---|---|
Book |
createBook(SwordBookMetaData sbmd,
File progdir)
Create a Book appropriate for the BookMetaData |
boolean |
equals(Object o)
Prevent subclasses from overriding canonical identity based Object methods |
static ModuleType |
fromString(String name)
Lookup method to convert from a String |
protected abstract Backend |
getBackend(SwordBookMetaData sbmd,
File rootPath)
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 |
BookType |
getBookType()
The book type of this module |
protected static Backend |
getCompressedBackend(SwordBookMetaData sbmd,
File rootPath)
|
static ModuleType |
getModuleType(String name)
Find a ModuleType from a name. |
int |
hashCode()
Prevent subclasses from overriding canonical identity based Object methods |
protected boolean |
isBackendSupported(SwordBookMetaData sbmd)
By default the backend is supported if the BookMetaData is not null. |
protected static boolean |
isCompressedBackendSupported(SwordBookMetaData sbmd)
|
boolean |
isSupported(SwordBookMetaData sbmd)
Given a SwordBookMetaData determine whether this ModuleType will work for it. |
(package private) Object |
readResolve()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ModuleType RAW_TEXT
public static final ModuleType Z_TEXT
public static final ModuleType RAW_COM
public static final ModuleType Z_COM
public static final ModuleType HREF_COM
public static final ModuleType RAW_FILES
public static final ModuleType RAW_LD
public static final ModuleType RAW_LD4
public static final ModuleType Z_LD
public static final ModuleType RAW_GEN_BOOK
private String name
private BookType type
private static int nextObj
private final int obj
private static final ModuleType[] VALUES
Constructor Detail |
---|
public ModuleType(String name, BookType type)
Method Detail |
---|
public static ModuleType getModuleType(String name)
name
- The name of the ModuleType to look up
public BookType getBookType()
public boolean isSupported(SwordBookMetaData sbmd)
sbmd
- the BookMetaData that this ModuleType works upon
protected boolean isBackendSupported(SwordBookMetaData sbmd)
public Book createBook(SwordBookMetaData sbmd, File progdir) throws BookException
BookException
protected abstract Book getBook(SwordBookMetaData sbmd, Backend backend)
protected abstract Backend getBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
BookException
protected static Backend getCompressedBackend(SwordBookMetaData sbmd, File rootPath) throws BookException
BookException
protected static boolean isCompressedBackendSupported(SwordBookMetaData sbmd)
public static ModuleType fromString(String name)
public final boolean equals(Object o)
equals
in class Object
Object.equals(java.lang.Object)
public final int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object readResolve()
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |