- All Known Implementing Classes:
E_Add
,E_AdjustToTimezone
,E_Bound
,E_Call
,E_Cast
,E_Coalesce
,E_Conditional
,E_Datatype
,E_DateTimeDay
,E_DateTimeHours
,E_DateTimeMinutes
,E_DateTimeMonth
,E_DateTimeSeconds
,E_DateTimeTimezone
,E_DateTimeTZ
,E_DateTimeYear
,E_Divide
,E_Equals
,E_Exists
,E_Function
,E_FunctionDynamic
,E_GreaterThan
,E_GreaterThanOrEqual
,E_IRI
,E_IRI2
,E_IsBlank
,E_IsIRI
,E_IsLiteral
,E_IsNumeric
,E_IsTriple
,E_IsURI
,E_Lang
,E_LangMatches
,E_LessThan
,E_LessThanOrEqual
,E_LogicalAnd
,E_LogicalNot
,E_LogicalOr
,E_MD5
,E_Multiply
,E_NotEquals
,E_NotExists
,E_NotOneOf
,E_Now
,E_NumAbs
,E_NumCeiling
,E_NumFloor
,E_NumRound
,E_OneOf
,E_OneOfBase
,E_OpNumericIntegerDivide
,E_OpNumericMod
,E_Random
,E_Regex
,E_SameTerm
,E_SHA1
,E_SHA224
,E_SHA256
,E_SHA384
,E_SHA512
,E_Str
,E_StrAfter
,E_StrBefore
,E_StrConcat
,E_StrContains
,E_StrDatatype
,E_StrEncodeForURI
,E_StrEndsWith
,E_StrLang
,E_StrLength
,E_StrLowerCase
,E_StrReplace
,E_StrStartsWith
,E_StrSubstring
,E_StrUpperCase
,E_StrUUID
,E_Subtract
,E_TripleFn
,E_TripleObject
,E_TriplePredicate
,E_TripleSubject
,E_UnaryMinus
,E_UnaryPlus
,E_URI
,E_URI2
,E_UUID
,E_Version
,ExprAggregator
,ExprDigest
,ExprFunction
,ExprFunction0
,ExprFunction1
,ExprFunction2
,ExprFunction3
,ExprFunctionN
,ExprFunctionOp
,ExprNode
,ExprNone
,ExprSystem
,ExprTripleTerm
,ExprVar
,NodeValue
,NodeValueBoolean
,NodeValueDateTime
,NodeValueDecimal
,NodeValueDouble
,NodeValueDuration
,NodeValueFloat
,NodeValueInteger
,NodeValueLang
,NodeValueNode
,NodeValueSortKey
,NodeValueString
public interface Expr
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final Expr
-
Method Summary
Modifier and TypeMethodDescriptionapplyNodeTransform
(NodeTransform transform) Rewrite, applying a node->node transformationasVar()
Convert to a Var variable.copySubstitute
(Binding binding) Deep copy with substitutiondeepCopy()
Deep copyboolean
boolean
General equality operation - consider this to be 'protected'boolean
equalsBySyntax
(Expr other) eval
(Binding binding, FunctionEnv env) Evaluate this expression against the bindingNodeValue constant (returns null if not a constant)Variable (or null)Get the function (returns null if not a function)Variable name (returns null if not a variable)Variables used by this expression.int
hashCode()
Expr
are used in both syntax and algebra.boolean
Answer whether this is a constant expression - false includes "don't know" No constant folding so "false" from an expression that evaluates to a constantboolean
Answer whether this is a function.boolean
isSatisfied
(Binding binding, FunctionEnv execCxt) Test whether a Constraint is satisfied, given a set of bindings Includes error propagation and Effective Boolean Value rules.boolean
Answer whether this is a variable.void
visit
(ExprVisitor visitor)
-
Field Details
-
NONE
-
CMP_GREATER
static final int CMP_GREATER- See Also:
-
CMP_EQUAL
static final int CMP_EQUAL- See Also:
-
CMP_LESS
static final int CMP_LESS- See Also:
-
CMP_UNEQUAL
static final int CMP_UNEQUAL- See Also:
-
CMP_INDETERMINATE
static final int CMP_INDETERMINATE- See Also:
-
-
Method Details
-
isSatisfied
Test whether a Constraint is satisfied, given a set of bindings Includes error propagation and Effective Boolean Value rules.- Parameters:
binding
- The bindingsexecCxt
- FunctionEnv- Returns:
- true or false
-
getVarsMentioned
Variables used by this expression. -
eval
Evaluate this expression against the binding- Parameters:
binding
-env
-
-
copySubstitute
Deep copy with substitution -
applyNodeTransform
Rewrite, applying a node->node transformation -
deepCopy
Expr deepCopy()Deep copy -
isVariable
boolean isVariable()Answer whether this is a variable. -
getVarName
String getVarName()Variable name (returns null if not a variable) -
getExprVar
ExprVar getExprVar()Variable (or null) -
asVar
Var asVar()Convert to a Var variable. -
isConstant
boolean isConstant()Answer whether this is a constant expression - false includes "don't know" No constant folding so "false" from an expression that evaluates to a constant -
getConstant
NodeValue getConstant()NodeValue constant (returns null if not a constant) -
isFunction
boolean isFunction()Answer whether this is a function. -
getFunction
ExprFunction getFunction()Get the function (returns null if not a function) -
visit
-
hashCode
int hashCode()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 algebra).Hence, different
hashCode
=> notequalsBySyntax
. -
equals
-
equalsBySyntax
-
equals
General equality operation - consider this to be 'protected'
-