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

Quick Search    Search Deep

com.eireneh.bible.book
Class AbstractBible  view AbstractBible download AbstractBible.java

java.lang.Object
  extended bycom.eireneh.bible.book.AbstractBible
All Implemented Interfaces:
Bible, Book
Direct Known Subclasses:
VersewiseBible

public abstract class AbstractBible
extends java.lang.Object
implements Bible

An AbstractBible implements a few of the more generic methods of Bible, and takes care of a BookConfig object.
Distribution Licence:
Project B 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, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below.
The copyright to this program is held by it's authors.

Version:
T2.I7.D8

Field Summary
protected  com.eireneh.util.EventListenerList listeners
          The list of listeners
protected  int percent
          The current progress
 
Constructor Summary
AbstractBible()
           
 
Method Summary
 void addProgressListener(ProgressListener li)
          Add a progress listener to the list of things wanting to know whenever we make some progress
protected  void fireProgressMade(java.lang.String name, int percent)
          Called to fire a ProgressEvent to all the Listeners, but only if there is actual progress since last time.
 void generate(Bible version)
          Read from the given source version to generate ourselves.
 org.jdom.Element getElement(com.eireneh.bible.passage.Passage ref)
          Retrieval: Use JDOM to retrieve some Bible data
 com.eireneh.config.Config getProperties()
          What configuration options are available? A null return from this IS valid, and means, there is nothing to configure.
 java.net.URL getPropertiesURL()
          If there is something to configure, and the config options are worth saving to disk (this may not be the case for read-only options) then this is where to save the stuff to.
 java.lang.String getText(com.eireneh.bible.passage.VerseRange range)
          Retrieval: Create an String for the specified Verses.
 void removeProgressListener(ProgressListener li)
          Remove a progress listener from the list of things wanting to know whenever we make some progress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eireneh.bible.book.Bible
findPassage, getDocument, getDriver, getName, getStartsWith, getVersion, listWords
 

Field Detail

listeners

protected com.eireneh.util.EventListenerList listeners
The list of listeners


percent

protected int percent
The current progress

Constructor Detail

AbstractBible

public AbstractBible()
Method Detail

getText

public java.lang.String getText(com.eireneh.bible.passage.VerseRange range)
                         throws BookException
Retrieval: Create an String for the specified Verses.

Specified by:
getText in interface Bible

getElement

public org.jdom.Element getElement(com.eireneh.bible.passage.Passage ref)
                            throws BookException
Retrieval: Use JDOM to retrieve some Bible data

Specified by:
getElement in interface Bible

getProperties

public com.eireneh.config.Config getProperties()
                                        throws BookException
What configuration options are available? A null return from this IS valid, and means, there is nothing to configure.

Specified by:
getProperties in interface Bible

getPropertiesURL

public java.net.URL getPropertiesURL()
If there is something to configure, and the config options are worth saving to disk (this may not be the case for read-only options) then this is where to save the stuff to.

Specified by:
getPropertiesURL in interface Bible

generate

public void generate(Bible version)
              throws BookException
Read from the given source version to generate ourselves. This method is called in place of init(). It should periodically call Thread.currentThread().isInterrupted() to check that it is safe to continue, and clear up if not.

Specified by:
generate in interface Bible

addProgressListener

public void addProgressListener(ProgressListener li)
Add a progress listener to the list of things wanting to know whenever we make some progress

Specified by:
addProgressListener in interface Bible

removeProgressListener

public void removeProgressListener(ProgressListener li)
Remove a progress listener from the list of things wanting to know whenever we make some progress

Specified by:
removeProgressListener in interface Bible

fireProgressMade

protected void fireProgressMade(java.lang.String name,
                                int percent)
Called to fire a ProgressEvent to all the Listeners, but only if there is actual progress since last time.