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

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
      extended by org.LexGrid.LexBIG.Impl.Extensions.Search.AbstractSearch
          extended by org.LexGrid.LexBIG.Impl.Extensions.Search.AbstractLiteralSearch
All Implemented Interfaces:
java.io.Serializable, Extendable, Search
Direct Known Subclasses:
LiteralSearch, SpellingErrorTolerantSubStringSearch

public abstract class AbstractLiteralSearch
extends AbstractSearch

The Class AbstractLiteralSearch.

Author:
Kevin Peterson
See Also:
Serialized Form

Constructor Summary
AbstractLiteralSearch()
           
 
Method Summary
 org.apache.lucene.search.Query buildQuery(java.lang.String searchText)
          Generate a Lucene Query given a text String.
abstract  org.apache.lucene.search.Query doBuildQuery(java.lang.String searchText)
          Do build query.
protected  boolean doesSearchStringContainSpecialCharacters(java.lang.String searchString)
          Does search string contain special characters.
protected static java.lang.String excapeSpecialCharacters(java.lang.String searchText)
          Excape special characters.
protected  java.lang.String[] getTokensWithoutSpecialCharacters(java.lang.String[] tokens)
          Gets the tokens without special characters.
protected  java.lang.String[] getTokensWithSpecialCharacters(java.lang.String[] tokens)
          Gets the tokens with special characters.
 
Methods inherited from class org.LexGrid.LexBIG.Impl.Extensions.Search.AbstractSearch
addTrailingWildcard, addTrailingWildcardToAllTokens, getQueryParser, handleWhiteSpaceCharacters, register, tokenizeBySpace
 
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.Extendable
getDescription, getName, getProvider, getVersion
 

Constructor Detail

AbstractLiteralSearch

public AbstractLiteralSearch()
Method Detail

buildQuery

public org.apache.lucene.search.Query buildQuery(java.lang.String searchText)
Description copied from interface: Search
Generate a Lucene Query given a text String.

Parameters:
searchText - The text to search
Returns:
The Query

doBuildQuery

public abstract org.apache.lucene.search.Query doBuildQuery(java.lang.String searchText)
Do build query.

Parameters:
searchText - the search text
Returns:
the query

excapeSpecialCharacters

protected static java.lang.String excapeSpecialCharacters(java.lang.String searchText)
Excape special characters.

Parameters:
searchText - the search text
Returns:
the string

doesSearchStringContainSpecialCharacters

protected boolean doesSearchStringContainSpecialCharacters(java.lang.String searchString)
Does search string contain special characters.

Parameters:
searchString - the search string
Returns:
true, if successful

getTokensWithSpecialCharacters

protected java.lang.String[] getTokensWithSpecialCharacters(java.lang.String[] tokens)
Gets the tokens with special characters.

Parameters:
tokens - the tokens
Returns:
the tokens with special characters

getTokensWithoutSpecialCharacters

protected java.lang.String[] getTokensWithoutSpecialCharacters(java.lang.String[] tokens)
Gets the tokens without special characters.

Parameters:
tokens - the tokens
Returns:
the tokens without special characters

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.