Class GeoPkgExtension

    • Field Detail

      • name

        protected final String name
      • definition

        protected final String definition
      • geoPackage

        protected final GeoPackage geoPackage
    • Constructor Detail

      • GeoPkgExtension

        protected GeoPkgExtension​(String name,
                                  String definition,
                                  GeoPkgExtension.Scope scope,
                                  GeoPackage geoPackage)
        Creates a new geopackage extension. By itself, it only allows to access the associated tables.
        Parameters:
        name - The extension name, as registered with OGC
        definition - The definition, normally a URL pointing to a spec
        scope - The scope, read/write or write/only
        geoPackage - The GeoPackage providing access to the contents of the file
    • Method Detail

      • getName

        public String getName()
        The extension name, as registered with OGC
      • getDefinition

        public String getDefinition()
        The definition, normally a URL pointing to a spec
      • isRegistered

        public boolean isRegistered()
                             throws IOException
        Returns true if the extension has at least one registration in the geopkg_extensions table. If not registered, the GeoPackage does not really have this extension, but the class could be used to create one (this behavior is extension specific and delegated to sub-classes).
        Throws:
        IOException
      • isRegistered

        protected boolean isRegistered​(Connection cx)
                                throws SQLException
        Throws:
        SQLException
      • getConnection

        protected Connection getConnection()
                                    throws SQLException
        Grabs a connection from the GeoPackage data source
        Throws:
        SQLException
      • getGeneratedKey

        protected long getGeneratedKey​(PreparedStatement ps)
                                throws SQLException
        Helper that returns the key generated by an insert, run with the provided prepared statement
        Throws:
        SQLException