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

Quick Search    Search Deep

Source code: com/eireneh/bible/book/tasks/BibleListTask.java


1   
2   package com.eireneh.bible.book.tasks;
3   
4   import com.eireneh.util.*;
5   import com.eireneh.bible.book.*;
6   import com.eireneh.bible.control.*;
7   
8   /**
9    * BibleListTask lists the available Bibles.
10   *
11   * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
12   * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
13   * Distribution Licence:<br />
14   * Project B is free software; you can redistribute it
15   * and/or modify it under the terms of the GNU General Public License,
16   * version 2 as published by the Free Software Foundation.<br />
17   * This program is distributed in the hope that it will be useful,
18   * but WITHOUT ANY WARRANTY; without even the implied warranty of
19   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20   * General Public License for more details.<br />
21   * The License is available on the internet
22   * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
23   * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24   * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
25   * The copyright to this program is held by it's authors.
26   * </font></td></tr></table>
27   * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
28   * @see docs.Licence
29   * @author Joe Walker
30   * @version D0.I0.T0
31   */
32  public class BibleListTask extends AbstractTask
33  {
34      /**
35       * Actually work out the answer
36       */
37      public void calculate() throws TaskException
38      {
39      }
40  
41      /**
42       * Perform the action, and return the results in a String.
43       * @return The result of the action
44       */
45      public String getResults()
46      {
47          StringBuffer buffer = new StringBuffer();
48  
49          try
50          {
51              String[] bibles = Bibles.getBibleNames();
52              for (int j=0; j<bibles.length; j++)
53              {
54                  buffer.append(bibles[j]);
55                  buffer.append("\n");
56              }
57          }
58          catch(BookException ex)
59          {
60              Reporter.informUser(this, ex);
61          }
62  
63          return buffer.toString();
64      }
65  
66      /**
67       * How many parameters does this Action expect?
68       * @return The expected number of parameters
69       */
70      public int countParameters()
71      {
72          return 0;
73      }
74  }