| Constructor and Description |
|---|
WhereHandler()
Creates a where handler with a new query.
|
WhereHandler(Query query)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAll(WhereHandler whereHandler)
Add all where attributes from the Where Handler argument.
|
void |
addBind(Expr expr,
Var var)
Add a binding to the where clause.
|
void |
addBind(String expression,
Var var)
Add a binding to the where clause.
|
void |
addFilter(Expr expr)
add an expression as a filter.
|
void |
addFilter(String expression)
Add an expression string as a filter.
|
void |
addGraph(Node graph,
TriplePath subQuery)
Add a graph to the where clause.
|
void |
addGraph(Node graph,
WhereHandler subQuery)
Add a graph to the where clause.
|
void |
addMinus(AbstractQueryBuilder<?> qb)
Add a minus operation to the where clause.
|
void |
addOptional(TriplePath t)
Add an optional triple to the where clause
|
void |
addOptional(WhereHandler whereHandler)
Add the contents of a where handler as an optional statement.
|
void |
addSubQuery(AbstractQueryBuilder<?> subQuery)
Add a subquery to the where clause.
|
void |
addUnion(AbstractQueryBuilder<?> subQuery)
Add a union to the where clause.
|
void |
addValueRow(PrefixMapping prefixMapping,
Collection<?> values) |
void |
addValueRow(PrefixMapping prefixMapping,
Object... values) |
void |
addValueVar(PrefixMapping prefixMapping,
Object var) |
void |
addValueVar(PrefixMapping prefixMapping,
Object var,
Object... objects) |
<K extends Collection<?>> |
addValueVars(PrefixMapping prefixMapping,
Map<?,K> dataTable) |
void |
addWhere(TriplePath t)
Add the triple path to the where clause
|
void |
addWhere(ValuesHandler values)
Add the triple path to the where clause
|
void |
build()
Called by the build process for this handler to perform any adjustments to the query before
the build completes.
|
void |
clearValues() |
ElementGroup |
getClause()
Get the element group for the clause.
|
Element |
getElement()
Get the base element from the where clause.
|
Query |
getQuery() |
Element |
getQueryPattern()
Get the query pattern from this where handler.
|
Map<Var,List<Node>> |
getValuesMap() |
List<Var> |
getValuesVars() |
Node |
list(Object... objs)
Create a list node from a list of objects as per RDF Collections.
|
ElementSubQuery |
makeSubQuery(AbstractQueryBuilder<?> subQuery)
Convert a subquery into a subquery element.
|
void |
setVars(Map<Var,Node> values)
Set the values for variables managed by the handler implementation.
|
public WhereHandler(Query query)
query - The query to manipulate.public WhereHandler()
public Element getQueryPattern()
public Query getQuery()
public void addAll(WhereHandler whereHandler)
whereHandler - The Where Handler to copy from.public Element getElement()
public ElementGroup getClause()
public void addWhere(TriplePath t) throws IllegalArgumentException
t - The triple path to add.IllegalArgumentException - If the triple path is not a valid triple path for a where clause.public void addWhere(ValuesHandler values) throws IllegalArgumentException
values - The values to add to this where clause.IllegalArgumentException - If the triple path is not a valid triple path for a where clause.public void addOptional(TriplePath t) throws IllegalArgumentException
t - The triple path to add.IllegalArgumentException - If the triple is not a valid triple for a where clause.public void addOptional(WhereHandler whereHandler)
whereHandler - The where handler to use as the optional statement.public void addFilter(String expression) throws ParseException
expression - The expression string to add.ParseException - If the expression can not be parsed.public void addFilter(Expr expr)
expr - The expression to add.public void addSubQuery(AbstractQueryBuilder<?> subQuery)
subQuery - The sub query to add.public ElementSubQuery makeSubQuery(AbstractQueryBuilder<?> subQuery)
subQuery - The sub query to convertpublic void addUnion(AbstractQueryBuilder<?> subQuery)
subQuery - The subquery to add as the union.public void addGraph(Node graph, WhereHandler subQuery)
graph - The name of the graph.subQuery - The where handler that defines the graph.public void addGraph(Node graph, TriplePath subQuery)
graph - The name of the graph.subQuery - A triple path to add to the graph.public void addBind(Expr expr, Var var)
expr - The expression to bind.var - The variable to bind it to.public void addBind(String expression, Var var) throws ParseException
expression - The expression to bind.var - The variable to bind it to.ParseExceptionpublic void setVars(Map<Var,Node> values)
Handlerpublic void build()
Handlerpublic Node list(Object... objs)
objs - the list of objects for the list.public void addMinus(AbstractQueryBuilder<?> qb)
qb - the abstract builder that defines the data to subtract.public void addValueVar(PrefixMapping prefixMapping, Object var)
public void addValueVar(PrefixMapping prefixMapping, Object var, Object... objects)
public <K extends Collection<?>> void addValueVars(PrefixMapping prefixMapping, Map<?,K> dataTable)
public void addValueRow(PrefixMapping prefixMapping, Object... values)
public void addValueRow(PrefixMapping prefixMapping, Collection<?> values)
public void clearValues()
Licensed under the Apache License, Version 2.0