org.crosswire.jsword.book
Interface BookDriver

All Known Implementing Classes:
AbstractBookDriver, ReadingsBookDriver, SwordBookDriver

public interface BookDriver

The BibleDriver class allows creation of new Books.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Method Summary
 Book create(Book source)
          Create a new Book based on a source.
 void delete(Book dead)
          Delete this Book from the system.
 Book[] getBooks()
          This method should only be used by Bibles at startup to register the Bibles known at start time.
 String getDriverName()
          A short name for this BookDriver
 boolean isDeletable(Book dead)
          Is this book able to be deleted.
 boolean isWritable()
          Is this name capable of creating writing data in the correct format as well as reading it?
 

Method Detail

getBooks

Book[] getBooks()
This method should only be used by Bibles at startup to register the Bibles known at start time. Generally there will be a better way of doing whatever you want to do if you use this method.

Returns:
A list of the known Bibles

isWritable

boolean isWritable()
Is this name capable of creating writing data in the correct format as well as reading it?

Returns:
true/false to indicate ability to write data

create

Book create(Book source)
            throws BookException
Create a new Book based on a source.

Parameters:
source - The Book from which to copy data
Returns:
The new WritableBible
Throws:
BookException - If the name is not valid

isDeletable

boolean isDeletable(Book dead)
Is this book able to be deleted.

Parameters:
dead - the book to be deleted
Returns:
whether the book can be deleted.

delete

void delete(Book dead)
            throws BookException
Delete this Book from the system. Take care with this method for obvious reasons. For most implemenations of Book etc, this method will throw up because most will be read-only.

Throws:
BookException - If the Book can't be deleted.

getDriverName

String getDriverName()
A short name for this BookDriver


Copyright ? 2003-2006