public class AssignmentNode extends GroupMemberValueExpressionNodeBase implements IValueExpressionNode, Comparable<AssignmentNode>, IBindingProducerNode, IValueExpressionNodeContainer
BIND( valueExpr AS ?var )where args[0] is the
VarNode
IValueExpression
GroupMemberNodeBase.Annotations
IQueryNode.Annotations
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
AssignmentNode(AssignmentNode op)
Constructor required for
com.bigdata.bop.BOpUtility#deepCopy(FilterNode) . |
AssignmentNode(BOp[] args,
Map<String,Object> anns)
Required shallow copy constructor.
|
AssignmentNode(VarNode var,
IValueExpressionNode ve) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AssignmentNode o)
Orders
AssignmentNode s by the variable names. |
Set<IVariable<?>> |
getDesiredBound(StaticAnalysis sa)
Get variables that are not required to be bound, but desired in the
sense that we want them to be bound when evaluating the construct.
|
Set<IVariable<?>> |
getRequiredBound(StaticAnalysis sa)
Return the variables used in the node that *must* be bound prior to
evaluating the node.
|
IValueExpression<? extends IV> |
getValueExpression()
Return the cached
IValueExpression if it exists on the node,
otherwise return null. |
IValueExpressionNode |
getValueExpressionNode()
Return the value expression node.
|
IVariable<IV> |
getVar()
The variable onto which the assignment is bound (as an
IVariable ). |
VarNode |
getVarNode()
The variable onto which the assignment is bound (as a
VarNode ). |
void |
invalidate()
Invalidate the cached value.
|
int |
replaceAllWith(BOp oldVal,
BOp newVal)
Replace all occurrences of the old value with the new value in both the
arguments and annotations of this operator (recursive).
|
ModifiableBOpBase |
setArg(int index,
BOp newArg)
Replace the value of the argument at the specified index (core mutation
method).
|
ModifiableBOpBase |
setArgs(BOp[] args)
Replace the arguments.
|
void |
setValueExpression(IValueExpression<? extends IV> ve)
Cache the translated value expression on the node.
|
String |
toString(int indent)
The contract of this method at this level is under-specified.
|
getConsumedVars, getMaterializationRequirement, getRequiredValueExpression
getContext, getParent, getParentGraphPatternGroup, getParentJoinGroup, setParent
getQueryHints, toString
addExplainHint, getExplainHints, getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHintAsInteger, setQueryHint, setQueryHints
addArg, addArg, addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, indexOf, removeArg, replaceWith, setId, setProperty, setUnboundProperty, toArray, toArray
annotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName, toShortString
finalize, getClass, notify, notifyAll, wait, wait, wait
getRequiredValueExpression
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toString
getProperty
public AssignmentNode(VarNode var, IValueExpressionNode ve)
var
- The variable which will be bound.ve
- The value expression to be computed.public AssignmentNode(AssignmentNode op)
com.bigdata.bop.BOpUtility#deepCopy(FilterNode)
.public VarNode getVarNode()
VarNode
).BIND(valueExpr AS ?var)
this returns
?var
as a VarNode
.public IVariable<IV> getVar()
IVariable
).BIND(valueExpr AS ?var)
this returns
?var
as an IVariable
.public IValueExpressionNode getValueExpressionNode()
AST2BOpUtility
.getValueExpressionNode
in interface IValueExpressionNodeContainer
getValueExpressionNode
in class GroupMemberValueExpressionNodeBase
public IValueExpression<? extends IV> getValueExpression()
IValueExpressionNode
IValueExpression
if it exists on the node,
otherwise return null.getValueExpression
in interface IValueExpressionNode
public void setValueExpression(IValueExpression<? extends IV> ve)
IValueExpressionNode
setValueExpression
in interface IValueExpressionNode
public void invalidate()
IValueExpressionNode
invalidate
in interface IValueExpressionNode
public String toString(int indent)
CoreBaseBOp
CoreBaseBOp.toString()
Or:
- return a pretty-print representation of the object with indent
Note that the former contract may or may not include recursive descent through a tree-like
object, whereas the latter almost certainly does.toString
in interface BOp
toString
in interface IQueryNode
toString
in interface IValueExpressionNode
toString
in class CoreBaseBOp
public int compareTo(AssignmentNode o)
AssignmentNode
s by the variable names.compareTo
in interface Comparable<AssignmentNode>
public int replaceAllWith(BOp oldVal, BOp newVal)
ASTBase
CoreBaseBOp.equals(Object)
.replaceAllWith
in class ASTBase
oldVal
- The old value.newVal
- The new value.public ModifiableBOpBase setArgs(BOp[] args)
ModifiableBOpBase
setArgs
in class ModifiableBOpBase
args
- The new arguments.public ModifiableBOpBase setArg(int index, BOp newArg)
ModifiableBOpBase
setArg
in class ModifiableBOpBase
index
- The index of the child expression to be replaced.newArg
- The new child expression.ModifiableBOpBase
.public Set<IVariable<?>> getRequiredBound(StaticAnalysis sa)
IVariableBindingRequirements
IVariableBindingRequirements#getRequiredBound()
interface cannot be satisified, the query may still be valid and return
results (for the SPARQL 1.1 service example mentioned above, it may not,
for the FILTER it may).
The set of these variables must be disjoint from
IVariableBindingRequirements#getRequiredUnound()
.getRequiredBound
in interface IVariableBindingRequirements
public Set<IVariable<?>> getDesiredBound(StaticAnalysis sa)
IVariableBindingRequirements
IVariableBindingRequirements.getRequiredBound(StaticAnalysis)
.getDesiredBound
in interface IVariableBindingRequirements
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.