Interface SelectClause<T extends AbstractQueryBuilder<T>>

  • Type Parameters:
    T - The Builder type that the clause is part of.
    All Known Implementing Classes:
    DescribeBuilder, SelectBuilder

    public interface SelectClause<T extends AbstractQueryBuilder<T>>
    Interface that defines the SelectClause as per http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#rSelectClause
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T addVar​(java.lang.Object var)
      Adds a variable to the select clause.
      T addVar​(java.lang.String expr, java.lang.Object var)
      Adds an expression as variable to the select statement.
      T addVar​(Expr expr, java.lang.Object var)
      Adds an expression as variable to the select statement.
      SelectHandler getSelectHandler()
      Returns the select handler for this clause
      java.util.List<Var> getVars()  
    • Method Detail

      • getSelectHandler

        SelectHandler getSelectHandler()
        Returns the select handler for this clause
        Returns:
        The SelectHandler that the clause is using
      • addVar

        T addVar​(java.lang.Object var)
        Adds a variable to the select clause. A variable may only be added once. Attempting to add the same variable multiple times will be silently ignored.
        Parameters:
        var - The variable to add.
        Returns:
        This builder for chaining.
      • addVar

        T addVar​(Expr expr,
                 java.lang.Object var)
        Adds an expression as variable to the select statement. Creates an '(Expression as Var)' to the select statement. A variable may only be added once. Attempting to add the same variable multiple times will be silently ignored.
        Parameters:
        expr - The expression to be added
        var - The variable to add.
        Returns:
        This builder for chaining.
      • addVar

        T addVar​(java.lang.String expr,
                 java.lang.Object var)
          throws ParseException
        Adds an expression as variable to the select statement. Creates an '(Expression as Var)' to the select statement. A variable may only be added once. Attempting to add the same variable multiple times will be silently ignored.
        Parameters:
        expr - The expression to be added
        var - The variable to add.
        Returns:
        This builder for chaining.
        Throws:
        ParseException - If the expression can not be parsed.
      • getVars

        java.util.List<Var> getVars()
        Returns:
        A list of all the variables that have been added.