Package org.geotools.geopkg
Class GeoPkgExtension
Object
GeoPkgExtension
- Direct Known Subclasses:
GeoPkgMetadataExtension
,GeoPkgSchemaExtension
Base class for GeoPackage extensions, containing the share-able functionality
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
Extension scope -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String
protected final GeoPackage
protected final String
protected final GeoPkgExtension.Scope
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
GeoPkgExtension
(String name, String definition, GeoPkgExtension.Scope scope, GeoPackage geoPackage) Creates a new geopackage extension. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list ofGeoPkgExtension.Association
between this extension and table/columns in the databaseprotected Connection
Grabs a connection from the GeoPackage data sourceThe definition, normally a URL pointing to a specprotected long
Helper that returns the key generated by an insert, run with the provided prepared statementgetName()
The extension name, as registered with OGCgetScope()
The scope of the extensionboolean
Returns true if the extension has at least one registration in the geopkg_extensions table.protected boolean
-
Field Details
-
name
-
definition
-
scope
-
geoPackage
-
-
Constructor Details
-
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 OGCdefinition
- The definition, normally a URL pointing to a specscope
- The scope, read/write or write/onlygeoPackage
- The GeoPackage providing access to the contents of the file
-
-
Method Details
-
getName
The extension name, as registered with OGC -
getDefinition
The definition, normally a URL pointing to a spec -
getScope
The scope of the extension- Returns:
-
isRegistered
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
- Throws:
SQLException
-
getAssociations
Returns the list ofGeoPkgExtension.Association
between this extension and table/columns in the database- Throws:
IOException
-
getConnection
Grabs a connection from the GeoPackage data source- Throws:
SQLException
-
getGeneratedKey
Helper that returns the key generated by an insert, run with the provided prepared statement- Throws:
SQLException
-