org.crosswire.jsword.book.basic
Class Verifier

java.lang.Object
  extended by org.crosswire.jsword.book.basic.Verifier

public class Verifier
extends Object

The Verifier check 2 versions for identical text.

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: Verifier.java,v 1.29 2005/03/22 12:40:04 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

Field Summary
private  Book book1
          The first Bible that we are checking
private  Book book2
          The second Bible that we are checking
static int GUESS_WORDS
          We have no way of knowing exactly how many words there are in a Version ...
 
Constructor Summary
Verifier(Book book1, Book book2)
          Constructor that sets up the Bibles as well.
 
Method Summary
 void checkPassage(PrintWriter out)
          Read from the given source version to generate ourselves
private  void checkSinglePassage(String word, PrintWriter out)
          Read from the given source version to generate ourselves
 void checkText(Key key, PrintWriter out)
          Read from the given source version to generate ourselves
 Book getBible1()
          The first Bible that we are checking
 Book getBible2()
          The second Bible that we are checking
 void setBible1(Book book1)
          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(Book book2)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GUESS_WORDS

public static final int GUESS_WORDS
We have no way of knowing exactly how many words there are in a Version ...

See Also:
Constant Field Values

book1

private Book book1
The first Bible that we are checking


book2

private Book book2
The second Bible that we are checking

Constructor Detail

Verifier

public Verifier(Book book1,
                Book book2)
Constructor that sets up the Bibles as well.

Method Detail

setBible1

public final void setBible1(Book book1)
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.

Parameters:
book1 - A Bible to check

getBible1

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

Returns:
A Bible to check

setBible2

public final void setBible2(Book book2)
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.

Parameters:
book2 - A Bible to check

getBible2

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

Returns:
A Bible to check

checkText

public void checkText(Key key,
                      PrintWriter out)
Read from the given source version to generate ourselves


checkPassage

public void checkPassage(PrintWriter out)
                  throws BookException
Read from the given source version to generate ourselves

Throws:
BookException

checkSinglePassage

private void checkSinglePassage(String word,
                                PrintWriter out)
                         throws BookException
Read from the given source version to generate ourselves

Throws:
BookException

Copyright ? 2003-2004