|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.resources.discovery.client.queries.impl.QueryBox
org.gcube.resources.discovery.client.queries.impl.QueryTemplate
org.gcube.resources.discovery.client.queries.impl.XQuery
public class XQuery
A 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.
| Field Summary | |
|---|---|
static String |
cond
|
static String |
ns
|
static String |
range
|
static String |
result
|
static String |
template
|
static String |
vars
|
| Fields inherited from class org.gcube.resources.discovery.client.queries.impl.QueryTemplate |
|---|
DEFAULT |
| Constructor Summary | |
|---|---|
XQuery(Map<String,String> parameters)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.gcube.resources.discovery.client.queries.impl.QueryTemplate |
|---|
addParameter, appendParameter, expression, hasParameter, parameter |
| Methods inherited from class org.gcube.resources.discovery.client.queries.impl.QueryBox |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.gcube.resources.discovery.client.queries.api.Query |
|---|
expression |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public XQuery(Map<String,String> parameters)
| Method Detail |
|---|
public XQuery addCondition(String condition)
In the condition, $resource ranges over resources.
addCondition in interface SimpleQuerycondition - the condition
public XQuery addNamespace(String prefix,
URI uri)
SimpleQuery
addNamespace in interface SimpleQueryprefix - the namespace prefixuri - the namespace URI
public XQuery addVariable(String variable,
String range)
SimpleQuery
addVariable in interface SimpleQueryvariable - the name of the variablerange - the range of the variable
public XQuery setResult(String expression)
In the expression, $resource ranges over resources.
setResult in interface SimpleQueryexpression - the result expression
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||