org.eclipse.rdf4j.query.algebra.helpers

## Class TupleExprs

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.helpers.TupleExprs

-     public class TupleExprs
      extends Object

  Utility methods for `TupleExpr` objects.
  Author:
    Jeen Broekstra

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TupleExprs()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `containsProjection(TupleExpr t)` Deprecated. since 2.0. Use `containsSubquery(TupleExpr)` instead.
    `static boolean` | `containsSubquery(TupleExpr t)` Verifies if the supplied `TupleExpr` contains a `Projection` with the subquery flag set to true (default).
    `static Var` | `createConstVar(Value value)` Creates an (anonymous) Var representing a constant value.
    `static List<TupleExpr>` | `getChildren(TupleExpr t)` Returns `TupleExpr` children of the given node.
    `static String` | `getConstVarName(Value value)`
    `static boolean` | `isFilterExistsFunction(TupleExpr expr)` Verifies if the supplied expression is a FILTER (NOT) EXISTS operation
    `static boolean` | `isGraphPatternGroup(TupleExpr expr)` Deprecated. since 3.2. Use `isVariableScopeChange(TupleExpr)` instead.
    `static boolean` | `isVariableScopeChange(TupleExpr expr)` Verifies if the supplied `TupleExpr` represents a variable scope change.

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

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

- - ### Constructor Detail

    - #### TupleExprs

          public TupleExprs()

  - ### Method Detail

    - #### containsSubquery

          public static boolean containsSubquery(TupleExpr t)

      Verifies if the supplied `TupleExpr` contains a `Projection` with the subquery flag set to true (default). If the supplied TupleExpr is a `Join` or contains a `Join`, projections inside that Join's arguments will not be taken into account.
      Parameters:
        `t` - a tuple expression.
      Returns:
        `true` if the TupleExpr contains a subquery projection (outside of a Join), `false` otherwise.

    - #### isVariableScopeChange

          public static boolean isVariableScopeChange(TupleExpr expr)

      Verifies if the supplied `TupleExpr` represents a variable scope change.
      Parameters:
        `expr` - a `TupleExpr`
      Returns:
        `true` if the `TupleExpr` implements `VariableScopeChange` and has its scope change flag set to `true`, `false` otherwise.

    - #### isGraphPatternGroup

          @Deprecated
          public static boolean isGraphPatternGroup(TupleExpr expr)

      Deprecated. since 3.2. Use `isVariableScopeChange(TupleExpr)` instead.
      Verifies if the supplied `TupleExpr` represents a group graph pattern.
      Parameters:
        `expr` - a `TupleExpr`
      Returns:
        `true` if the `TupleExpr` is `GraphPatternGroupable` and has its graph pattern group flag set to `true`, `false` otherwise.

    - #### containsProjection

          @Deprecated
          public static boolean containsProjection(TupleExpr t)

      Deprecated. since 2.0. Use `containsSubquery(TupleExpr)` instead.
      Verifies if the supplied `TupleExpr` contains a `Projection`. If the supplied TupleExpr is a `Join` or contains a `Join`, projections inside that Join's arguments will not be taken into account.
      Parameters:
        `t` - a tuple expression.
      Returns:
        `true` if the TupleExpr contains a projection (outside of a Join), `false` otherwise.

    - #### getChildren

          public static List<TupleExpr> getChildren(TupleExpr t)

      Returns `TupleExpr` children of the given node.
      Parameters:
        `t` - a tuple expression.
      Returns:
        a list of TupleExpr children.

    - #### createConstVar

          public static Var createConstVar(Value value)

      Creates an (anonymous) Var representing a constant value. The variable name will be derived from the actual value to guarantee uniqueness.
      Parameters:
        `value` -
      Returns:
        an (anonymous) Var representing a constant value.

    - #### getConstVarName

          public static String getConstVarName(Value value)

    - #### isFilterExistsFunction

          public static boolean isFilterExistsFunction(TupleExpr expr)

      Verifies if the supplied expression is a FILTER (NOT) EXISTS operation
      Parameters:
        `expr` - a tuple expression
      Returns:
        true if the supplied expression is a FILTER (NOT) EXISTS operation, false otherwise.

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