public class VarNode extends TermNode
Note: Unlike Var
, this class does NOT support reference testing for
equality. Multiple VarNode
instances MAY exist for the same
IVariable
. You must either compare the value returned by
#getVar()
(which is canonical) or use CoreBaseBOp.equals(Object)
.
Modifier and Type | Class and Description |
---|---|
static interface |
VarNode.Annotations |
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
VarNode(BOp[] args,
Map<String,Object> anns)
Required shallow copy constructor.
|
VarNode(IVariable<IV> var) |
VarNode(String var) |
VarNode(VarNode op)
Constructor required for
com.bigdata.bop.BOpUtility#deepCopy(FilterNode) . |
Modifier and Type | Method and Description |
---|---|
static VarNode |
freshVarNode() |
IVariable<IV> |
getValueExpression()
Strengthen return type.
|
boolean |
isAnonymous()
Return
true if this is an anonymous variable (anonymous
variables are introduced during a rewrite of the query in which blank
nodes are replaced by anonymous variables). |
boolean |
isSolutionSet()
Return
true if the variable represents a solution set name. |
boolean |
isWildcard()
Return
true iff the variable is * . |
void |
setAnonymous(boolean anonymous)
Mark this as an anonymous variable (one introduced during a query rewrite
in place of a blank node).
|
void |
setSolutionSet(boolean solutionSet)
Mark this as a variable which actually conveys the name of a solution
set.
|
void |
setValueExpression(IValueExpression<? extends IV> ve)
Hot-swap the IVariable underneath this VarNode.
|
String |
toString()
Overridden to mark metadata about variables.
|
getValue, invalidate, toString
getRequiredValueExpression, isConstant, isFunction, isVariable, toShortString
addExplainHint, getExplainHints, getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHintAsInteger, getQueryHints, replaceAllWith, setQueryHint, setQueryHints
addArg, addArg, addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, indexOf, removeArg, replaceWith, setArg, setArgs, setId, setProperty, setUnboundProperty, toArray, toArray
annotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName
public VarNode(VarNode op)
com.bigdata.bop.BOpUtility#deepCopy(FilterNode)
.public VarNode(String var)
public boolean isAnonymous()
true
if this is an anonymous variable (anonymous
variables are introduced during a rewrite of the query in which blank
nodes are replaced by anonymous variables). This marker is useful mainly
when reading the AST tree as an aid to understanding where a given
variable came from in the original query.public void setAnonymous(boolean anonymous)
anonymous
- public boolean isSolutionSet()
true
if the variable represents a solution set name.public void setSolutionSet(boolean solutionSet)
true
- if the variable represents a solution set name.public boolean isWildcard()
true
iff the variable is *
.public IVariable<IV> getValueExpression()
getValueExpression
in interface IValueExpressionNode
getValueExpression
in class TermNode
public void setValueExpression(IValueExpression<? extends IV> ve)
setValueExpression
in interface IValueExpressionNode
setValueExpression
in class TermNode
public String toString()
toString
in interface BOp
toString
in class CoreBaseBOp
public static VarNode freshVarNode()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.