|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.search.parse.IndexSearcher
public class IndexSearcher
The central interface to all searching. Functionality the I invisage includes:
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. |
Licence
Field Summary | |
---|---|
private Map |
commands
The commands that we know about |
private Index |
index
The index |
private static Logger |
log
The log stream |
private static String |
PACKAGE_NAME
To distinguish command mappings from preferred mappings in Word.properties |
private static Map |
preferredMap
The cache of preferred symbols for the words |
private Iterator |
wit
While the answer is being worked out ... |
private static Map |
wordMap
The cache of known words |
Constructor Summary | |
---|---|
IndexSearcher()
|
Method Summary | |
---|---|
protected Index |
getIndex()
Accessor for the Bible to search. |
protected Key |
getPassage(String[] words)
A basic version of getPassage(String[]) simply calls getPassage(String) in a loop for each word, adding the Verses to an Passage that is returned |
static String |
getPreferredSyntax(Class command)
Accessor for the cached list of known special lookup words |
protected Map |
getSearchMap()
Accessor for the available SearchWords. |
static Map |
getWordMap()
Accessor for the cached list of known special lookup words |
void |
init(Index newindex)
Setup the index that this parser can use to do word level searches |
Key |
iteratePassage()
|
String |
iterateWord()
|
protected Iterator |
iterator()
Most Words need to access parameters, this method allows them access to the Searcher's own Enumerator. |
protected Key |
search(List matches)
Take a search string and decipher it into a Passage. |
Key |
search(String search)
Take a search string and decipher it into a Passage. |
protected void |
setSearchMap(Map commands)
Accessor for the available SearchWords. |
protected Key |
wordSearch(String sought)
Take a search string and decipher it into a Passage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String PACKAGE_NAME
private static final Logger log
private static Map wordMap
private static Map preferredMap
private Map commands
private Iterator wit
private Index index
Constructor Detail |
---|
public IndexSearcher()
Method Detail |
---|
public void init(Index newindex)
Searcher
init
in interface Searcher
newindex
- The Index to query for wordspublic Key search(String search) throws BookException
Searcher
search
in interface Searcher
search
- The string to be searched for
BookException
protected Key wordSearch(String sought) throws BookException
sought
- The string to be searched for
BookException
protected Key search(List matches) throws BookException
BookException
protected Key getPassage(String[] words) throws BookException
words
- The words to search for
BookException
- If anything goes wrong with this methodprotected Index getIndex()
protected Map getSearchMap()
protected void setSearchMap(Map commands)
protected Iterator iterator()
public Key iteratePassage() throws BookException
BookException
public String iterateWord() throws BookException
BookException
public static Map getWordMap()
public static String getPreferredSyntax(Class command)
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |