|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.Books
public final class Books
The Bibles class (along with Bible) is the central point of contact between the rest of the world and this set of packages.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private BookSet |
books
The list of Books |
private Set |
drivers
An array of BookDrivers |
private static Books |
instance
The singleton instance. |
private EventListenerList |
listeners
The list of listeners |
private static Logger |
log
The log stream |
private boolean |
threaded
Do we try to get clever in registering books?. |
Constructor Summary | |
---|---|
private |
Books()
Create a singleton instance of the class. |
Method Summary | |
---|---|
void |
addBook(Book book)
Add a Bible to the current list of Books. |
void |
addBooksListener(BooksListener li)
Remove a BibleListener from our list of listeners |
protected void |
autoRegister()
Registers all the drivers known to the program. |
protected void |
fireBooksChanged(Object source,
Book book,
boolean added)
Kick of an event sequence |
Book |
getBook(String name)
|
List |
getBooks()
Get a list of all the Books of all types. |
List |
getBooks(BookFilter filter)
Get a filtered list of all the Books. |
BookDriver[] |
getDrivers()
Get an array of all the known drivers |
BookDriver[] |
getDriversByClass(Class type)
Since Books keeps a track of drivers itself, including creating them when registered it can be hard to get ahold of the current book driver. |
BookDriver[] |
getWritableDrivers()
Get an array of all the known drivers |
private void |
initialize(boolean doThreading)
Registers all the drivers known to the program. |
static Books |
installed()
Accessor for the singleton instance |
void |
registerDriver(BookDriver driver)
Register the driver, adding its books to the list. |
void |
removeBook(Book book)
Remove a Bible from the current list of Books. |
void |
removeBooksListener(BooksListener li)
Add a BibleListener to our list of listeners |
void |
unregisterDriver(BookDriver driver)
Remove from the list of drivers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private BookSet books
private Set drivers
private EventListenerList listeners
private boolean threaded
private static final Logger log
private static final Books instance
Constructor Detail |
---|
private Books()
Method Detail |
---|
public static Books installed()
public List getBooks()
BookList
getBooks
in interface BookList
public Book getBook(String name)
public List getBooks(BookFilter filter)
BookList
getBooks
in interface BookList
BookFilters
public void addBooksListener(BooksListener li)
BookList
addBooksListener
in interface BookList
li
- The old listenerpublic void removeBooksListener(BooksListener li)
BookList
removeBooksListener
in interface BookList
li
- The new listenerprotected void fireBooksChanged(Object source, Book book, boolean added)
source
- The event sourcebook
- The changed Bookadded
- Is it added?public void addBook(Book book)
public void removeBook(Book book) throws BookException
BookException
public void registerDriver(BookDriver driver) throws BookException
driver
- The BookDriver to add
BookException
public void unregisterDriver(BookDriver driver) throws BookException
driver
- The BookDriver to remove
BookException
public BookDriver[] getDriversByClass(Class type)
public BookDriver[] getDrivers()
public BookDriver[] getWritableDrivers()
private void initialize(boolean doThreading)
protected void autoRegister()
|
Copyright ยจ 2003-2006 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |