Class StructAccessExpression
- All Implemented Interfaces:
TypedExpression,org.geotools.api.filter.expression.Expression,org.geotools.api.filter.expression.PropertyName
Access properties by path inside riskscape Tuples
# Thread Safety
This class is not thread-safe, but is probably safe to use in some specific circumstances. It is known not to work
and generally perform poorly when a) the same expression is used to access tuples of different types b) that is done
across different threads (which can cause IllegalArgumentExceptions to be thrown). In these cases, it's best to
use the ExpressionRealizer to rebuild and expression or a filter against a
specific struct and use this. It will perform quicker and fail fast in cases of type mismatch.
-
Field Summary
FieldsFields inherited from interface org.geotools.api.filter.expression.Expression
NIL -
Constructor Summary
ConstructorsConstructorDescriptionStructAccessExpression(String propertyName) StructAccessExpression(String... segmentsParam) StructAccessExpression(List<String> segments) -
Method Summary
Modifier and TypeMethodDescriptionCreates a new struct access expression by adding additionalPath to this one.protected booleanboolean<T> Tnz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.types.Type>evaluateType(nz.org.riskscape.engine.types.Type sourceType) The riskscape type this expression will return as aValuenz.org.riskscape.problem.ResultOrProblems<StructMemberAccessExpression>getExpressionFor(nz.org.riskscape.engine.types.Struct sourceType) Shortcut toStructMemberAccessExpression.build(Type, List)inthashCode()toString()
-
Field Details
-
SPLIT_ON
- See Also:
-
SPLIT_ON_UNESCAPED
- See Also:
-
-
Constructor Details
-
StructAccessExpression
-
StructAccessExpression
-
StructAccessExpression
-
-
Method Details
-
and
Creates a new struct access expression by adding additionalPath to this one.
- Parameters:
additionalPath- additional path element- Returns:
- new struct access expression
-
evaluateType
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.types.Type> evaluateType(nz.org.riskscape.engine.types.Type sourceType) Description copied from interface:TypedExpressionThe riskscape type this expression will return as a
Value- Specified by:
evaluateTypein interfaceTypedExpression
-
evaluate
- Specified by:
evaluatein interfaceorg.geotools.api.filter.expression.Expression
-
evaluate
- Specified by:
evaluatein interfaceorg.geotools.api.filter.expression.Expression
-
toString
-
accept
public Object accept(org.geotools.api.filter.expression.ExpressionVisitor visitor, Object extraData) - Specified by:
acceptin interfaceorg.geotools.api.filter.expression.Expression
-
getPropertyName
- Specified by:
getPropertyNamein interfaceorg.geotools.api.filter.expression.PropertyName
-
getSegments
-
getExpressionFor
public nz.org.riskscape.problem.ResultOrProblems<StructMemberAccessExpression> getExpressionFor(nz.org.riskscape.engine.types.Struct sourceType) Shortcut to
StructMemberAccessExpression.build(Type, List) -
getCachedExpression
- Returns:
- a possibly null
StructMemberAccessExpressionthat has been built to make subsequent lookups faster
-
getNamespaceContext
- Specified by:
getNamespaceContextin interfaceorg.geotools.api.filter.expression.PropertyName
-
equals
-
canEqual
-
hashCode
public int hashCode()
-