public class WhereQuadHolder extends Object implements QuadHolder
| Constructor and Description |
|---|
WhereQuadHolder(PrefixHandler prefixHandler)
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,
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 |
addWhere(TriplePath t)
Add the triple path to the where clause
|
Element |
build() |
ElementGroup |
getClause()
Get the element group for the clause.
|
ExtendedIterator<Quad> |
getQuads()
Get an extended iterator over the quads this holder holds.
|
ExtendedIterator<Quad> |
getQuads(Node defaultGraphName) |
boolean |
isEmpty()
True if there are no elements in the where processor.
|
Node |
list(Object... objs)
Create a list node from a list of objects as per RDF Collections.
|
QuadHolder |
setValues(Map<Var,Node> values)
Apply values to the variables in the quads held by this holder.
|
WhereQuadHolder |
setVars(Map<Var,Node> values)
replace the vars in the expressions with the nodes in the values map.
|
public WhereQuadHolder(PrefixHandler prefixHandler)
prefixHandler - the prefix handler to use.public boolean isEmpty()
public ExtendedIterator<Quad> getQuads()
QuadHoldergetQuads in interface QuadHolderpublic ExtendedIterator<Quad> getQuads(Node defaultGraphName)
public void addAll(WhereHandler whereHandler)
whereHandler - The Where Handler to copy from.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 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 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 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 WhereQuadHolder setVars(Map<Var,Node> values)
values - the value map to usepublic QuadHolder setValues(Map<Var,Node> values)
QuadHoldersetValues in interface QuadHoldervalues - the values to set.public 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 Element build()
Licensed under the Apache License, Version 2.0