public class XQuery extends QueryTemplate implements SimpleQuery
SimpleQuery over an XQuery template.
The template is defined as follows (cf. template):
<ns/> for $resource in <range/><vars/> where <cond def="$result"/> return <result def="$result"/>
where:
range stands for the path to the data ranged over by the $result variable. This parameter
is typically bound at query-creation time (cf. XQuery(Map).
ns, vars, cond and result stand for, respectively, the declarations of namespace prefixes, the declarations of auxiliary variables,
the conditions, and the result expression of the query. These parameters should be bound through the SimpleQuery API.
| Modifier and Type | Field and Description |
|---|---|
static String |
cond |
static String |
ns |
static String |
range |
static String |
result |
static String |
template |
static String |
vars |
DEFAULT| Modifier and Type | Method and Description |
|---|---|
XQuery |
addCondition(String condition)
Adds a free-form condition on query results.
|
XQuery |
addNamespace(String prefix,
URI uri)
Adds a namespace to the query.
|
XQuery |
addVariable(String variable,
String range)
Adds a variable to the query.
|
XQuery |
setResult(String expression)
Adds a result expression to the query.
|
addParameter, appendParameter, expression, hasParameter, parameterequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitexpressionpublic static final String ns
public static final String vars
public static final String range
public static final String cond
public static final String result
public static final String template
public XQuery addCondition(String condition)
In the condition, $resource ranges over resources.
addCondition in interface SimpleQuerycondition - the conditionpublic XQuery addNamespace(String prefix, URI uri)
SimpleQueryaddNamespace in interface SimpleQueryprefix - the namespace prefixuri - the namespace URIpublic XQuery addVariable(String variable, String range)
SimpleQueryaddVariable in interface SimpleQueryvariable - the name of the variablerange - the range of the variablepublic XQuery setResult(String expression)
In the expression, $resource ranges over resources.
setResult in interface SimpleQueryexpression - the result expressionCopyright © 2020. All Rights Reserved.