Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/eireneh/bible/book/AbstractBibleDriver.java


1   
2   package com.eireneh.bible.book;
3   
4   /**
5   * The AbstractBibleDriver class implements some of the BibleDriver
6   * methods, that various BibleDrivers may do in the same way. 
7   * 
8   * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
9   * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
10  * Distribution Licence:<br />
11  * Project B is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General Public License,
13  * version 2 as published by the Free Software Foundation.<br />
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * General Public License for more details.<br />
18  * The License is available on the internet
19  * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
20  * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21  * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
22  * The copyright to this program is held by it's authors.
23  * </font></td></tr></table>
24  * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
25  * @see docs.Licence
26  * @author Joe Walker
27  * @version D2.I6.T6
28  */
29  public abstract class AbstractBibleDriver implements BibleDriver
30  {
31      /**
32      * How many Bibles does this driver control?
33      * @return A count of the Bibles
34      */
35      public int countBibles()
36      {
37          try
38          {
39              return getBibleNames().length;
40          }
41          catch (BookException ex)
42          {
43              return 0;
44          }
45      }
46  
47      /**
48      * Directory renaming is not implemented yet because it is very easy
49      * to do manually, and because I am not 100% sure that we should not
50      * have the dirver do it for us.
51      * @param old_name The current name for the version
52      * @param new_name The name we would like the driver to have
53      */
54      public void renameBible(String old_name, String new_name) throws BookException
55      {
56          throw new BookException("book_noren", new Object[] { old_name });
57      }
58  
59      /**
60      * Directory deletion is not implemented yet because it is very easy
61      * to do manually, and because I am not 100% sure that we should not
62      * have the dirver do it for us.
63      * @param name The name of the version to delete
64      */
65      public void deleteBible(String name) throws BookException
66      {
67          throw new BookException("book_nodel", new Object[] { name });
68      }
69  }