|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.basic.AbstractBookMetaData
public abstract class AbstractBookMetaData
An implementaion of the Propery Change methods from BookMetaData.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
static String |
DEFAULT_LANG_CODE
|
private String |
displayName
|
private BookDriver |
driver
|
private String |
fullName
|
private IndexStatus |
indexStatus
|
private static ResourceBundle |
languages
|
private EventListenerList |
listeners
The list of property change listeners |
private static Logger |
log
The log stream |
private Map |
prop
The single key version of the properties |
private static String |
UNKNOWN_LANG_CODE
|
Fields inherited from interface org.crosswire.jsword.book.BookMetaData |
---|
KEY_BOOK, KEY_CATEGORY, KEY_DRIVER, KEY_INDEXSTATUS, KEY_INITIALS, KEY_LANGUAGE, KEY_NAME |
Constructor Summary | |
---|---|
AbstractBookMetaData()
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
int |
compareTo(Object obj)
|
private String |
computeFullName()
|
boolean |
equals(Object obj)
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Reports bound property changes. |
BookDriver |
getDriver()
Accessor for the driver that runs this Book. |
String |
getDriverName()
Calculated field: The name of the name, which could be helpful to distinguish similar Books available through 2 BookDrivers. |
String |
getFullName()
Calculated field: The full name of the book, for example The format is "name, (Driver)" |
IndexStatus |
getIndexStatus()
Has anyone generated a search index for this Book? |
String |
getLanguage()
The language of the book is the common name for the iso639 code. |
static String |
getLanguage(String ident,
String iso639Code)
Get the language name from the language code. |
String |
getOsisID()
Calculated field: Get an OSIS identifier for the OsisText.setOsisIDWork() and the Work.setOsisWork() methods. |
Map |
getProperties()
Get a list of all the properties available to do with this Book. |
protected Object |
getProperty(String key)
|
boolean |
hasFeature(FeatureType feature)
Return whether the feature is supported by the book. |
int |
hashCode()
|
boolean |
isEnciphered()
Indicate whether this book is enciphered and without a key. |
boolean |
isQuestionable()
Indicate whether this book is questionable. |
boolean |
isSupported()
Indicate whether this book is supported by JSword. |
protected void |
putProperty(String key,
Object value)
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setDriver(BookDriver driver)
|
void |
setIndexStatus(IndexStatus newValue)
This method does not alter the index status, however it is for Indexers that are responsible for indexing and have changed the status themselves. |
void |
setProperties(Map newProperties)
|
org.jdom.Document |
toOSIS()
Get an OSIS representation of information concerning this Book. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.crosswire.jsword.book.BookMetaData |
---|
getBookCategory, getInitials, getName, isLeftToRight |
Field Detail |
---|
private static final Logger log
public static final String DEFAULT_LANG_CODE
private static final String UNKNOWN_LANG_CODE
private transient EventListenerList listeners
private static ResourceBundle languages
private Map prop
private BookDriver driver
private String fullName
private String displayName
private IndexStatus indexStatus
Constructor Detail |
---|
public AbstractBookMetaData()
Method Detail |
---|
public BookDriver getDriver()
BookMetaData
getDriver
in interface BookMetaData
public String getDriverName()
BookMetaData
getDriverName
in interface BookMetaData
public boolean hasFeature(FeatureType feature)
BookMetaData
hasFeature
in interface BookMetaData
public String getOsisID()
BookMetaData
getOsisID
in interface BookMetaData
public String getFullName()
BookMetaData
getFullName
in interface BookMetaData
private String computeFullName()
public boolean isSupported()
BookMetaData
isSupported
in interface BookMetaData
public boolean isEnciphered()
BookMetaData
isEnciphered
in interface BookMetaData
public boolean isQuestionable()
BookMetaData
isQuestionable
in interface BookMetaData
public String getLanguage()
BookMetaData
getLanguage
in interface BookMetaData
public Map getProperties()
BookMetaData
getProperties
in interface BookMetaData
public void setProperties(Map newProperties)
newProperties
- protected Object getProperty(String key)
key
-
protected void putProperty(String key, Object value)
key
- value
- public IndexStatus getIndexStatus()
BookMetaData
getIndexStatus
in interface BookMetaData
IndexManager
public void setIndexStatus(IndexStatus newValue)
BookMetaData
setIndexStatus
in interface BookMetaData
IndexManager
public org.jdom.Document toOSIS()
BookMetaData
toOSIS
in interface BookMetaData
public void setDriver(BookDriver driver)
driver
- The driver to set.public static String getLanguage(String ident, String iso639Code)
iso639Code
-
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object obj)
compareTo
in interface Comparable
public String toString()
toString
in class Object
public void addPropertyChangeListener(PropertyChangeListener listener)
BookMetaData
PropertyChangeListener
to the listener list.
The listener is registered for all properties. However the only one likely
to change at the time of writing is the Index Status.
A PropertyChangeEvent
will get fired in response
to setting a bound property, such as setIndexStatus
.
addPropertyChangeListener
in interface BookMetaData
listener
- the PropertyChangeListener
to be addedpublic void removePropertyChangeListener(PropertyChangeListener listener)
BookMetaData
PropertyChangeListener
from the listener list.
removePropertyChangeListener
in interface BookMetaData
listener
- the PropertyChangeListener
to be removedprotected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
oldValue
and newValue
are not equal and the
PropertyChangeEvent
listener list isn't empty,
then fire a PropertyChange
event to each listener.
propertyName
- the programmatic name of the property that was changedoldValue
- the old value of the property (as an Object)newValue
- the new value of the property (as an Object)PropertyChangeSupport
|
Copyright ยจ 2003-2005 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |