|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.jsword.book.sword.AbstractBackend
public abstract class AbstractBackend
A generic way to read data from disk for later formatting.
for license details.
The copyright to this program is held by it's authors.| Field Summary | |
|---|---|
private SwordBookMetaData |
bmd
|
| Constructor Summary | |
|---|---|
AbstractBackend()
Default constructor for the sake of serialization. |
|
AbstractBackend(SwordBookMetaData sbmd)
Construct a minimal backend |
|
| Method Summary | |
|---|---|
abstract boolean |
contains(Key key)
Determine whether this Book contains the key in question |
void |
create()
Create the directory to hold the Book if it does not exist. |
void |
decipher(byte[] data)
Decipher the data in place, if it is enciphered and there is a key to unlock it. |
void |
encipher(byte[] data)
Encipher the data in place, if there is a key to unlock it. |
SwordBookMetaData |
getBookMetaData()
|
URI |
getExpandedDataPath()
|
abstract String |
getRawText(Key key)
Get the text allotted for the given entry |
boolean |
isSupported()
Returns whether this AbstractBackend is implemented. |
boolean |
isWritable()
A Backend is writable if the file system allows the underlying files to be opened for writing and if the backend has implemented writing. |
Key |
readIndex()
Initialize a AbstractBackend before use. |
abstract void |
setAliasKey(Key alias,
Key source)
Sets alias for a comment on a verse range I.e. |
abstract void |
setRawText(Key key,
String text)
Set the text allotted for the given verse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.crosswire.common.activate.Activatable |
|---|
activate, deactivate |
| Field Detail |
|---|
private SwordBookMetaData bmd
| Constructor Detail |
|---|
public AbstractBackend()
public AbstractBackend(SwordBookMetaData sbmd)
sbmd - | Method Detail |
|---|
public SwordBookMetaData getBookMetaData()
public void decipher(byte[] data)
data - the data to unlockpublic void encipher(byte[] data)
data -
public URI getExpandedDataPath()
throws BookException
BookExceptionpublic Key readIndex()
public abstract boolean contains(Key key)
key - The key whose presence is desired.
public abstract String getRawText(Key key)
throws BookException
key - The key to fetch
BookException - If the data can not be read.
public abstract void setRawText(Key key,
String text)
throws BookException,
IOException
key - The key to set text totext - The text to be set for key
BookException - If the data can not be set.
IOException - If the module data path could not be created.
public abstract void setAliasKey(Key alias,
Key source)
throws IOException
alias - Alias Keysource - Source Key
IOException - Exception when anything goes wrong on writing the alias
public void create()
throws IOException,
BookException
IOException
BookExceptionpublic boolean isSupported()
public boolean isWritable()
|
Copyright ? 2003-2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||