public abstract class ExprFunction extends ExprNode
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL, NONE
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Expr other,
boolean bySyntax)
General equality operation - consider this to be 'protected'
|
abstract Expr |
getArg(int i) |
List<Expr> |
getArgs() |
ExprFunction |
getFunction()
Get the function (returns null if not a function)
|
String |
getFunctionIRI()
URI for this function, whether custom or specification defined URI (these are keywords in the language)
|
String |
getFunctionName(SerializationContext cxt)
Name used in a functional form (i.e.
|
String |
getFunctionPrintName(SerializationContext cxt)
Name used for output in SPARQL format needing functional form (no specific keyword).
|
FunctionLabel |
getFunctionSymbol()
Used to get a unique name for the function, which is intern'ed.
|
String |
getOpName()
Get the symbol name (+, ! etc) for this function -- maybe null for none
|
int |
hashCode()
Expr are used in both syntax and algebra. |
boolean |
isFunction()
Answer wether this is a function.
|
abstract int |
numArgs() |
applyNodeTransform, asVar, copySubstitute, deepCopy, equals, equalsBySyntax, eval, getConstant, getExpr, getExprVar, getGraphPattern, getVarName, getVarNamesMentioned, getVarsMentioned, isConstant, isExpr, isGraphPattern, isSatisfied, isVariable, toString, varNamesMentioned, varsMentioned
public abstract Expr getArg(int i)
public abstract int numArgs()
public boolean isFunction()
Expr
isFunction
in interface Expr
isFunction
in class ExprNode
public ExprFunction getFunction()
Expr
getFunction
in interface Expr
getFunction
in class ExprNode
public int hashCode()
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
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)
Expr
public String getFunctionPrintName(SerializationContext cxt)
public String getFunctionName(SerializationContext cxt)
public FunctionLabel getFunctionSymbol()
public String getFunctionIRI()
public String getOpName()
Licenced under the Apache License, Version 2.0