java.lang.Object
org.apache.jena.arq.querybuilder.AbstractQueryBuilder<ConstructBuilder>
org.apache.jena.arq.querybuilder.ConstructBuilder
- All Implemented Interfaces:
Cloneable
,ConstructClause<ConstructBuilder>
,DatasetClause<ConstructBuilder>
,PrologClause<ConstructBuilder>
,SolutionModifierClause<ConstructBuilder>
,ValuesClause<ConstructBuilder>
,WhereClause<ConstructBuilder>
public class ConstructBuilder
extends AbstractQueryBuilder<ConstructBuilder>
implements DatasetClause<ConstructBuilder>, WhereClause<ConstructBuilder>, SolutionModifierClause<ConstructBuilder>, ConstructClause<ConstructBuilder>
Builder for SPARQL Construct Queries.
The ConstructBuilder provides chainable methods to programmatically generate
SPARQL Construct Queries. The application order of the methods is not
relevant for the resulting query. An ExprFactory
is intended for use
along with the ConstructBuilder to generate needed Expr
parameter
values. An ExprFactory
that works with the same prefixes can be
obtained with AbstractQueryBuilder.getExprFactory()
.
The ConstructBuilder can be used asprepared query. Values for
variables in the created query can be set with
AbstractQueryBuilder.setVar(Object, Object)
and
AbstractQueryBuilder.setVar(Var, Node)
. The method
clearWhereValues()
allows to clear the set values.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a bind statement to the query http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rGraphGraphPattern.Add a bind statement to the query * http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rGraphGraphPattern.addConstruct
(Object s, Object p, Object o) Add a construct triple.addConstruct
(org.apache.jena.graph.FrontsTriple t) Add a construct triple.addConstruct
(org.apache.jena.graph.Triple t) Add a construct triple.Adds a filter to the where clauseaddFilter
(org.apache.jena.sparql.expr.Expr expr) Adds a filter to the where clause Use ExprFactory or NodeValue static or the AbstractQueryBuilder.makeExpr methods to create the expression.Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern.addGraph
(Object graph, Collection<org.apache.jena.sparql.core.TriplePath> collection) Adds a collection of triple paths as the optional clauses.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.Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern.Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern.Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern.addGroupBy
(Object groupBy) Add a variable to the group by clause.addGroupBy
(Object var, String expr) Add var and expression to the group by clause.addGroupBy
(Object var, org.apache.jena.sparql.expr.Expr expr) Add var and expression to the group by clause.addGroupBy
(org.apache.jena.sparql.expr.Expr groupBy) Add an expression to the group by clause.Add a having expression.Add a having expression.addHaving
(org.apache.jena.sparql.expr.Expr expression) Add a having expression.addMinus
(AbstractQueryBuilder<?> t) Add a minus clause to the query.addOptional
(Object s, Object p, Object o) Adds an optional triple or triple path to the where clause.addOptional
(Collection<org.apache.jena.sparql.core.TriplePath> collection) Adds a collection of triple paths as the optional clauses.Adds an optional group pattern to the where clause.addOptional
(org.apache.jena.graph.FrontsTriple t) Adds an optional triple as to the where clause.addOptional
(org.apache.jena.graph.Triple t) Adds an optional triple to the where clause.addOptional
(org.apache.jena.sparql.core.TriplePath t) Adds an optional triple path to the where clause.addOrderBy
(Object orderBy) Add an ascending order by.addOrderBy
(Object orderBy, Order order) Add an order by with direction specified.addOrderBy
(org.apache.jena.query.SortCondition orderBy) Add an ascending order by.addOrderBy
(org.apache.jena.sparql.expr.Expr orderBy) Add an ascending order by.addOrderBy
(org.apache.jena.sparql.expr.Expr orderBy, Order order) Add an order by with direction specified.addSubQuery
(AbstractQueryBuilder<?> subQuery) Add a sub query.addUnion
(AbstractQueryBuilder<?> subQuery) Add a union.Adds a triple or triple path to the where clause.addWhere
(Collection<org.apache.jena.sparql.core.TriplePath> collection) Adds a collections of triple paths to the where clause.addWhere
(org.apache.jena.graph.FrontsTriple t) Adds a triple to the where clause.addWhere
(org.apache.jena.graph.Triple t) Adds a triple to the where clause.addWhere
(org.apache.jena.sparql.core.TriplePath t) Adds a triple path to the where clause.addWhereValueRow
(Object... values) Add objects as a row of values.addWhereValueRow
(Collection<?> values) Add a collection of objects as row of values.addWhereValueVar
(Object var) Add a variable or variable and values to the value statement.addWhereValueVar
(Object var, Object... values) Add a variable and values to the value statement.<K extends Collection<?>>
ConstructBuilderaddWhereValueVars
(Map<?, K> dataTable) Add a data table to the value statement.Reset the values table in the where clause to the initial undefined state.clone()
Add the "FROM" graph name.Add the "FROM NAMED" graph name.Get the Construct handler for this construct clause.Get the Dataset handler for this clause.Get the HandlerBlock for this query builder.Get the Solution modifier for this clause.Get an unmodifiable map of vars from the where clause values and their values.List<org.apache.jena.sparql.core.Var>
Get an unmodifiable list of vars from the where clause values in the order that they appear in the values table.org.apache.jena.graph.Node
Deprecated.setLimit
(int limit) Set the limit.setOffset
(int offset) Set the offset.Methods inherited from class org.apache.jena.arq.querybuilder.AbstractQueryBuilder
addPrefix, addPrefix, addPrefix, addPrefixes, addPrefixes, addValueRow, addValueRow, addValueVar, addValueVar, addValueVars, addWhere, asSubQuery, build, buildString, checkVar, clearValues, clone, getExprFactory, getPrologHandler, getValuesHandler, getValuesMap, getValuesVars, getWhereHandler, makeExpr, makeNode, makeNode, makeNodeOrPath, makeTriplePath, makeTriplePaths, makeValueNodes, makeValueNodes, makeVar, quote, rewrite, setBase, setBase, setVar, setVar, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.jena.arq.querybuilder.clauses.WhereClause
addWhere, getWhereHandler
-
Constructor Details
-
ConstructBuilder
public ConstructBuilder()
-
-
Method Details
-
getDatasetHandler
Description copied from interface:DatasetClause
Get the Dataset handler for this clause.- Specified by:
getDatasetHandler
in interfaceDatasetClause<ConstructBuilder>
- Returns:
- The DatasetHandler this clause is using.
-
getConstructHandler
Description copied from interface:ConstructClause
Get the Construct handler for this construct clause.- Specified by:
getConstructHandler
in interfaceConstructClause<ConstructBuilder>
- Returns:
- the construct handler used by this builder.
-
getSolutionModifierHandler
Description copied from interface:SolutionModifierClause
Get the Solution modifier for this clause.- Specified by:
getSolutionModifierHandler
in interfaceSolutionModifierClause<ConstructBuilder>
- Returns:
- The SolutionModifierHandler the clause is using.
-
getHandlerBlock
Description copied from class:AbstractQueryBuilder
Get the HandlerBlock for this query builder.- Specified by:
getHandlerBlock
in classAbstractQueryBuilder<ConstructBuilder>
- Returns:
- The associated handler block.
-
clone
-
fromNamed
Description copied from interface:DatasetClause
Add the "FROM NAMED" graph name.- Specified by:
fromNamed
in interfaceDatasetClause<ConstructBuilder>
- Parameters:
graphName
- the graph name to add.- Returns:
- This builder for chaining.
-
from
Description copied from interface:DatasetClause
Add the "FROM" graph name.- Specified by:
from
in interfaceDatasetClause<ConstructBuilder>
- Parameters:
graphName
- the graph name to add.- Returns:
- This builder for chaining.
-
addOrderBy
Description copied from interface:SolutionModifierClause
Add an ascending order by. Use ExprFactory or NodeValue static or the AbstractQueryBuilder.makeExpr methods to create the expression.- Specified by:
addOrderBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
orderBy
- The expression to order by.- Returns:
- This builder for chaining.
- See Also:
-
addOrderBy
Description copied from interface:SolutionModifierClause
Add an ascending order by.- Specified by:
addOrderBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
orderBy
- The object to order by.- Returns:
- This builder for chaining.
-
addOrderBy
Description copied from interface:SolutionModifierClause
Add an ascending order by.- Specified by:
addOrderBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
orderBy
- The SortCondition to order by.- Returns:
- This builder for chaining.
-
addOrderBy
Description copied from interface:SolutionModifierClause
Add an order by with direction specified.- Specified by:
addOrderBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
orderBy
- The expression to order by.order
- The direction to order.- Returns:
- This builder for chaining.
-
addOrderBy
Description copied from interface:SolutionModifierClause
Add an order by with direction specified.- Specified by:
addOrderBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
orderBy
- The object to order by.order
- The direction to order.- Returns:
- This builder for chaining.
-
addGroupBy
Description copied from interface:SolutionModifierClause
Add a variable to the group by clause.- Specified by:
addGroupBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
groupBy
- The object to group by.- Returns:
- This builder for chaining.
-
addGroupBy
Description copied from interface:SolutionModifierClause
Add an expression to the group by clause. The expression may be created from a string using the makeExpr() method.- Specified by:
addGroupBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
groupBy
- The expression to add.
-
addGroupBy
Description copied from interface:SolutionModifierClause
Add var and expression to the group by clause.- Specified by:
addGroupBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
var
- The variable to add.expr
- The expression to add.
-
addGroupBy
Description copied from interface:SolutionModifierClause
Add var and expression to the group by clause.- Specified by:
addGroupBy
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
var
- The variable to add.expr
- The expression to add.
-
addHaving
Description copied from interface:SolutionModifierClause
Add a having expression.- Specified by:
addHaving
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
having
- Expression to evaluate for the having.- Returns:
- This builder for chaining.
-
addHaving
Description copied from interface:SolutionModifierClause
Add a having expression. Use ExprFactory or NodeValue static or the AbstractQueryBuilder.makeExpr methods to create the expression.- Specified by:
addHaving
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
expression
- Expression to evaluate for the having.- Returns:
- This builder for chaining.
- See Also:
-
addHaving
Description copied from interface:SolutionModifierClause
Add a having expression.- Specified by:
addHaving
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
var
- the variable to have.- Returns:
- This builder for chaining.
-
setLimit
Description copied from interface:SolutionModifierClause
Set the limit. Setting the limit to 0 (zero) sets no limit.- Specified by:
setLimit
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
limit
- the maximum number of results to return.- Returns:
- This builder for chaining.
-
setOffset
Description copied from interface:SolutionModifierClause
Set the offset. Setting the offset to 0 (zero) sets no offset.- Specified by:
setOffset
in interfaceSolutionModifierClause<ConstructBuilder>
- Parameters:
offset
- the number of results to skip before returning results..- Returns:
- This builder for chaining.
-
addWhere
Description copied from interface:WhereClause
Adds a triple path to the where clause.- Specified by:
addWhere
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The triple path to add- Returns:
- This Builder for chaining.
-
addWhere
Description copied from interface:WhereClause
Adds a collections of triple paths to the where clause.- Specified by:
addWhere
in interfaceWhereClause<ConstructBuilder>
- Parameters:
collection
- The collection of triple paths to add- Returns:
- This Builder for chaining.
-
addWhere
Description copied from interface:WhereClause
Adds a triple to the where clause.- Specified by:
addWhere
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The triple to add- Returns:
- This Builder for chaining.
-
addWhere
Description copied from interface:WhereClause
Adds a triple to the where clause.- Specified by:
addWhere
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The triple to add- Returns:
- This Builder for chaining.
-
addWhere
Description copied from interface:WhereClause
Adds a triple or triple path to the where clause. SeeAbstractQueryBuilder.makeTriplePath(java.lang.Object, java.lang.Object, java.lang.Object)
for conversion of the param values.- Specified by:
addWhere
in interfaceWhereClause<ConstructBuilder>
- Parameters:
s
- The subject.p
- The predicate.o
- The object.- Returns:
- This Builder for chaining.
-
addWhereValueVar
Description copied from interface:WhereClause
Add a variable or variable and values to the value statement. The first var (or first item in a collection) is converted to a variable using the makeVar strategy. A variable may be added multiple times, doing so will append values to the list of variable values. The order in which variables are added to the values table is preserved. Adding a collection as the var will use the first object in the collection as the var and the remaining objects as values. Values are created using makeNode() strategy except that null values are converted to UNDEF.- Specified by:
addWhereValueVar
in interfaceWhereClause<ConstructBuilder>
- Parameters:
var
- The variable or collection to add.- Returns:
- The builder for chaining.
- See Also:
-
addWhereValueVar
Description copied from interface:WhereClause
Add a variable and values to the value statement. The var is converted to a variable using the makeVar strategy. A variable may be added multiple times, doing so will append values to the list of variable values. The order in which variables are added to the values table is preserved. Values are created using makeNode() strategy except that null values are converted to UNDEF.- Specified by:
addWhereValueVar
in interfaceWhereClause<ConstructBuilder>
- Parameters:
var
- The variable to add.values
- The values for the variable- Returns:
- The builder for chaining.
- See Also:
-
addWhereValueVars
Description copied from interface:WhereClause
Add a data table to the value statement. Each key in the map is used converted into a variable using the makeVar strategy. The order in which variables are added to the values table is preserved. Variables are added in the iteration order for the map. It may be advisable to use a LinkedHashMap to preserver the insert order.- Specified by:
addWhereValueVars
in interfaceWhereClause<ConstructBuilder>
- Parameters:
dataTable
- The data table to add.- Returns:
- The builder for chaining.
- See Also:
-
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)
-
addWhereValueRow
Description copied from interface:WhereClause
Add objects as a row of values. This method is different from the other methods in that the values are appended to each of the variables in the clause. There must be sufficient entries in the list to provide data for each variable in the table. Values objects are converted to nodes using the makeNode strategy. Variables will always be in the order added to the values table.- Specified by:
addWhereValueRow
in interfaceWhereClause<ConstructBuilder>
- Parameters:
values
- the collection of values to add.- Returns:
- The builder for chaining.
- See Also:
-
addWhereValueRow
Description copied from interface:WhereClause
Add a collection of objects as row of values. This method is different from the other methods in that the values are appended to each of the variables in the clause. There must be sufficient entries in the list to provide data for each variable in the table. Values objects are converted to nodes using the makeNode strategy. Variables will always be in the order added to the values table.- Specified by:
addWhereValueRow
in interfaceWhereClause<ConstructBuilder>
- Parameters:
values
- the collection of values to add.- Returns:
- The builder for chaining.
- See Also:
-
getWhereValuesVars
Description copied from interface:WhereClause
Get an unmodifiable list of vars from the where clause values in the order that they appear in the values table.- Specified by:
getWhereValuesVars
in interfaceWhereClause<ConstructBuilder>
- Returns:
- an unmodifiable list of vars.
-
getWhereValuesMap
Description copied from interface:WhereClause
Get an unmodifiable map of vars from the where clause values and their values. Null values are considered as UNDEF values.- Specified by:
getWhereValuesMap
in interfaceWhereClause<ConstructBuilder>
- Returns:
- an unmodifiable map of vars and their values.
-
clearWhereValues
Description copied from interface:WhereClause
Reset the values table in the where clause to the initial undefined state. Used primarily to reset the builder values table to a known state.- Specified by:
clearWhereValues
in interfaceWhereClause<ConstructBuilder>
-
addOptional
Description copied from interface:WhereClause
Adds an optional triple path to the where clause.- Specified by:
addOptional
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The triple path to add- Returns:
- This Builder for chaining.
-
addOptional
Description copied from interface:WhereClause
Adds a collection of triple paths as the optional clauses.- Specified by:
addOptional
in interfaceWhereClause<ConstructBuilder>
- Parameters:
collection
- The collection of triple paths to add- Returns:
- This Builder for chaining.
-
addOptional
Description copied from interface:WhereClause
Adds an optional triple to the where clause.- Specified by:
addOptional
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The triple to add- Returns:
- This Builder for chaining.
-
addOptional
Description copied from interface:WhereClause
Adds an optional group pattern to the where clause.- Specified by:
addOptional
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The select builder to add as an optional pattern- Returns:
- This Builder for chaining.
-
addOptional
Description copied from interface:WhereClause
Adds an optional triple as to the where clause.- Specified by:
addOptional
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The triple to add- Returns:
- This Builder for chaining.
-
addOptional
Description copied from interface:WhereClause
Adds an optional triple or triple path to the where clause. SeeAbstractQueryBuilder.makeTriplePath(java.lang.Object, java.lang.Object, java.lang.Object)
for conversion of the param values.- Specified by:
addOptional
in interfaceWhereClause<ConstructBuilder>
- Parameters:
s
- The subject.p
- The predicate.o
- The object.- Returns:
- This Builder for chaining.
-
addFilter
Description copied from interface:WhereClause
Adds a filter to the where clause Use ExprFactory or NodeValue static or the AbstractQueryBuilder.makeExpr methods to create the expression.- Specified by:
addFilter
in interfaceWhereClause<ConstructBuilder>
- Parameters:
expr
- the expression to evaluate for the filter.- Returns:
- This Builder for chaining.
- See Also:
-
addFilter
Description copied from interface:WhereClause
Adds a filter to the where clause- Specified by:
addFilter
in interfaceWhereClause<ConstructBuilder>
- Parameters:
s
- the expression to evaluate for the filter.- Returns:
- This Builder for chaining.
-
addSubQuery
Description copied from interface:WhereClause
Add a sub query.- Specified by:
addSubQuery
in interfaceWhereClause<ConstructBuilder>
- Parameters:
subQuery
- The subquery as defined by a SelectBuilder.- Returns:
- This builder for chaining.
-
addUnion
Description copied from interface:WhereClause
Add a union.- Specified by:
addUnion
in interfaceWhereClause<ConstructBuilder>
- Parameters:
subQuery
- The union as defined by a SelectBuilder.- Returns:
- This builder for chaining.
-
addGraph
Description copied from interface:WhereClause
Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern. SeeAbstractQueryBuilder.makeNode(java.lang.Object)
for conversion of the graph param.- Specified by:
addGraph
in interfaceWhereClause<ConstructBuilder>
- Parameters:
graph
- The iri or variable identifying the graph.subQuery
- The graph to add.- Returns:
- This builder for chaining.
-
addGraph
Description copied from interface:WhereClause
Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern. SeeAbstractQueryBuilder.makeNode(java.lang.Object)
for conversion of the graph param.- Specified by:
addGraph
in interfaceWhereClause<ConstructBuilder>
- Parameters:
graph
- The iri or variable identifying the graph.triple
- a single s, p, o triple for the query.- Returns:
- This builder for chaining.
-
addGraph
Description copied from interface:WhereClause
Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern. SeeAbstractQueryBuilder.makeNode(java.lang.Object)
for conversion of the graph param.- Specified by:
addGraph
in interfaceWhereClause<ConstructBuilder>
- Parameters:
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.- Returns:
- This builder for chaining.
-
addGraph
Description copied from interface:WhereClause
Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern. SeeAbstractQueryBuilder.makeNode(java.lang.Object)
for conversion of the graph param.- Specified by:
addGraph
in interfaceWhereClause<ConstructBuilder>
- Parameters:
graph
- The iri or variable identifying the graph.triple
- a single triple for the query.- Returns:
- This builder for chaining.
-
addGraph
Description copied from interface:WhereClause
Add a graph statement to the query as per http://www.w3.org/TR/2013/REC-sparql11 -query-20130321/#rGraphGraphPattern. SeeAbstractQueryBuilder.makeNode(java.lang.Object)
for conversion of the graph param.- Specified by:
addGraph
in interfaceWhereClause<ConstructBuilder>
- Parameters:
graph
- The iri or variable identifying the graph.triplePath
- a single triple path for the query.- Returns:
- This builder for chaining.
-
addGraph
public ConstructBuilder addGraph(Object graph, Collection<org.apache.jena.sparql.core.TriplePath> collection) Description copied from interface:WhereClause
Adds a collection of triple paths as the optional clauses.- Specified by:
addGraph
in interfaceWhereClause<ConstructBuilder>
- Parameters:
graph
- The iri or variable identifying the graph.collection
- The collection of triple paths to add- Returns:
- This Builder for chaining.
-
addBind
Description copied from interface:WhereClause
Add a bind statement to the query * http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rGraphGraphPattern.- Specified by:
addBind
in interfaceWhereClause<ConstructBuilder>
- Parameters:
expression
- The expression to bind to the var.var
- The variable to bind to.- Returns:
- This builder for chaining.
-
addBind
Description copied from interface:WhereClause
Add a bind statement to the query http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rGraphGraphPattern.- Specified by:
addBind
in interfaceWhereClause<ConstructBuilder>
- Parameters:
expression
- The expression to bind to the var.var
- The variable to bind to.- Returns:
- This builder for chaining.
-
addConstruct
Description copied from interface:ConstructClause
Add a construct triple.- Specified by:
addConstruct
in interfaceConstructClause<ConstructBuilder>
- Parameters:
t
- The triple to add.- Returns:
- The builder for chaining.
-
addConstruct
Description copied from interface:ConstructClause
Add a construct triple.- Specified by:
addConstruct
in interfaceConstructClause<ConstructBuilder>
- Parameters:
t
- The triple to add.- Returns:
- The builder for chaining.
-
addConstruct
Description copied from interface:ConstructClause
Add a construct triple. SeeAbstractQueryBuilder.makeNode(java.lang.Object)
for conversion of the param values.- Specified by:
addConstruct
in interfaceConstructClause<ConstructBuilder>
- Parameters:
s
- The subject of the triple,p
- The predicate of the triple.o
- The object of the triple.- Returns:
- the builder for chaining.
-
list
Deprecated.Description copied from interface:WhereClause
Create a list node from a list of objects as per RDF Collections. http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#collections SeeAbstractQueryBuilder.makeNode(java.lang.Object)
for conversion of the param values.usage:
- list( param1, param2, param3, ... )
- addWhere( list( param1, param2, param3, ... ), p, o )
- addOptional( list( param1, param2, param3, ... ), p, o )
- Specified by:
list
in interfaceWhereClause<ConstructBuilder>
- Parameters:
objs
- the list of objects for the list.- Returns:
- the first blank node in the list.
-
addMinus
Description copied from interface:WhereClause
Add a minus clause to the query. https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rMinusGraphPattern- Specified by:
addMinus
in interfaceWhereClause<ConstructBuilder>
- Parameters:
t
- The select builder to add as a minus pattern- Returns:
- this builder for chaining
-