org.eclipse.rdf4j.sparqlbuilder.constraint

## Class Expressions

- java.lang.Object
- - org.eclipse.rdf4j.sparqlbuilder.constraint.Expressions

-     public class Expressions
      extends Object

  A class with static methods to create SPARQL expressions. Obviously there's some more flushing out TODO still
  See Also:
    SPARQL Function Definitions

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Expression<?>` | `abs(Number operand)` `ABS(operand`)
    `static Expression<?>` | `abs(Operand operand)` `ABS(operand`)
    `static Expression<?>` | `add(Operand... operands)` `operand1 + operand2 + ...`
    `static Expression<?>` | `and(Operand... operands)` `operand1 && operand2 && ...`
    `static Aggregate` | `avg(Operand operand)` `avg(...)`
    `static Expression<?>` | `bnode()` `BNODE()`
    `static Expression<?>` | `bnode(RdfLiteral<?> literal)` `BNODE(operand)`
    `static Expression<?>` | `bnode(String literal)` `BNODE(operand)`
    `static Expression<?>` | `bound(Variable var)` `BOUND(operand)`
    `static Expression<?>` | `ceil(Operand operand)` `CEIL(operand)`
    `static Expression<?>` | `coalesce(Operand... operands)` `COALESCE(operand1, operand2, ...`
    `static Expression<?>` | `concat(Operand... operands)` `CONCAT(operand1, operand2, ...`
    `static Aggregate` | `count(Operand operand)` `count()`
    `static Aggregate` | `countAll()`
    `static Expression<?>` | `custom(Iri functionIri, Operand... operands)`
    `static Expression<?>` | `divide(Operand... operands)` `operand1 / operand2 / ...`
    `static Expression<?>` | `equals(Operand left, Operand right)` `left = right`
    `static Expression<?>` | `function(SparqlFunction function, Operand... operands)` Too lazy at the moment.
    `static Aggregate` | `group_concat(Operand... operands)`
    `static Aggregate` | `group_concat(String separator, Operand... operands)`
    `static Expression<?>` | `gt(Number left, Number right)` `left > right`
    `static Expression<?>` | `gt(Number left, Operand right)` `left > right`
    `static Expression<?>` | `gt(Operand left, Number right)` `left > right`
    `static Expression<?>` | `gt(Operand left, Operand right)` `left > right`
    `static Expression<?>` | `gte(Operand left, Operand right)` `left >= right`
    `static Expression<?>` | `in(Operand searchTerm, Operand... expressions)` `operand IN (expression1, expression2...)`
    `static Expression<?>` | `lt(Number left, Number right)` `left < right`
    `static Expression<?>` | `lt(Number left, Operand right)` `left < right`
    `static Expression<?>` | `lt(Operand left, Number right)` `left < right`
    `static Expression<?>` | `lt(Operand left, Operand right)` `left < right`
    `static Expression<?>` | `lte(Operand left, Operand right)` `left <= right`
    `static Aggregate` | `max(Operand operand)`
    `static Aggregate` | `min(Operand operand)`
    `static Expression<?>` | `minus(Operand operand)` `-operand`
    `static Expression<?>` | `multiply(Operand... operands)` `operand1 * operand2 * ...`
    `static Expression<?>` | `not(Operand operand)` `!operand`
    `static Expression<?>` | `notEquals(Operand left, Operand right)` `left != right`
    `static Expression<?>` | `notIn(Operand searchTerm, Operand... expressions)` `operand NOT IN (expression1, expression2...)`
    `static Expression<?>` | `or(Operand... operands)` `operand1 || operand2 || ...`
    `static Expression<?>` | `plus(Operand operand)` `+operand`
    `static Expression<?>` | `regex(Operand testString, Operand pattern)` `REGEX(testString, pattern)```
    `static Expression<?>` | `regex(Operand testString, Operand pattern, Operand flags)` `REGEX(testString, pattern, flags)```
    `static Expression<?>` | `regex(Operand testString, String pattern)` `REGEX(testString, pattern)```
    `static Expression<?>` | `regex(Operand testString, String pattern, String flags)` `REGEX(testString, pattern, flags)```
    `static Aggregate` | `sample(Operand operand)`
    `static Expression<?>` | `str(Operand operand)` `STR(literal)` or `STR(iri)`
    `static Expression<?>` | `subtract(Operand... operands)` `operand1 - operand2 - ...`
    `static Aggregate` | `sum(Operand operand)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### abs

          public static Expression<?> abs(Number operand)

      `ABS(operand`)
      Parameters:
        `operand` - the argument to the absolute value function
      Returns:
        an ABS() function
      See Also:
        SPARQL ABS Function

    - #### abs

          public static Expression<?> abs(Operand operand)

      `ABS(operand`)
      Parameters:
        `operand` - the argument to the absolute value function
      Returns:
        an ABS() function
      See Also:
        SPARQL ABS Function

    - #### bnode

          public static Expression<?> bnode()

      `BNODE()`
      Returns:
        a no-arg BNODE() function
      See Also:
        SPARQL BNODE Function

    - #### bnode

          public static Expression<?> bnode(RdfLiteral<?> literal)

      `BNODE(operand)`
      Parameters:
        `literal` - the RDF literal argument to the function
      Returns:
        a BNODE() function
      See Also:
        SPARQL BNODE Function

    - #### bnode

          public static Expression<?> bnode(String literal)

      `BNODE(operand)`
      Parameters:
        `literal` - the String literal argument to the function
      Returns:
        a BNODE() function
      See Also:
        SPARQL BNODE Function

    - #### bound

          public static Expression<?> bound(Variable var)

      `BOUND(operand)`
      Parameters:
        `var` - the SPARQL variable argument to the function
      Returns:
        a BOUND() function
      See Also:
        SPARQL BOUND Function

    - #### ceil

          public static Expression<?> ceil(Operand operand)

      `CEIL(operand)`
      Parameters:
        `operand` - the argument to the function
      Returns:
        a CEIL() function
      See Also:
        SPARQL CEIL Function

    - #### coalesce

          public static Expression<?> coalesce(Operand... operands)

      `COALESCE(operand1, operand2, ... , operandN)`
      Parameters:
        `operands` - the arguments to the function
      Returns:
        a COALESCE() function
      See Also:
        SPARQL COALESCE Function

    - #### concat

          public static Expression<?> concat(Operand... operands)

      `CONCAT(operand1, operand2, ... , operandN)`
      Parameters:
        `operands` - the arguments to the function
      Returns:
        a CONCAT() function
      See Also:
        SPARQL CONCAT Function

    - #### regex

          public static Expression<?> regex(Operand testString,
                                            String pattern)

      `REGEX(testString, pattern)```
      Parameters:
        `testString` - the text to match against
        `pattern` - the regex pattern to match
      Returns:
        a REGEX() function
      See Also:
        SPARQL REGEX Function

    - #### regex

          public static Expression<?> regex(Operand testString,
                                            String pattern,
                                            String flags)

      `REGEX(testString, pattern, flags)```
      Parameters:
        `testString` - the text to match against
        `pattern` - the regular expression pattern to match
        `flags` - flags to specify matching options
      Returns:
        a REGEX() function
      See Also:
        SPARQL REGEX Function

    - #### regex

          public static Expression<?> regex(Operand testString,
                                            Operand pattern)

      `REGEX(testString, pattern)```
      Parameters:
        `testString` - the text to match against
        `pattern` - the regex pattern to match
      Returns:
        a REGEX() function
      See Also:
        SPARQL REGEX Function

    - #### regex

          public static Expression<?> regex(Operand testString,
                                            Operand pattern,
                                            Operand flags)

      `REGEX(testString, pattern, flags)```
      Parameters:
        `testString` - the text to match against
        `pattern` - the regular expression pattern to match
        `flags` - flags to specify matching options
      Returns:
        a REGEX() function
      See Also:
        SPARQL REGEX Function

    - #### str

          public static Expression<?> str(Operand operand)

      `STR(literal)` or `STR(iri)`
      Parameters:
        `operand` - the arg to convert to a string
      Returns:
        a `STR()` function
      See Also:
        SPARQL STR Function

    - #### custom

          public static Expression<?> custom(Iri functionIri,
                                             Operand... operands)

    - #### in

          public static Expression<?> in(Operand searchTerm,
                                         Operand... expressions)

      `operand IN (expression1, expression2...)`
      Parameters:
        `searchTerm` -
        `expressions` -
      Returns:
        an `IN` function
      See Also:
        SPARQL IN Function

    - #### notIn

          public static Expression<?> notIn(Operand searchTerm,
                                            Operand... expressions)

      `operand NOT IN (expression1, expression2...)`
      Parameters:
        `searchTerm` -
        `expressions` -
      Returns:
        an `NOT IN` function
      See Also:
        SPARQL NOT IN Function

    - #### function

          public static Expression<?> function(SparqlFunction function,
                                               Operand... operands)

      Too lazy at the moment. Make the rest of the functions this way for now.
      Parameters:
        `function` - a SPARQL Function
        `operands` - arguments to the function
      Returns:
        a function object of the given `function` type and `operands`

    - #### not

          public static Expression<?> not(Operand operand)

      `!operand`
      Parameters:
        `operand` - argument to the function
      Returns:
        logical not operation
      See Also:
        SPARQL Operators

    - #### plus

          public static Expression<?> plus(Operand operand)

      `+operand`
      Parameters:
        `operand` - argument to the function
      Returns:
        unary plus operation
      See Also:
        SPARQL Operators

    - #### minus

          public static Expression<?> minus(Operand operand)

      `-operand`
      Parameters:
        `operand` - argument to the function
      Returns:
        unary minus operation
      See Also:
        SPARQL Operators

    - #### equals

          public static Expression<?> equals(Operand left,
                                             Operand right)

      `left = right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical equals operation
      See Also:
        SPARQL Operators

    - #### notEquals

          public static Expression<?> notEquals(Operand left,
                                                Operand right)

      `left != right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical not equals operation
      See Also:
        SPARQL Operators

    - #### gt

          public static Expression<?> gt(Number left,
                                         Number right)

      `left > right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical greater than operation
      See Also:
        SPARQL Operators

    - #### gt

          public static Expression<?> gt(Number left,
                                         Operand right)

      `left > right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical greater than operation
      See Also:
        SPARQL Operators

    - #### gt

          public static Expression<?> gt(Operand left,
                                         Number right)

      `left > right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical greater than operation
      See Also:
        SPARQL Operators

    - #### gt

          public static Expression<?> gt(Operand left,
                                         Operand right)

      `left > right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical greater than operation
      See Also:
        SPARQL Operators

    - #### gte

          public static Expression<?> gte(Operand left,
                                          Operand right)

      `left >= right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical greater than or equals operation
      See Also:
        SPARQL Operators

    - #### lt

          public static Expression<?> lt(Number left,
                                         Number right)

      `left < right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical less than operation
      See Also:
        SPARQL Operators

    - #### lt

          public static Expression<?> lt(Number left,
                                         Operand right)

      `left < right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical less than operation
      See Also:
        SPARQL Operators

    - #### lt

          public static Expression<?> lt(Operand left,
                                         Number right)

      `left < right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical less than operation
      See Also:
        SPARQL Operators

    - #### lt

          public static Expression<?> lt(Operand left,
                                         Operand right)

      `left < right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical less than operation
      See Also:
        SPARQL Operators

    - #### lte

          public static Expression<?> lte(Operand left,
                                          Operand right)

      `left <= right`
      Parameters:
        `left` - the left operand
        `right` - the right operand
      Returns:
        logical less than or equals operation
      See Also:
        SPARQL Operators

    - #### and

          public static Expression<?> and(Operand... operands)

      `operand1 && operand2 && ... operandN`
      Parameters:
        `operands` - the arguments
      Returns:
        logical and operation
      See Also:
        SPARQL Operators

    - #### or

          public static Expression<?> or(Operand... operands)

      `operand1 || operand2 || ... || operandN`
      Parameters:
        `operands` - the arguments
      Returns:
        logical or operation
      See Also:
        SPARQL Operators

    - #### add

          public static Expression<?> add(Operand... operands)

      `operand1 + operand2 + ... + operandN`
      Parameters:
        `operands` - the arguments
      Returns:
        arithmetic addition operation
      See Also:
        SPARQL Operators

    - #### subtract

          public static Expression<?> subtract(Operand... operands)

      `operand1 - operand2 - ... - operandN`
      Parameters:
        `operands` - the arguments
      Returns:
        arithmetic subtraction operation
      See Also:
        SPARQL Operators

    - #### multiply

          public static Expression<?> multiply(Operand... operands)

      `operand1 * operand2 * ... * operandN`
      Parameters:
        `operands` - the arguments
      Returns:
        arithmetic multiplication operation
      See Also:
        SPARQL Operators

    - #### divide

          public static Expression<?> divide(Operand... operands)

      `operand1 / operand2 / ... / operandN`
      Parameters:
        `operands` - the arguments
      Returns:
        arithmetic division operation
      See Also:
        SPARQL Operators

    - #### avg

          public static Aggregate avg(Operand operand)

      `avg(...)`
      Parameters:
        `operand` - the expression to average
      Returns:
        an avg aggregate function
      See Also:
        SPARQL aggregates

    - #### count

          public static Aggregate count(Operand operand)

      `count()`
      Parameters:
        `operand` - the expression to count
      Returns:
        a count aggregate
      See Also:
        SPARQL aggregates

    - #### countAll

          public static Aggregate countAll()

    - #### group_concat

          public static Aggregate group_concat(Operand... operands)

    - #### group_concat

          public static Aggregate group_concat(String separator,
                                               Operand... operands)

    - #### max

          public static Aggregate max(Operand operand)

    - #### min

          public static Aggregate min(Operand operand)

    - #### sample

          public static Aggregate sample(Operand operand)

    - #### sum

          public static Aggregate sum(Operand operand)

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.