Class QueryTreeBuilder (2.0.0)

public class QueryTreeBuilder

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.

Inheritance

java.lang.Object > QueryTreeBuilder

Constructors

QueryTreeBuilder()

public QueryTreeBuilder()

QueryTreeBuilder(QueryParserFactory parserFactory)

public QueryTreeBuilder(QueryParserFactory parserFactory)
Parameter
NameDescription
parserFactoryQueryParserFactory

Methods

parse(String query)

public CommonTree parse(String query)

Parses the user query and returns its AST.

Parameter
NameDescription
queryString

the user query to be parsed

Returns
TypeDescription
org.antlr.runtime.tree.CommonTree

a CommonTree constructed from the query

Exceptions
TypeDescription
org.antlr.runtime.RecognitionException

if the user query is invalid