Package org.apache.jena.sparql.expr
Class ExprAggregator
- java.lang.Object
-
- org.apache.jena.sparql.expr.ExprNode
-
- org.apache.jena.sparql.expr.ExprAggregator
-
-
Field Summary
-
Fields inherited from interface org.apache.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL, NONE
-
-
Constructor Summary
Constructors Constructor Description ExprAggregator(Var v, Aggregator agg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expr
apply(ExprTransform transform)
ExprAggregator
applyNodeTransform(NodeTransform transform)
Rewrite, applying a node->node transformationjava.lang.String
asSparqlExpr(SerializationContext sCxt)
Var
asVar()
Convert to a Var variable.Expr
copy(Var v)
ExprAggregator
copySubstitute(Binding binding)
Deep copy with substitutionboolean
equals(Expr other, boolean bySyntax)
General equality operation - consider this to be 'protected'NodeValue
eval(Binding binding, FunctionEnv env)
Evaluate this expression against the bindingAggregator
getAggregator()
ExprVar
getAggVar()
ExprVar
getExprVar()
Variable (or null)Var
getVar()
int
hashCode()
Expr
are used in both syntax and algebra.void
setVar(Var v)
java.lang.String
toString()
void
visit(ExprVisitor visitor)
-
Methods inherited from class org.apache.jena.sparql.expr.ExprNode
deepCopy, equals, equalsBySyntax, getConstant, getExpr, getFunction, getGraphPattern, getVarName, getVarsMentioned, isConstant, isExpr, isFunction, isGraphPattern, isSatisfied, isVariable
-
-
-
-
Constructor Detail
-
ExprAggregator
public ExprAggregator(Var v, Aggregator agg)
-
-
Method Detail
-
getVar
public Var getVar()
-
setVar
public void setVar(Var v)
-
getAggregator
public Aggregator getAggregator()
-
hashCode
public int hashCode()
Description copied from interface:Expr
Expr
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
andEXISTS
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
andequals
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
impliesequals
(by alegbra).Hence, different
hashCode
=> notequalsBySyntax
.
-
equals
public boolean equals(Expr other, boolean bySyntax)
Description copied from interface:Expr
General equality operation - consider this to be 'protected'
-
getExprVar
public ExprVar getExprVar()
Description copied from interface:Expr
Variable (or null)- Specified by:
getExprVar
in interfaceExpr
- Overrides:
getExprVar
in classExprNode
-
getAggVar
public ExprVar getAggVar()
-
asSparqlExpr
public java.lang.String asSparqlExpr(SerializationContext sCxt)
-
copySubstitute
public ExprAggregator copySubstitute(Binding binding)
Description copied from interface:Expr
Deep copy with substitution- Specified by:
copySubstitute
in interfaceExpr
- Specified by:
copySubstitute
in classExprNode
-
applyNodeTransform
public ExprAggregator applyNodeTransform(NodeTransform transform)
Description copied from interface:Expr
Rewrite, applying a node->node transformation- Specified by:
applyNodeTransform
in interfaceExpr
- Specified by:
applyNodeTransform
in classExprNode
-
eval
public NodeValue eval(Binding binding, FunctionEnv env)
Description copied from interface:Expr
Evaluate this expression against the binding
-
apply
public Expr apply(ExprTransform transform)
-
visit
public void visit(ExprVisitor visitor)
-
-