|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.query.QueryParser
This class acts as the central entry point for parsing query statements from different query syntaxes into a query tree.
Method Summary | |
static QueryRootNode |
parse(String statement,
String language,
NamespaceResolver resolver)
Parses a query statement according to a query
language into a query tree. |
static String |
toString(QueryRootNode root,
String language,
NamespaceResolver resolver)
Creates a String representation of the QueryNode tree argument root . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static QueryRootNode parse(String statement, String language, NamespaceResolver resolver) throws InvalidQueryException
statement
according to a query
language
into a query tree.
language
must be one of: Query.SQL
,
Query.XPATH
.
statement
- the query statement.language
- the language of the query statement.
InvalidQueryException
- if an error occurs while parsing the
statement.public static String toString(QueryRootNode root, String language, NamespaceResolver resolver) throws InvalidQueryException
root
. The argument language
specifies the
syntax.
See also: QueryManager.getSupportedQueryLanguages()
.
root
- the query node tree.language
- one of the languages returned by:
QueryManager.getSupportedQueryLanguages()
.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 language
is not one of the supported query languages
returned by the QueryManager
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |