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 Summary

    Constructors
    Constructor
    Description
    SolutionModifierHandler(org.apache.jena.query.Query query)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAll(SolutionModifierHandler solutionModifier)
    Copy all the modifications from the Solution Modifier argument
    void
    addGroupBy(org.apache.jena.sparql.core.Var var)
    Add a node to the group by clause.
    void
    addGroupBy(org.apache.jena.sparql.core.Var var, org.apache.jena.sparql.expr.Expr expr)
    Add var and expression to the group by clause.
    void
    addGroupBy(org.apache.jena.sparql.expr.Expr expr)
    Add an expression to the group by clause.
    void
    addHaving(String expression)
    Add a having expression.
    void
    addHaving(org.apache.jena.sparql.core.Var var)
    Add a variable to the having clause.
    void
    addHaving(org.apache.jena.sparql.expr.Expr expr)
    Add an expression to the having clause.
    void
    addOrderBy(org.apache.jena.query.SortCondition condition)
    Add an order by clause
    void
    addOrderBy(org.apache.jena.sparql.core.Var var)
    Add a var to the order by clause.
    void
    addOrderBy(org.apache.jena.sparql.core.Var var, Order order)
    Add a var to the order by clause.
    void
    addOrderBy(org.apache.jena.sparql.expr.Expr expr)
    Add an expression to the order by clause.
    void
    addOrderBy(org.apache.jena.sparql.expr.Expr expr, Order order)
    Add an expression to the order by clause.
    void
    Called by the build process for this handler to perform any adjustments to the query before the build completes.
    void
    setLimit(int limit)
    Set the limit for the number of results to return.
    void
    setOffset(int offset)
    Set the offset for the results to return.
    void
    setVars(Map<org.apache.jena.sparql.core.Var,org.apache.jena.graph.Node> values)
    Set the values for variables managed by the handler implementation.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SolutionModifierHandler

      public SolutionModifierHandler(org.apache.jena.query.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(org.apache.jena.query.SortCondition condition)
      Add an order by clause
      Parameters:
      condition - The SortCondition to add to the order by.
    • addOrderBy

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

      public void addOrderBy(org.apache.jena.sparql.expr.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(org.apache.jena.sparql.core.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(org.apache.jena.sparql.core.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(org.apache.jena.sparql.expr.Expr expr)
      Add an expression to the group by clause.
      Parameters:
      expr - The expression to add.
    • addGroupBy

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

      public void addGroupBy(org.apache.jena.sparql.core.Var var, org.apache.jena.sparql.expr.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(org.apache.jena.sparql.core.Var var)
      Add a variable to the having clause.
      Parameters:
      var - The variable to add.
    • addHaving

      public void addHaving(org.apache.jena.sparql.expr.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<org.apache.jena.sparql.core.Var,org.apache.jena.graph.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