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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.eireneh.bible.book.Verifier

public class Verifier
extends java.lang.Object

The Verifier check 2 versions for identical text.
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:
D0.I0.T0

Field Summary
private  boolean alive
          Is it OK to carry on
private  Bible bible1
          The first Bible that we are checking
private  Bible bible2
          The second Bible that we are checking
protected  com.eireneh.util.EventListenerList listeners
          The list of listeners
protected  int percent
          The current progress
static com.eireneh.bible.passage.Passage WHOLE
          The Whole Bible
 
Constructor Summary
Verifier()
          Basic constructor
Verifier(Bible bible1, Bible bible2)
          Constructor that sets up the Bibles as well.
 
Method Summary
 void addProgressListener(ProgressListener li)
          Add a progress listener to the list of things wanting to know whenever we make some progress
 void checkPassage(java.io.PrintWriter out)
          Read from the given source version to generate ourselves
 void checkPassage(java.lang.String starts, java.io.PrintWriter out)
          Read from the given source version to generate ourselves
private  void checkSinglePassage(java.lang.String word, java.io.PrintWriter out)
          Read from the given source version to generate ourselves
 void checkText(com.eireneh.bible.passage.Passage ref, java.io.PrintWriter out)
          Read from the given source version to generate ourselves
 void checkText(java.io.PrintWriter out)
          Read from the given source version to generate ourselves
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.
 Bible getBible1()
          The first Bible that we are checking
 Bible getBible2()
          The second Bible that we are checking
 void removeProgressListener(ProgressListener li)
          Remove a progress listener from the list of things wanting to know whenever we make some progress
 void setBible1(Bible bible1)
          The first Bible that we are checking, this is supposed to be the more accurate of the 2 Bibles, so we use this as a source of the words to check.
 void setBible2(Bible bible2)
          The second Bible that we are checking, this is supposed to be the less accurate, or more recent of the 2 Bibles, so we use this in firing ProgressEvents.
 void stopChecking()
          Since many of these operations take a long time, we may want to kill them politely without killing any Threads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHOLE

public static com.eireneh.bible.passage.Passage WHOLE
The Whole Bible


listeners

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


percent

protected int percent
The current progress


bible1

private Bible bible1
The first Bible that we are checking


bible2

private Bible bible2
The second Bible that we are checking


alive

private boolean alive
Is it OK to carry on

Constructor Detail

Verifier

public Verifier()
Basic constructor


Verifier

public Verifier(Bible bible1,
                Bible bible2)
Constructor that sets up the Bibles as well.

Method Detail

setBible1

public void setBible1(Bible bible1)
The first Bible that we are checking, this is supposed to be the more accurate of the 2 Bibles, so we use this as a source of the words to check.


getBible1

public Bible getBible1()
The first Bible that we are checking


setBible2

public void setBible2(Bible bible2)
The second Bible that we are checking, this is supposed to be the less accurate, or more recent of the 2 Bibles, so we use this in firing ProgressEvents.


getBible2

public Bible getBible2()
The second Bible that we are checking


checkText

public void checkText(java.io.PrintWriter out)
               throws java.io.IOException,
                      com.eireneh.bible.passage.NoSuchVerseException,
                      BookException
Read from the given source version to generate ourselves


checkText

public void checkText(com.eireneh.bible.passage.Passage ref,
                      java.io.PrintWriter out)
               throws java.io.IOException,
                      com.eireneh.bible.passage.NoSuchVerseException,
                      BookException
Read from the given source version to generate ourselves


checkPassage

public void checkPassage(java.io.PrintWriter out)
                  throws java.io.IOException,
                         com.eireneh.bible.passage.NoSuchVerseException,
                         BookException
Read from the given source version to generate ourselves


checkPassage

public void checkPassage(java.lang.String starts,
                         java.io.PrintWriter out)
                  throws java.io.IOException,
                         com.eireneh.bible.passage.NoSuchVerseException,
                         BookException
Read from the given source version to generate ourselves


checkSinglePassage

private void checkSinglePassage(java.lang.String word,
                                java.io.PrintWriter out)
                         throws java.io.IOException,
                                com.eireneh.bible.passage.NoSuchVerseException,
                                BookException
Read from the given source version to generate ourselves


stopChecking

public void stopChecking()
Since many of these operations take a long time, we may want to kill them politely without killing any Threads


addProgressListener

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


removeProgressListener

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


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.