Record Class ShapefileDataset

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

public record ShapefileDataset(Path shp, Path shx, Path dbf, Optional<Path> prj, Optional<Path> cpg) extends Record
  • Constructor Details

    • ShapefileDataset

      public ShapefileDataset(Path shp, Path shx, Path dbf, Optional<Path> prj, Optional<Path> cpg)
      Creates an instance of a ShapefileDataset record class.
      Parameters:
      shp - the value for the shp record component
      shx - the value for the shx record component
      dbf - the value for the dbf record component
      prj - the value for the prj record component
      cpg - the value for the cpg record component
  • Method Details

    • fromPath

      public static ShapefileDataset fromPath(Path shpPath, boolean requireShx) throws ShapefileMappingException, IOException
      Throws:
      ShapefileMappingException
      IOException
    • baseName

      public String baseName()
    • 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.
    • shp

      public Path shp()
      Returns the value of the shp record component.
      Returns:
      the value of the shp record component
    • shx

      public Path shx()
      Returns the value of the shx record component.
      Returns:
      the value of the shx record component
    • dbf

      public Path dbf()
      Returns the value of the dbf record component.
      Returns:
      the value of the dbf record component
    • prj

      public Optional<Path> prj()
      Returns the value of the prj record component.
      Returns:
      the value of the prj record component
    • cpg

      public Optional<Path> cpg()
      Returns the value of the cpg record component.
      Returns:
      the value of the cpg record component