Class LogicalOpUnfold
- All Implemented Interfaces:
QueryPlanOperator,LogicalOperator,UnaryLogicalOp
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLogicalOpUnfold(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 benull(in case the UNFOLD clause does not contain two variables). -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddVariables(boolean var1IsCertain, boolean var2IsCertain, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars) protected voidaddVariables(org.apache.jena.sparql.expr.ExprFunction fct, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars) protected voidaddVariables(org.apache.jena.sparql.expr.Expr expr, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars) Returnstrueif 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 voidaddVariables(org.apache.jena.sparql.expr.NodeValue nv, Set<org.apache.jena.sparql.core.Var> certainVars, Set<org.apache.jena.sparql.core.Var> possibleVars) booleangetExpectedVariables(ExpectedVariables... inputVars) 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.ExprgetExpr()org.apache.jena.sparql.core.VargetVar1()org.apache.jena.sparql.core.VargetVar2()inthashCode()toString()voidvisit(LogicalPlanVisitor visitor)
-
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 benull(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
Description copied from interface:QueryPlanOperatorReturns 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 ofExpectedVariablesobjects 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:
getExpectedVariablesin interfaceQueryPlanOperator
-
visit
- Specified by:
visitin interfaceLogicalOperator
-
equals
-
hashCode
-
toString
-
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) Returnstrueif 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) Addsvar1andvar2(if notnull) into the two given sets depending on the givenNodeValue.If the given
NodeValueis a well-formed cdt:List literal that represents a nonempty list, thenvar2will be added as a certain variable. Moreover, if none of the elements of this (nonempty) list is the null value, thenvar1will also be added as a certain variable.If the given
NodeValueis a well-formed cdt:Map literal that represents a nonempty map, thenvar1will be added as a certain variable. Moreover, if none of the values of the entries in this (nonempty) map is the null value, thenvar2will 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) Addsvar1andvar2(if notnull) 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
var2will 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, thenvar1will 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
var1will 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, thenvar2will also be added as a certain variable. -
addVariables
-