Class AggregationHandler

java.lang.Object
org.apache.jena.arq.querybuilder.handlers.AggregationHandler
All Implemented Interfaces:
Handler

public class AggregationHandler extends Object implements Handler
Class to handle manipulation the aggregation variables in the query.
  • Constructor Details

    • AggregationHandler

      public AggregationHandler(Query query)
      Constructor.
      Parameters:
      query - the query to handle.
  • Method Details

    • addAll

      public AggregationHandler addAll(AggregationHandler handler)
      Add all the aggregations from the other handler.
      Parameters:
      handler - The other handler.
      Returns:
      This handler for chaining.
    • getQuery

      public Query getQuery()
      Get the query we are executing against.
      Returns:
      the query.
    • setVars

      public void setVars(Map<Var,Node> values)
      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.
      Specified by:
      setVars in interface Handler
      Parameters:
      values - The map of variable to node value.
    • 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.
      Specified by:
      build in interface Handler
    • add

      public void add(Expr expr, 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.