Class GeoPackageDataSource.Builder

java.lang.Object
com.luciad.formats.geopackage.GeoPackageDataSource.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
GeoPackageDataSource

public static final class GeoPackageDataSource.Builder extends Object implements AutoCloseable
Builder for creating GeoPackageDataSource.
  • Constructor Details

  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • source

      @NotNull public GeoPackageDataSource.Builder source(@NotNull String source)
      Sets the absolute path to the GeoPackage file.

      The extension of the file should be '.gpkg'. Calling this function is mandatory.

      Parameters:
      source - The absolute path to the GeoPackage file.
    • tableName

      @NotNull public GeoPackageDataSource.Builder tableName(@NotNull String tableName)
      Sets the name of the table that needs to be decoded.

      Calling this function is optional. If not specified, the first features table is used.

      Parameters:
      tableName - The name of the table that needs to be decoded.
    • build

      @NotNull public GeoPackageDataSource build() throws IllegalStateException
      Build the GeoPackage data source .

      After calling this function, this builder should no longer be used.

      Returns:
      the GeoPackage data source.
      Throws:
      IllegalStateException - If not all mandatory parameters are set.