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.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: AbstractBookDriver.java,v 1.8 2005/03/19 01:56:47 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

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-2004