Record Class ShapefileSchema
java.lang.Object
java.lang.Record
ch.so.agi.gretl.internal.shapefile.core.ShapefileSchema
Describes the structure of a Shapefile dataset to be written: the geometry
ShapeType of
the .shp file and the ordered list of .dbf fields.
The order of fields() defines the order in which attribute values must be supplied to
ShapefileDatasetWriter.write(com.vividsolutions.jts.geom.Geometry, Object[]).
This is a low-level, format-only description. It intentionally lives in the core
package and knows nothing about INTERLIS, IOX or the mapping layer.
-
Constructor Summary
ConstructorsConstructorDescriptionShapefileSchema(ShapeType shapeType, List<DbfField> fields) Creates an instance of aShapefileSchemarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theshapeTyperecord component.final StringtoString()Returns a string representation of this record class.voidValidates that this schema describes a geometry type the writer can produce.
-
Constructor Details
-
ShapefileSchema
Creates an instance of aShapefileSchemarecord class.- Parameters:
shapeType- the value for theshapeTyperecord componentfields- the value for thefieldsrecord component
-
-
Method Details
-
validateWritable
Validates that this schema describes a geometry type the writer can produce. The writer supports Point, MultiPoint, PolyLine and Polygon.- Throws:
ShapefileMappingException
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
shapeType
Returns the value of theshapeTyperecord component.- Returns:
- the value of the
shapeTyperecord component
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-