com.google.appengine.api.search.query
Class QueryTreeBuilder

java.lang.Object
  extended by com.google.appengine.api.search.query.QueryTreeBuilder

public class QueryTreeBuilder
extends java.lang.Object

A generator of AST representation of a query. This class uses the given factory to produce a query parser which parses user specified query. If successful it returns the root of an AST representing the parsed query.


Constructor Summary
QueryTreeBuilder()
           
QueryTreeBuilder(QueryParserFactory parserFactory)
           
 
Method Summary
 CommonTree parse(java.lang.String query)
          Parses the user query and returns a CommonTree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryTreeBuilder

public QueryTreeBuilder()

QueryTreeBuilder

public QueryTreeBuilder(QueryParserFactory parserFactory)
Method Detail

parse

public CommonTree parse(java.lang.String query)
                 throws RecognitionException
Parses the user query and returns a CommonTree.

Parameters:
query - the user query to be parsed
Returns:
a CommonTree constructed from the query
Throws:
RecognitionException - if the user query is invalid
java.lang.NullPointerException - if query is null