org.LexGrid.LexBIG.Impl.Extensions.Search
Class AbstractSearch

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
      extended by org.LexGrid.LexBIG.Impl.Extensions.Search.AbstractSearch
All Implemented Interfaces:
java.io.Serializable, Extendable, Search
Direct Known Subclasses:
AbstractExactMatchBoostingSearch, AbstractExactMatchSearch, AbstractLiteralSearch, DoubleMetaphoneSearch, LuceneSearch, PhraseSearch, RegExpSearch, StemmedSearch, WeightedDoubleMetaphoneSearch

public abstract class AbstractSearch
extends AbstractExtendable
implements Search

The Class AbstractSearch.

Author:
Kevin Peterson
See Also:
Serialized Form

Constructor Summary
protected AbstractSearch()
          Instantiates a new abstract search.
 
Method Summary
protected  java.lang.String[] addTrailingWildcard(java.lang.String[] tokens)
          Adds the trailing wildcard.
protected  java.lang.String addTrailingWildcardToAllTokens(java.lang.String searchString)
          Adds the trailing wildcard to all tokens.
 org.apache.lucene.queryParser.QueryParser getQueryParser()
          Gets the query parser.
protected  java.lang.String handleWhiteSpaceCharacters(java.lang.String query)
          Handle white space characters.
 void register()
          Register.
protected  java.lang.String[] tokenizeBySpace(java.lang.String searchString)
          Tokenize by space.
 
Methods inherited from class org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
buildExtensionDescription, getDescription, getExtensionDescription, getName, getProvider, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.LexGrid.LexBIG.Extensions.Query.Search
buildQuery
 
Methods inherited from interface org.LexGrid.LexBIG.Extensions.Extendable
getDescription, getName, getProvider, getVersion
 

Constructor Detail

AbstractSearch

protected AbstractSearch()
Instantiates a new abstract search.

Method Detail

register

public void register()
              throws LBParameterException,
                     LBException
Register.

Throws:
LBParameterException - the LB parameter exception
LBException - the LB exception

handleWhiteSpaceCharacters

protected java.lang.String handleWhiteSpaceCharacters(java.lang.String query)
Handle white space characters.

Parameters:
query - the query
Returns:
the string

tokenizeBySpace

protected java.lang.String[] tokenizeBySpace(java.lang.String searchString)
Tokenize by space.

Parameters:
searchString - the search string
Returns:
the string[]

addTrailingWildcard

protected java.lang.String[] addTrailingWildcard(java.lang.String[] tokens)
Adds the trailing wildcard.

Parameters:
tokens - the tokens
Returns:
the string[]

addTrailingWildcardToAllTokens

protected java.lang.String addTrailingWildcardToAllTokens(java.lang.String searchString)
Adds the trailing wildcard to all tokens.

Parameters:
searchString - the search string
Returns:
the string

getQueryParser

public org.apache.lucene.queryParser.QueryParser getQueryParser()
Gets the query parser.

Returns:
the query parser

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.