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
Fields inherited from interface org.geotools.api.filter.expression.Expression
NIL
-
Constructor Summary
ConstructorDescriptionStructAccessExpression
(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 boolean
boolean
<T> T
nz.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 aValue
nz.org.riskscape.problem.ResultOrProblems<StructMemberAccessExpression>
getExpressionFor
(nz.org.riskscape.engine.types.Struct sourceType) Shortcut toStructMemberAccessExpression.build(Type, List)
int
hashCode()
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:TypedExpression
The riskscape type this expression will return as a
Value
- Specified by:
evaluateType
in interfaceTypedExpression
-
evaluate
- Specified by:
evaluate
in interfaceorg.geotools.api.filter.expression.Expression
-
evaluate
- Specified by:
evaluate
in interfaceorg.geotools.api.filter.expression.Expression
-
toString
-
accept
public Object accept(org.geotools.api.filter.expression.ExpressionVisitor visitor, Object extraData) - Specified by:
accept
in interfaceorg.geotools.api.filter.expression.Expression
-
getPropertyName
- Specified by:
getPropertyName
in 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
StructMemberAccessExpression
that has been built to make subsequent lookups faster
-
getNamespaceContext
- Specified by:
getNamespaceContext
in interfaceorg.geotools.api.filter.expression.PropertyName
-
equals
-
canEqual
-
hashCode
public int hashCode()
-