Package nz.org.riskscape.engine.query
Class TupleUtils
java.lang.Object
nz.org.riskscape.engine.query.TupleUtils
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Struct.StructMember
findGeometryMember
(@NonNull Struct source, @NonNull TupleUtils.FindOption option, @NonNull Supplier<RuntimeException> failedHandler) Look in the given struct for a member with typeGeom
.static Struct.StructMember
findGeometryMember
(@NonNull Struct source, TupleUtils.FindOption option) static Struct.StructMember
findRequiredGeometryMember
(Struct struct) Convenience version of findGeometryMember where required flag is set to truestatic String
getContentSummary
(Tuple tuple) static boolean
hasGeometryMember
(Struct struct) Convenience version to check if the struct has a geometry member
-
Constructor Details
-
TupleUtils
public TupleUtils()
-
-
Method Details
-
findGeometryMember
public static Struct.StructMember findGeometryMember(@NonNull @NonNull Struct source, TupleUtils.FindOption option) -
findGeometryMember
public static Struct.StructMember findGeometryMember(@NonNull @NonNull Struct source, @NonNull @NonNull TupleUtils.FindOption option, @NonNull @NonNull Supplier<RuntimeException> failedHandler) Look in the given struct for a member with type
Geom
.- Parameters:
source
- the type to search throughoption
- flag whether at least on is required. If set to false, no exception is thrown if noGeom
member is found.- Throws:
IllegalArgumentException
- if either no or more than oneGeom
type was found in the given struct
-
findRequiredGeometryMember
Convenience version of findGeometryMember where required flag is set to true
-
hasGeometryMember
Convenience version to check if the struct has a geometry member
-
getContentSummary
- Returns:
- a concise summary of the tuple's content. Values may be shortened, or in the case of geometries will be excluded completely.
-