org.crosswire.jsword.book.search
Interface Index

All Known Implementing Classes:
LuceneIndex

public interface Index

An index into a body of text that knows what words exist and where they are.

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

Method Summary
 Key findWord(String word)
          For a given word find a list of references to it.
 Key getKey(String name)
          An index must be able to create KeyLists for users in a similar way to the Book that it is indexing.
 

Method Detail

findWord

Key findWord(String word)
             throws BookException
For a given word find a list of references to it. If the word being searched for is null then an empty Key MUST be returned. Users of this index may use this functionality to get empty KeyLists which they then use to aggregate other searches done on this index.

Parameters:
word - The text to search for
Returns:
The references to the word
Throws:
BookException

getKey

Key getKey(String name)
           throws NoSuchKeyException
An index must be able to create KeyLists for users in a similar way to the Book that it is indexing.

Parameters:
name - The string to convert to a Key
Returns:
A new Key representing the given string, if possible
Throws:
NoSuchKeyException - If the string can not be turned into a Key
See Also:
KeyFactory.getKey(String)

Copyright ? 2003-2004