Class TupleUtils

java.lang.Object
nz.org.riskscape.engine.query.TupleUtils

public class TupleUtils extends Object
  • 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 through
      option - flag whether at least on is required. If set to false, no exception is thrown if no Geom member is found.
      Throws:
      IllegalArgumentException - if either no or more than one Geom type was found in the given struct
    • findRequiredGeometryMember

      public static Struct.StructMember findRequiredGeometryMember(Struct struct)

      Convenience version of findGeometryMember where required flag is set to true

    • hasGeometryMember

      public static boolean hasGeometryMember(Struct struct)

      Convenience version to check if the struct has a geometry member

    • getContentSummary

      public static String getContentSummary(Tuple tuple)
      Returns:
      a concise summary of the tuple's content. Values may be shortened, or in the case of geometries will be excluded completely.