CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL| Constructor and Description |
|---|
ExprAggregator(Var v,
Aggregator agg) |
| Modifier and Type | Method and Description |
|---|---|
Expr |
apply(ExprTransform transform) |
ExprAggregator |
applyNodeTransform(NodeTransform transform)
Rewrite, applying a node->node transformation
|
String |
asSparqlExpr(SerializationContext sCxt) |
Var |
asVar()
Convert to a Var variable.
|
Expr |
copy(Var v) |
ExprAggregator |
copySubstitute(Binding binding)
Deep copy with substitution
|
boolean |
equals(Expr other,
boolean bySyntax)
General equality operation - consider this to be 'protected'
|
NodeValue |
eval(Binding binding,
FunctionEnv env)
Evaluate this expression against the binding
|
Aggregator |
getAggregator() |
ExprVar |
getAggVar() |
ExprVar |
getExprVar()
Variable (or null)
|
Var |
getVar() |
int |
hashCode()
Expr are used in both syntax and algebra. |
void |
setVar(Var v) |
String |
toString() |
void |
visit(ExprVisitor visitor) |
deepCopy, equals, equalsBySyntax, getConstant, getExpr, getFunction, getGraphPattern, getVarName, getVarNamesMentioned, getVarsMentioned, isConstant, isExpr, isFunction, isGraphPattern, isSatisfied, isVariable, varNamesMentioned, varsMentionedpublic ExprAggregator(Var v, Aggregator agg)
public Var getVar()
public void setVar(Var v)
public Aggregator getAggregator()
public int hashCode()
ExprExpr are used in both syntax and algebra. There is no syntax
to algebra translation step because the parser uses operator precedence
to build the right evaluation structure directly.
The exceptions to this are the NOT EXISTS and
EXISTS expressions which involve a query pattern. As a
result there are different ways in syntax to produce the same algebra
form.
Two Expr are considered equal if they are equal as algebra
expressions. hashCode and equals must implement
that.
There is also equalsBySyntax. Because two different syntax
forms can yield the same algebra, but two different algebra forms
must be different syntax, equalsBySyntax implies equals
(by alegbra).
Hence, different hashCode => not equalsBySyntax.
public boolean equals(Expr other, boolean bySyntax)
Exprpublic ExprVar getExprVar()
ExprgetExprVar in interface ExprgetExprVar in class ExprNodepublic ExprVar getAggVar()
public String asSparqlExpr(SerializationContext sCxt)
public ExprAggregator copySubstitute(Binding binding)
ExprcopySubstitute in interface ExprcopySubstitute in class ExprNodepublic ExprAggregator applyNodeTransform(NodeTransform transform)
ExprapplyNodeTransform in interface ExprapplyNodeTransform in class ExprNodepublic NodeValue eval(Binding binding, FunctionEnv env)
Exprpublic Expr apply(ExprTransform transform)
public void visit(ExprVisitor visitor)
Licenced under the Apache License, Version 2.0