Class QueryTreeBuilder
- java.lang.Object
-
- com.google.appengine.api.search.query.QueryTreeBuilder
-
public class QueryTreeBuilder extends 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
Constructors Constructor Description QueryTreeBuilder()
QueryTreeBuilder(QueryParserFactory parserFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.antlr.runtime.tree.CommonTree
parse(String query)
Parses the user query and returns its AST.
-
-
-
Constructor Detail
-
QueryTreeBuilder
public QueryTreeBuilder()
-
QueryTreeBuilder
public QueryTreeBuilder(QueryParserFactory parserFactory)
-
-
Method Detail
-
parse
public org.antlr.runtime.tree.CommonTree parse(String query) throws org.antlr.runtime.RecognitionException
Parses the user query and returns its AST.- Parameters:
query
- the user query to be parsed- Returns:
- a CommonTree constructed from the query
- Throws:
org.antlr.runtime.RecognitionException
- if the user query is invalidNullPointerException
- if query is null
-
-