|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.jsword.book.sword.AbstractBackend<T>
org.crosswire.jsword.book.sword.AbstractKeyBackend<T>
T - The type of the OpenFileState that this class extends.public abstract class AbstractKeyBackend<T extends OpenFileState>
A Backend that can be used as a global key list.
The GNU Lesser General Public License for details.,
Serialized Form| Field Summary | |
|---|---|
private static long |
serialVersionUID
Serialization ID |
| Constructor Summary | |
|---|---|
AbstractKeyBackend(SwordBookMetaData sbmd)
Simple ctor |
|
| Method Summary | |
|---|---|
void |
addAll(Key key)
Adds the specified element to this set if it is not already present. |
void |
blur(int by,
RestrictionType restrict)
Widen the range of the verses/keys in this list. |
boolean |
canHaveChildren()
Returns false if the receiver is a leaf node and can not have children. |
void |
clear()
Removes all of the elements from this set (optional operation). |
AbstractKeyBackend<T> |
clone()
This needs to be declared here so that it is visible as a method on a derived Key. |
int |
compareTo(Key that)
|
boolean |
contains(Key key)
Determine whether this Book contains the key in question |
boolean |
equals(Object obj)
This needs to be declared here so that it is visible as a method on a derived Key. |
int |
getChildCount()
Returns the number of children that this node has. |
String |
getName()
A Human readable version of the Key. |
String |
getName(Key base)
Translate the Key into a human readable string, with the assumption that the specified Key has just been output, so if we are in the same region, we do not need to display the region name, and so on. |
String |
getOsisID()
The OSIS defined id specification for this Key. |
String |
getOsisRef()
The OSIS defined reference specification for this Key. |
Key |
getParent()
All keys have parents unless they are the root of a Key. |
String |
getRootName()
A Human readable version of the Key's top level name. |
int |
hashCode()
This needs to be declared here so that it is visible as a method on a derived Key. |
boolean |
isEmpty()
Does this Key have 0 members |
Iterator<Key> |
iterator()
|
void |
removeAll(Key key)
Removes the specified elements from this set if it is present. |
void |
retainAll(Key key)
Removes all but the specified element from this set. |
void |
setAliasKey(T state,
Key alias,
Key source)
Sets alias for a comment on a verse range I.e. |
void |
setRawText(T state,
Key key,
String text)
Set the text allotted for the given verse |
| Methods inherited from class org.crosswire.jsword.book.sword.AbstractBackend |
|---|
create, decipher, encipher, getBookMetaData, getGlobalKeyList, getRawText, getRawTextLength, isSupported, isWritable, readIndex, readToOsis, setAliasKey |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.crosswire.jsword.passage.Key |
|---|
get, getCardinality, indexOf |
| Methods inherited from interface org.crosswire.jsword.book.sword.StatefulFileBackedBackend |
|---|
initState, readRawContent |
| Field Detail |
|---|
private static final long serialVersionUID
| Constructor Detail |
|---|
public AbstractKeyBackend(SwordBookMetaData sbmd)
sbmd - the book's metadata| Method Detail |
|---|
public boolean canHaveChildren()
Key
canHaveChildren in interface Keypublic int getChildCount()
Key
getChildCount in interface Keypublic boolean isEmpty()
Key
isEmpty in interface Keypublic boolean contains(Key key)
Backend
contains in interface Backend<T extends OpenFileState>contains in interface Keycontains in class AbstractBackend<T extends OpenFileState>key - The key whose presence is desired.
public Iterator<Key> iterator()
iterator in interface Iterable<Key>public void addAll(Key key)
Key
addAll in interface Keykey - element to be added to this set.public void removeAll(Key key)
Key
removeAll in interface Keykey - object to be removed from this set, if present.public void clear()
Key
clear in interface Key
public void setAliasKey(T state,
Key alias,
Key source)
throws IOException
StatefulFileBackedBackend
setAliasKey in interface StatefulFileBackedBackend<T extends OpenFileState>state - the open file statealias - Alias Keysource - Source Key
IOException - Exception when anything goes wrong on writing the alias
public void setRawText(T state,
Key key,
String text)
throws BookException,
IOException
StatefulFileBackedBackend
setRawText in interface StatefulFileBackedBackend<T extends OpenFileState>state - TODOkey - 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 Key getParent()
Key
getParent in interface Keypublic AbstractKeyBackend<T> clone()
Key
clone in interface Keyclone in class Objectpublic String getName()
Key
getName in interface Keypublic String getName(Key base)
Key
getName in interface Keybase - The key to use to cut down unnecessary output.
public String getOsisID()
Key
getOsisID in interface Keypublic String getOsisRef()
Key
getOsisRef in interface Keypublic String getRootName()
Key
getRootName in interface Keypublic void retainAll(Key key)
Key
retainAll in interface Keykey - object to be left in this set.public boolean equals(Object obj)
Key
equals in interface Keyequals in class Objectpublic int hashCode()
Key
hashCode in interface KeyhashCode in class Objectpublic int compareTo(Key that)
compareTo in interface Comparable<Key>
public void blur(int by,
RestrictionType restrict)
Key
blur in interface Keyby - The number of verses/keys to widen byrestrict - How should we restrict the blurring?Passage
|
Copyright ยจ 2003-2015 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||