org.crosswire.jsword.book.basic
Class AbstractBookDriver

java.lang.Object
  extended by org.crosswire.jsword.book.basic.AbstractBookDriver
All Implemented Interfaces:
BookDriver
Direct Known Subclasses:
ReadingsBookDriver, SwordBookDriver

public abstract class AbstractBookDriver
extends Object
implements BookDriver

The AbstractBookDriver class implements some BibleDriver methods, making a simple read-only BibleDriver.

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

Constructor Summary
AbstractBookDriver()
           
 
Method Summary
 Book create(Book source)
          Create a new Book based on a source.
 void delete(Book dead)
          Delete this Book from the system.
 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?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.crosswire.jsword.book.BookDriver
getBooks, getDriverName
 

Constructor Detail

AbstractBookDriver

public AbstractBookDriver()
Method Detail

isWritable

public boolean isWritable()
Description copied from interface: BookDriver
Is this name capable of creating writing data in the correct format as well as reading it?

Specified by:
isWritable in interface BookDriver
Returns:
true/false to indicate ability to write data

create

public Book create(Book source)
            throws BookException
Description copied from interface: BookDriver
Create a new Book based on a source.

Specified by:
create in interface BookDriver
Parameters:
source - The Book from which to copy data
Returns:
The new WritableBible
Throws:
BookException - If the name is not valid

isDeletable

public boolean isDeletable(Book dead)
Description copied from interface: BookDriver
Is this book able to be deleted.

Specified by:
isDeletable in interface BookDriver
Parameters:
dead - the book to be deleted
Returns:
whether the book can be deleted.

delete

public void delete(Book dead)
            throws BookException
Description copied from interface: BookDriver
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.

Specified by:
delete in interface BookDriver
Throws:
BookException - If the Book can't be deleted.

Copyright ยจ 2003-2006