Module org.apache.jena.querybuilder
Class AggregationHandler
java.lang.Object
org.apache.jena.arq.querybuilder.handlers.AggregationHandler
- All Implemented Interfaces:
Handler
Class to handle manipulation the aggregation variables in the query.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.apache.jena.sparql.expr.Expr expr, org.apache.jena.sparql.core.Var var) Add and expression aggregator and variable to the mapping.addAll
(AggregationHandler handler) Add all the aggregations from the other handler.void
build()
Called by the build process for this handler to perform any adjustments to the query before the build completes.org.apache.jena.query.Query
getQuery()
Get the query we are executing against.void
Set the values for variables managed by the handler implementation.
-
Constructor Details
-
AggregationHandler
public AggregationHandler(org.apache.jena.query.Query query) Constructor.- Parameters:
query
- the query to handle.
-
-
Method Details
-
addAll
Add all the aggregations from the other handler.- Parameters:
handler
- The other handler.- Returns:
- This handler for chaining.
-
getQuery
public org.apache.jena.query.Query getQuery()Get the query we are executing against.- Returns:
- the query.
-
setVars
Description copied from interface:Handler
Set the values for variables managed by the handler implementation. This method is called by the builder to set values handled by this Handler implementation. -
build
public void build()Description copied from interface:Handler
Called by the build process for this handler to perform any adjustments to the query before the build completes. The adjustments are made after setVars() has been called. -
add
public void add(org.apache.jena.sparql.expr.Expr expr, org.apache.jena.sparql.core.Var var) Add and expression aggregator and variable to the mapping. if the expr parameter is not an instance of ExprAggregator then no action is taken.- Parameters:
expr
- The expression to add.var
- The variable that it is bound to.
-