Package org.apache.jena.sparql.expr
Class ExprFunction1
- java.lang.Object
-
- org.apache.jena.sparql.expr.ExprNode
-
- org.apache.jena.sparql.expr.ExprFunction
-
- org.apache.jena.sparql.expr.ExprFunction1
-
- All Implemented Interfaces:
Expr
- Direct Known Subclasses:
E_Bound
,E_Datatype
,E_DateTimeDay
,E_DateTimeHours
,E_DateTimeMinutes
,E_DateTimeMonth
,E_DateTimeSeconds
,E_DateTimeTimezone
,E_DateTimeTZ
,E_DateTimeYear
,E_IRI
,E_IsBlank
,E_IsIRI
,E_IsLiteral
,E_IsNumeric
,E_IsTriple
,E_Lang
,E_LogicalNot
,E_NumAbs
,E_NumCeiling
,E_NumFloor
,E_NumRound
,E_Str
,E_StrEncodeForURI
,E_StrLength
,E_StrLowerCase
,E_StrUpperCase
,E_TripleObject
,E_TriplePredicate
,E_TripleSubject
,E_UnaryMinus
,E_UnaryPlus
,ExprDigest
public abstract class ExprFunction1 extends ExprFunction
A function that has a single argument
-
-
Field Summary
-
Fields inherited from interface org.apache.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL, NONE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Expr
apply(ExprTransform transform, Expr sub)
Expr
applyNodeTransform(NodeTransform transform)
Rewrite, applying a node->node transformationabstract Expr
copy(Expr expr)
Expr
copySubstitute(Binding binding)
Deep copy with substitutionNodeValue
eval(Binding binding, FunctionEnv env)
Evaluate this expression against the bindingabstract NodeValue
eval(NodeValue nv)
NodeValue
eval(NodeValue v, FunctionEnv env)
Expr
getArg()
Expr
getArg(int i)
int
hashCode()
Expr
are used in both syntax and algebra.int
numArgs()
void
visit(ExprVisitor visitor)
-
Methods inherited from class org.apache.jena.sparql.expr.ExprFunction
equals, getArgs, getFunction, getFunctionIRI, getFunctionName, getFunctionPrintName, getFunctionSymbol, getOpName, isFunction
-
Methods inherited from class org.apache.jena.sparql.expr.ExprNode
asVar, deepCopy, equals, equalsBySyntax, getConstant, getExpr, getExprVar, getGraphPattern, getVarName, getVarsMentioned, isConstant, isExpr, isGraphPattern, isSatisfied, isVariable, toString
-
-
-
-
Method Detail
-
getArg
public Expr getArg()
-
getArg
public Expr getArg(int i)
- Specified by:
getArg
in classExprFunction
-
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
.
- Specified by:
hashCode
in interfaceExpr
- Overrides:
hashCode
in classExprFunction
-
numArgs
public int numArgs()
- Specified by:
numArgs
in classExprFunction
-
eval
public final NodeValue eval(Binding binding, FunctionEnv env)
Description copied from interface:Expr
Evaluate this expression against the binding
-
eval
public NodeValue eval(NodeValue v, FunctionEnv env)
-
copySubstitute
public final Expr copySubstitute(Binding binding)
Description copied from interface:Expr
Deep copy with substitution- Specified by:
copySubstitute
in interfaceExpr
- Specified by:
copySubstitute
in classExprNode
-
applyNodeTransform
public final Expr applyNodeTransform(NodeTransform transform)
Description copied from interface:Expr
Rewrite, applying a node->node transformation- Specified by:
applyNodeTransform
in interfaceExpr
- Specified by:
applyNodeTransform
in classExprNode
-
visit
public void visit(ExprVisitor visitor)
-
apply
public Expr apply(ExprTransform transform, Expr sub)
-
-