Record Class ShapefileWriteOptions

java.lang.Object
java.lang.Record
ch.so.agi.gretl.internal.shapefile.core.ShapefileWriteOptions

public record ShapefileWriteOptions(Charset dbfCharset, Optional<String> prjWkt, ShapefileWriteOptions.OverflowPolicy overflow) extends Record
Low-level write behaviour for ShapefileDatasetWriter: the .dbf character encoding, an optional .prj WKT string and the policy for values that do not fit into a DBF field.

This is a format-only options object and does not know about INTERLIS, IOX or the mapping layer. The richer, user-facing option parsing lives in ShapefileOptions (reader/writer adapter level) and is not part of the Phase 7 core.

  • Constructor Details

    • ShapefileWriteOptions

      public ShapefileWriteOptions(Charset dbfCharset, Optional<String> prjWkt, ShapefileWriteOptions.OverflowPolicy overflow)
      Creates an instance of a ShapefileWriteOptions record class.
      Parameters:
      dbfCharset - the value for the dbfCharset record component
      prjWkt - the value for the prjWkt record component
      overflow - the value for the overflow record component
  • Method Details

    • defaults

      public static ShapefileWriteOptions defaults()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dbfCharset

      public Charset dbfCharset()
      Returns the value of the dbfCharset record component.
      Returns:
      the value of the dbfCharset record component
    • prjWkt

      public Optional<String> prjWkt()
      Returns the value of the prjWkt record component.
      Returns:
      the value of the prjWkt record component
    • overflow

      Returns the value of the overflow record component.
      Returns:
      the value of the overflow record component