T
- The type of the OpenFileState that this class extends.public interface Backend<T extends OpenFileState>
The GNU Lesser General Public License for details.
Modifier and Type | Method and Description |
---|---|
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.
|
BookMetaData |
getBookMetaData() |
Key |
getGlobalKeyList()
Gets the fast global key list, and if this operation is not supported, throws a
UnsupportedOperationException |
String |
getRawText(Key key)
Get the text as it is found in the Book for the given key
|
int |
getRawTextLength(Key key)
Determine the size of the raw data for the key in question.
|
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()
Deprecated.
no replacement
|
List<org.jdom2.Content> |
readToOsis(Key key,
RawTextToXmlProcessor processor)
Get the text allotted for the given entry
|
void |
setAliasKey(Key alias,
Key source) |
BookMetaData getBookMetaData()
void decipher(byte[] data)
data
- the data to unlockvoid encipher(byte[] data)
data
- @Deprecated Key readIndex()
boolean contains(Key key)
key
- The key whose presence is desired.String getRawText(Key key) throws BookException
key
- the key for which the raw text is desired.BookException
void setAliasKey(Key alias, Key source) throws BookException
BookException
int getRawTextLength(Key key)
key
- The key whose raw data length is desired.Key getGlobalKeyList() throws BookException
UnsupportedOperationException
BookException
- the book exception if for some reason the book failed to be read properly.List<org.jdom2.Content> readToOsis(Key key, RawTextToXmlProcessor processor) throws BookException
key
- The key to fetchprocessor
- processor that executes before/after the content is read from
disk or another kind of backendBookException
- If the data can not be read.void create() throws IOException, BookException
IOException
BookException
boolean isSupported()
boolean isWritable()