org.crosswire.jsword.book.search.parse
Class PhraseParamWord

java.lang.Object
  extended by org.crosswire.jsword.book.search.parse.PhraseParamWord
All Implemented Interfaces:
ParamWord, Word

public class PhraseParamWord
extends Object
implements ParamWord

The Search Word for a Word to search for. The default if no other SearchWords match.

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: PhraseParamWord.java,v 1.2 2004/10/09 21:45:05 joe Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

Field Summary
private static int BLUR_BY
          How many verses do we blur by?
private  Thesaurus thesaurus
          How we get related words
 
Constructor Summary
PhraseParamWord()
           
 
Method Summary
 Key bestMatch(IndexSearcher engine, String sought)
           
 Key getKeyList(IndexSearcher engine)
          Get a Passage or throw-up if that is not appropriate for this Word.
 String getWord(IndexSearcher engine)
          Get a word for something else to word on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thesaurus

private Thesaurus thesaurus
How we get related words


BLUR_BY

private static final int BLUR_BY
How many verses do we blur by?

See Also:
Constant Field Values
Constructor Detail

PhraseParamWord

public PhraseParamWord()
Method Detail

getWord

public String getWord(IndexSearcher engine)
               throws BookException
Description copied from interface: ParamWord
Get a word for something else to word on.

Specified by:
getWord in interface ParamWord
Parameters:
engine - The controller that can provide access to the search string or a default Bible.
Returns:
The requested text
Throws:
BookException - If this action is not appropriate

getKeyList

public Key getKeyList(IndexSearcher engine)
               throws BookException
Description copied from interface: ParamWord
Get a Passage or throw-up if that is not appropriate for this Word.

Specified by:
getKeyList in interface ParamWord
Parameters:
engine - The controller that can provide access to the search string or a default Bible.
Returns:
A Passage relevant to this command
Throws:
BookException - If this action is not appropriate

bestMatch

public Key bestMatch(IndexSearcher engine,
                     String sought)
              throws BookException
Throws:
BookException

Copyright ? 2003-2004