org.vfny.geoserver.zserver
Class RPNConverter

java.lang.Object
  extended byorg.vfny.geoserver.zserver.RPNConverter

public class RPNConverter
extends java.lang.Object

Helper class that converts a jzkit QueryNode into a lucene search query.


Field Summary
static java.lang.String COMPLEX_CLASS
           
static java.lang.String NEG_OR_DEC
          Regular Expression to filter out decimals and negative signs
static java.lang.String QUERY_CLASS
           
static java.lang.String ROOT_CLASS
           
static java.lang.String TERM_CLASS
           
static java.lang.String WHITE_SPACE
          Regular Expression to match for whitespace
static java.lang.String WHITE_SPACE_OR_COMMA
          Regular Expression to split values from spaces or commas
 
Constructor Summary
RPNConverter(java.util.Properties attrMap)
          Initializes the database and request handler.
 
Method Summary
 java.lang.String cleanNumber(java.lang.String number)
          Given a string strips out the characters that aren't parts of a number so that the string can be properly converted.
 org.apache.lucene.search.Query toLuceneQuery(com.k_int.util.RPNQueryRep.QueryNode rpnQuery)
          Returns a query to search the index corresponding to the z39.50 query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEG_OR_DEC

public static final java.lang.String NEG_OR_DEC
Regular Expression to filter out decimals and negative signs

See Also:
Constant Field Values

WHITE_SPACE_OR_COMMA

public static final java.lang.String WHITE_SPACE_OR_COMMA
Regular Expression to split values from spaces or commas

See Also:
Constant Field Values

WHITE_SPACE

public static final java.lang.String WHITE_SPACE
Regular Expression to match for whitespace

See Also:
Constant Field Values

QUERY_CLASS

public static final java.lang.String QUERY_CLASS
See Also:
Constant Field Values

TERM_CLASS

public static final java.lang.String TERM_CLASS
See Also:
Constant Field Values

COMPLEX_CLASS

public static final java.lang.String COMPLEX_CLASS
See Also:
Constant Field Values

ROOT_CLASS

public static final java.lang.String ROOT_CLASS
See Also:
Constant Field Values
Constructor Detail

RPNConverter

public RPNConverter(java.util.Properties attrMap)
Initializes the database and request handler.

Parameters:
attrMap - the mappings of use attribute values to their names.
Method Detail

toLuceneQuery

public org.apache.lucene.search.Query toLuceneQuery(com.k_int.util.RPNQueryRep.QueryNode rpnQuery)
                                             throws com.k_int.IR.SearchException
Returns a query to search the index corresponding to the z39.50 query

Parameters:
rpnQuery - the internal jzkit representation of a z39.50 query
Returns:
The lucene representation of the rpnQuery
Throws:
com.k_int.IR.SearchException - DOCUMENT ME!

cleanNumber

public java.lang.String cleanNumber(java.lang.String number)
Given a string strips out the characters that aren't parts of a number so that the string can be properly converted.

Parameters:
number - A string to be converted to a number.
Returns:
the number string that won't raise a conversion error.