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 Details

    • QueryTreeBuilder

      public QueryTreeBuilder()
    • QueryTreeBuilder

      public QueryTreeBuilder(QueryParserFactory parserFactory)
  • Method Details

    • 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 invalid
      NullPointerException - if query is null