Package nz.org.riskscape.engine.query
Class TupleUtils
java.lang.Object
nz.org.riskscape.engine.query.TupleUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Struct.StructMemberfindGeometryMember(@NonNull Struct source, @NonNull TupleUtils.FindOption option, @NonNull Supplier<RuntimeException> failedHandler) Look in the given struct for a member with typeGeom.static Struct.StructMemberfindGeometryMember(@NonNull Struct source, TupleUtils.FindOption option) static Struct.StructMemberfindRequiredGeometryMember(Struct struct) Convenience version of findGeometryMember where required flag is set to truestatic StringgetContentSummary(Tuple tuple) static booleanhasGeometryMember(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 noGeommember is found.- Throws:
IllegalArgumentException- if either no or more than oneGeomtype 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.
-