T - The Builder type that the clause is part of.public interface WhereClause<T extends AbstractQueryBuilder<T>>
| Modifier and Type | Method and Description |
|---|---|
T |
addBind(Expr expression,
Object var)
Add a bind statement to the query *
http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rGraphGraphPattern.
|
T |
addBind(String expression,
Object var)
Add a bind statement to the query
http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rGraphGraphPattern.
|
T |
addFilter(Expr expression)
Adds a filter to the where clause
Use ExprFactory or NodeValue static or the AbstractQueryBuilder.makeExpr
methods to create the expression.
|
T |
addFilter(String expression)
Adds a filter to the where clause
|
T |
addGraph(Object graph,
AbstractQueryBuilder<?> subQuery)
Add a graph statement to the query as per
http://www.w3.org/TR/2013/REC-sparql11
-query-20130321/#rGraphGraphPattern.
|
T |
addGraph(Object graph,
FrontsTriple triple)
Add a graph statement to the query as per
http://www.w3.org/TR/2013/REC-sparql11
-query-20130321/#rGraphGraphPattern.
|
T |
addGraph(Object graph,
Object subject,
Object predicate,
Object object)
Add a graph statement to the query as per
http://www.w3.org/TR/2013/REC-sparql11
-query-20130321/#rGraphGraphPattern.
|
T |
addGraph(Object graph,
Triple triple)
Add a graph statement to the query as per
http://www.w3.org/TR/2013/REC-sparql11
-query-20130321/#rGraphGraphPattern.
|
T |
addGraph(Object graph,
TriplePath triplePath)
Add a graph statement to the query as per
http://www.w3.org/TR/2013/REC-sparql11
-query-20130321/#rGraphGraphPattern.
|
T |
addMinus(AbstractQueryBuilder<?> t)
Add a minus clause to the query.
|
T |
addOptional(AbstractQueryBuilder<?> t)
Adds an optional group pattern to the where clause.
|
T |
addOptional(FrontsTriple t)
Adds an optional triple as to the where clause.
|
T |
addOptional(Object s,
Object p,
Object o)
Adds an optional triple or triple path to the where clause.
|
T |
addOptional(Triple t)
Adds an optional triple to the where clause.
|
T |
addOptional(TriplePath t)
Adds an optional triple path to the where clause.
|
T |
addSubQuery(AbstractQueryBuilder<?> subQuery)
Add a sub query.
|
T |
addUnion(AbstractQueryBuilder<?> union)
Add a union.
|
T |
addWhere(AbstractQueryBuilder<?> whereClause)
Adds the elements from the whereClause to this where Clause.
|
T |
addWhere(FrontsTriple t)
Adds a triple to the where clause.
|
T |
addWhere(Object s,
Object p,
Object o)
Adds a triple or triple path to the where clause.
|
T |
addWhere(Triple t)
Adds a triple to the where clause.
|
T |
addWhere(TriplePath t)
Adds a triple path to the where clause.
|
T |
addWhereValueRow(Collection<?> values)
Add a collection of objects as row of values.
|
T |
addWhereValueRow(Object... values)
Add objects as a row of values.
|
T |
addWhereValueVar(Object var)
Add a variable or variable and values to the value statement.
|
T |
addWhereValueVar(Object var,
Object... values)
Add a variable and values to the value statement.
|
<K extends Collection<?>> |
addWhereValueVars(Map<?,K> dataTable)
Add a data table to the value statement.
|
T |
clearWhereValues()
Reset the values table in the where clause to the initial
undefined state.
|
WhereHandler |
getWhereHandler()
Get the Where handler for this clause.
|
Map<Var,List<Node>> |
getWhereValuesMap()
Get an unmodifiable map of vars from the where clause values and their values.
|
List<Var> |
getWhereValuesVars()
Get an unmodifiable list of vars from the where clause values in the order that they appear
in the values table.
|
Node |
list(Object... objs)
Create a list node from a list of objects as per RDF Collections.
|
T addWhere(Triple t)
t - The triple path to addT addWhere(TriplePath t)
t - The triple path to addT addWhere(FrontsTriple t)
t - The triple to addT addWhere(Object s, Object p, Object o)
AbstractQueryBuilder.makeTriplePath(java.lang.Object, java.lang.Object, java.lang.Object) for conversion of the
param values.s - The subject.p - The predicate.o - The object.T addWhere(AbstractQueryBuilder<?> whereClause)
whereClause - The whereClause to add to this statement.T addWhereValueVar(Object var)
var - The variable or collection to add.AbstractQueryBuilder.makeNode(Object),
Converters.makeVar(Object)T addWhereValueVar(Object var, Object... values)
var - The variable to add.values - The values for the variableAbstractQueryBuilder.makeNode(Object),
Converters.makeVar(Object)<K extends Collection<?>> T addWhereValueVars(Map<?,K> dataTable)
dataTable - The data table to add.Each item in the value collection is converted into a node using makeNode() strategy except that null values are converted
to UNDEF.
If there are already values in the value statement the data table is adds as follows:
- If the variable already exists in the table the map values are appended to the list of values
- If the variable does not exist in the table and there are other variables defined, an appropriate
number of nulls is added to the front of the map values to create UNDEF entries for the existing rows
- If there are variables in the value statement that are not specified in the map additional UNDEF
entries are appended to them to account for new rows that are added.
,
AbstractQueryBuilder.makeNode(Object),
Converters.makeVar(Object)T addWhereValueRow(Object... values)
values - the collection of values to add.AbstractQueryBuilder.makeNode(Object)T addWhereValueRow(Collection<?> values)
values - the collection of values to add.AbstractQueryBuilder.makeNode(Object)List<Var> getWhereValuesVars()
Map<Var,List<Node>> getWhereValuesMap()
T clearWhereValues()
T addOptional(Triple t)
t - The triple to addT addOptional(TriplePath t)
t - The triple path to addT addOptional(FrontsTriple t)
t - The triple to addT addOptional(Object s, Object p, Object o)
AbstractQueryBuilder.makeTriplePath(java.lang.Object, java.lang.Object, java.lang.Object) for conversion of the
param values.s - The subject.p - The predicate.o - The object.T addOptional(AbstractQueryBuilder<?> t)
t - The select builder to add as an optional patternT addFilter(String expression) throws ParseException
expression - the expression to evaluate for the filter.ParseException - If the expression can not be parsed.T addFilter(Expr expression)
expression - the expression to evaluate for the filter.ExprFactory,
NodeValue,
AbstractQueryBuilder.makeExpr(String)T addSubQuery(AbstractQueryBuilder<?> subQuery)
subQuery - The subquery as defined by a SelectBuilder.T addUnion(AbstractQueryBuilder<?> union)
union - The union as defined by a SelectBuilder.T addGraph(Object graph, AbstractQueryBuilder<?> subQuery)
AbstractQueryBuilder.makeNode(java.lang.Object) for conversion of the graph
param.graph - The iri or variable identifying the graph.subQuery - The graph to add.T addGraph(Object graph, FrontsTriple triple)
AbstractQueryBuilder.makeNode(java.lang.Object) for conversion of the graph
param.graph - The iri or variable identifying the graph.triple - a single s, p, o triple for the query.T addGraph(Object graph, Object subject, Object predicate, Object object)
AbstractQueryBuilder.makeNode(java.lang.Object) for conversion of the graph
param.graph - The iri or variable identifying the graph.subject - The subject for the graph querypredicate - The predicate for the graph query.object - The object for the graph query.T addGraph(Object graph, Triple triple)
AbstractQueryBuilder.makeNode(java.lang.Object) for conversion of the graph
param.graph - The iri or variable identifying the graph.triple - a single triple for the query.T addGraph(Object graph, TriplePath triplePath)
AbstractQueryBuilder.makeNode(java.lang.Object) for conversion of the graph
param.graph - The iri or variable identifying the graph.triplePath - a single triple path for the query.T addBind(Expr expression, Object var)
expression - The expression to bind to the var.var - The variable to bind to.T addBind(String expression, Object var) throws ParseException
expression - The expression to bind to the var.var - The variable to bind to.ParseExceptionWhereHandler getWhereHandler()
Node list(Object... objs)
AbstractQueryBuilder.makeNode(java.lang.Object) for conversion of the param
values.
usage:
objs - the list of objects for the list.T addMinus(AbstractQueryBuilder<?> t)
t - The select builder to add as a minus patternLicensed under the Apache License, Version 2.0