Class LogicalOpUnfold

java.lang.Object
se.liu.ida.hefquin.engine.queryplan.logical.impl.LogicalOpUnfold
All Implemented Interfaces:
QueryPlanOperator, LogicalOperator, UnaryLogicalOp

public class LogicalOpUnfold extends Object implements UnaryLogicalOp
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.apache.jena.sparql.expr.Expr
     
    protected final org.apache.jena.sparql.core.Var
     
    protected final org.apache.jena.sparql.core.Var
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LogicalOpUnfold(org.apache.jena.sparql.expr.Expr expr, org.apache.jena.sparql.core.Var var1, org.apache.jena.sparql.core.Var var2)
    Create an unfold operator with the given expression and variables, where the second variable may be null (in case the UNFOLD clause does not contain two variables).
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addVariables(boolean var1IsCertain, boolean var2IsCertain, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
    Adds var1 and var2 (if not null) into the two given sets as per the given flags.
    protected void
    addVariables(org.apache.jena.sparql.expr.ExprFunction fct, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
    Adds var1 and var2 (if not null) into the two given sets depending on the given function expression.
    protected void
    addVariables(org.apache.jena.sparql.expr.Expr expr, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
    Returns true if it is not guaranteed that evaluating the given expression will result in a well-formed cdt:List literal that does not contain null values.
    protected void
    addVariables(org.apache.jena.sparql.expr.NodeValue nv, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
    Adds var1 and var2 (if not null) into the two given sets depending on the given NodeValue.
    boolean
     
    Returns the variables that can be expected in the solution mappings produced by this operator in the case that the input(s) to this operator contain solutions mappings with the given set(s) of variables.
    org.apache.jena.sparql.expr.Expr
     
    org.apache.jena.sparql.core.Var
     
    org.apache.jena.sparql.core.Var
     
    int
     
     
    void
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • expr

      protected final org.apache.jena.sparql.expr.Expr expr
    • var1

      protected final org.apache.jena.sparql.core.Var var1
    • var2

      protected final org.apache.jena.sparql.core.Var var2
  • Constructor Details

    • LogicalOpUnfold

      public LogicalOpUnfold(org.apache.jena.sparql.expr.Expr expr, org.apache.jena.sparql.core.Var var1, org.apache.jena.sparql.core.Var var2)
      Create an unfold operator with the given expression and variables, where the second variable may be null (in case the UNFOLD clause does not contain two variables).
  • Method Details

    • getExpr

      public org.apache.jena.sparql.expr.Expr getExpr()
    • getVar1

      public org.apache.jena.sparql.core.Var getVar1()
    • getVar2

      public org.apache.jena.sparql.core.Var getVar2()
    • getExpectedVariables

      public ExpectedVariables getExpectedVariables(ExpectedVariables... inputVars)
      Description copied from interface: QueryPlanOperator
      Returns the variables that can be expected in the solution mappings produced by this operator in the case that the input(s) to this operator contain solutions mappings with the given set(s) of variables. The number of ExpectedVariables objects passed to this method must be in line with the degree of this operator (e.g., for a unary operator, exactly one such object must be passed).
      Specified by:
      getExpectedVariables in interface QueryPlanOperator
    • visit

      public void visit(LogicalPlanVisitor visitor)
      Specified by:
      visit in interface LogicalOperator
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addVariables

      protected void addVariables(org.apache.jena.sparql.expr.Expr expr, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
      Returns true if it is not guaranteed that evaluating the given expression will result in a well-formed cdt:List literal that does not contain null values.
    • addVariables

      protected void addVariables(org.apache.jena.sparql.expr.NodeValue nv, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
      Adds var1 and var2 (if not null) into the two given sets depending on the given NodeValue.

      If the given NodeValue is a well-formed cdt:List literal that represents a nonempty list, then var2 will be added as a certain variable. Moreover, if none of the elements of this (nonempty) list is the null value, then var1 will also be added as a certain variable.

      If the given NodeValue is a well-formed cdt:Map literal that represents a nonempty map, then var1 will be added as a certain variable. Moreover, if none of the values of the entries in this (nonempty) map is the null value, then var2 will also be added as a certain variable.

    • addVariables

      protected void addVariables(org.apache.jena.sparql.expr.ExprFunction fct, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
      Adds var1 and var2 (if not null) into the two given sets depending on the given function expression.

      If the function expression is for the cdt:List constructor function with at least one argument, then var2 will be added as a certain variable. Moreover, if each of the arguments is either a constant or a variable that is one of the given certain variables, then var1 will also be added as a certain variable.

      If the function expression is for the cdt:Map constructor function with an even number of arguments and every i-th argument, with i being an odd number, is an URI constant or a literal constant, then var1 will be added as a certain variable. Moreover, if every j-th argument, with j an even number, is either a constant or a variable that is one of the given certain variables, then var2 will also be added as a certain variable.

    • addVariables

      protected void addVariables(boolean var1IsCertain, boolean var2IsCertain, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars)
      Adds var1 and var2 (if not null) into the two given sets as per the given flags.