org.crosswire.jsword.index.search
Class SearchType

java.lang.Object
  extended by org.crosswire.jsword.index.search.SearchType
All Implemented Interfaces:
Serializable

public abstract class SearchType
extends Object
implements Serializable

An Enumeration of the possible types of Searches.

Author:
DM Smith [dmsmith555 at yahoo dot com]
See Also:
for license details. The copyright to this program is held by it's authors., Serialized Form

Field Summary
static SearchType ALL_WORDS
          Find all the words regardless of position.
static SearchType ANY_WORDS
          Find any of these words
private  String name
          The name of the BookCategory
private static int nextObj
           
static SearchType NOT_WORDS
          Find verses not containing these words.
private  int obj
           
static SearchType PHRASE
          Find the words in the specified order.
static SearchType RANGE
          Find verses in this range
protected static QueryDecorator SEARCH_SYNTAX
           
private static long serialVersionUID
          Serialization ID
static SearchType SPELL_WORDS
          Find verses with words spelled something like
static SearchType START_WORDS
          Find verses with words that start with the these beginnings.
private static SearchType[] VALUES
           
 
Constructor Summary
protected SearchType(String name)
           
 
Method Summary
abstract  String decorate(String queryWords)
          Decorate a string with the given type of decoration.
 boolean equals(Object o)
          Prevent subclasses from overriding canonical identity based Object methods
static SearchType fromInteger(int i)
          Lookup method to convert from an integer
static SearchType fromString(String name)
          Lookup method to convert from a String
 int hashCode()
          Prevent subclasses from overriding canonical identity based Object methods
(package private)  Object readResolve()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PHRASE

public static final SearchType PHRASE
Find the words in the specified order.


ALL_WORDS

public static final SearchType ALL_WORDS
Find all the words regardless of position.


ANY_WORDS

public static final SearchType ANY_WORDS
Find any of these words


NOT_WORDS

public static final SearchType NOT_WORDS
Find verses not containing these words. Note this may require being added after words being sought.


START_WORDS

public static final SearchType START_WORDS
Find verses with words that start with the these beginnings.


SPELL_WORDS

public static final SearchType SPELL_WORDS
Find verses with words spelled something like


RANGE

public static final SearchType RANGE
Find verses in this range


name

private String name
The name of the BookCategory


SEARCH_SYNTAX

protected static final QueryDecorator SEARCH_SYNTAX

nextObj

private static int nextObj

obj

private final int obj

VALUES

private static final SearchType[] VALUES

serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values
Constructor Detail

SearchType

protected SearchType(String name)
Parameters:
name - The name of the BookCategory
Method Detail

decorate

public abstract String decorate(String queryWords)
Decorate a string with the given type of decoration.


fromString

public static SearchType fromString(String name)
Lookup method to convert from a String


fromInteger

public static SearchType fromInteger(int i)
Lookup method to convert from an integer


equals

public final boolean equals(Object o)
Prevent subclasses from overriding canonical identity based Object methods

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public final int hashCode()
Prevent subclasses from overriding canonical identity based Object methods

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object

readResolve

Object readResolve()

Copyright ยจ 2003-2006