Class SolutionModifierHandler

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

public class SolutionModifierHandler extends Object implements Handler
The Solution Modifier handler.
  • Constructor Details

    • SolutionModifierHandler

      public SolutionModifierHandler(Query query)
      Constructor
      Parameters:
      query - The query to modify.
  • Method Details

    • addAll

      public void addAll(SolutionModifierHandler solutionModifier)
      Copy all the modifications from the Solution Modifier argument
      Parameters:
      solutionModifier - The solution modifier to copy from.
    • addOrderBy

      public void addOrderBy(SortCondition condition)
      Add an order by clause
      Parameters:
      condition - The SortCondition to add to the order by.
    • addOrderBy

      public void addOrderBy(Expr expr)
      Add an expression to the order by clause. Sorts in Default order.
      Parameters:
      expr - The expression to add.
    • addOrderBy

      public void addOrderBy(Expr expr, Order order)
      Add an expression to the order by clause.
      Parameters:
      expr - The expression to add.
      order - The direction of the ordering.
    • addOrderBy

      public void addOrderBy(Var var)
      Add a var to the order by clause. Sorts in default order
      Parameters:
      var - The var to use for sorting
    • addOrderBy

      public void addOrderBy(Var var, Order order)
      Add a var to the order by clause.
      Parameters:
      var - The var to sort by.
      order - The direction of the ordering.
    • addGroupBy

      public void addGroupBy(Expr expr)
      Add an expression to the group by clause.
      Parameters:
      expr - The expression to add.
    • addGroupBy

      public void addGroupBy(Var var)
      Add a node to the group by clause.
      Parameters:
      var - The variable to add.
    • addGroupBy

      public void addGroupBy(Var var, Expr expr)
      Add var and expression to the group by clause.
      Parameters:
      var - The variable to add.
      expr - The expression to add.
    • addHaving

      public void addHaving(String expression)
      Add a having expression.
      Parameters:
      expression - The expression to add
    • addHaving

      public void addHaving(Var var)
      Add a variable to the having clause.
      Parameters:
      var - The variable to add.
    • addHaving

      public void addHaving(Expr expr)
      Add an expression to the having clause.
      Parameters:
      expr - The expression to add.
    • setLimit

      public void setLimit(int limit)
      Set the limit for the number of results to return. Setting the limit to zero (0) or removes the limit.
      Parameters:
      limit - The limit to set.
    • setOffset

      public void setOffset(int offset)
      Set the offset for the results to return. Setting the offset to zero (0) or removes the offset.
      Parameters:
      offset - The offset to set.
    • 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