Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.book.search.lucene
Class QueryBuilder

    java.lang.Object
      org.crosswire.jsword.book.search.lucene.QueryBuilder

    public final class QueryBuilder

extends Object

A query can have a optional range specifier and an optional blur specifier. The range specifier can be +[range], -[range] or just [range]. This must stand at the beginning of the query and may be surrounded by whitespace. The blur specifier is either ~ or ~n, where ~ means adjacent verses, but ~n means to blur by n verses.

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

Field Summary
`private static Pattern` | `BLUR_PATTERN` The pattern of a blur.
`private static Pattern` | `RANGE_PATTERN` The pattern of a range.

Constructor Summary
`private` | `QueryBuilder()` Prevent Instansiation

Method Summary
`static List` | `tokenize(String aSearch)` Tokenize a query into a list of Tokens.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RANGE_PATTERN

    private static final Pattern RANGE_PATTERN

  The pattern of a range. This is anything that is contained between a leading [] (but not containing a [ or ]), with a + or - optional prefix, perhaps surrounded by whitespace.

### BLUR_PATTERN

    private static final Pattern BLUR_PATTERN

  The pattern of a blur. A '~', optionally followed by a number, representing the number of verses.

Constructor Detail

### QueryBuilder

    private QueryBuilder()

  Prevent Instansiation

Method Detail

### tokenize

    public static List tokenize(String aSearch)

  Tokenize a query into a list of Tokens.

  Parameters:
    `aSearch` - The text to parse
  Returns:
    A List of selected Tokens

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD