public class QueryParser extends Object
|Modifier and Type||Method and Description|
Parses a query
Creates a String representation of the QueryNode tree argument
public static QueryRootNode parse(String statement, String language, NameResolver resolver, QueryNodeFactory factory) throws InvalidQueryException
statementaccording to a query
languageinto a query tree.
statement- the query statement.
language- the language of the query statement.
factory- the query node factory.
InvalidQueryException- if an error occurs while parsing the statement.
public static String toString(QueryRootNode root, String language, NameResolver resolver) throws InvalidQueryException
root. The argument
languagespecifies the syntax. See also:
root- the query node tree.
language- one of the languages returned by:
resolver- to resolve QNames.
InvalidQueryException- if the query node tree cannot be converted into a String representation of the given language. This might be due to syntax restrictions of the given language. This exception is also thrown if
languageis not one of the supported query languages returned by the
Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.