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, toStringgetRequiredValueExpression, isConstant, isFunction, isVariable, toShortStringaddExplainHint, getExplainHints, getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHintAsInteger, getQueryHints, replaceAllWith, setQueryHint, setQueryHintsaddArg, addArg, addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, indexOf, removeArg, replaceWith, setArg, setArgs, setId, setProperty, setUnboundProperty, toArray, toArrayannotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenNamepublic 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 IValueExpressionNodegetValueExpression in class TermNodepublic void setValueExpression(IValueExpression<? extends IV> ve)
setValueExpression in interface IValueExpressionNodesetValueExpression in class TermNodepublic String toString()
toString in interface BOptoString in class CoreBaseBOppublic static VarNode freshVarNode()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.