Package mil.nga.geopackage.extension
Class BaseExtension
- java.lang.Object
-
- mil.nga.geopackage.extension.BaseExtension
-
- Direct Known Subclasses:
ContentsIdExtension
,CoverageDataCore
,CrsWktExtension
,FeatureCoreStyleExtension
,FeatureTableCoreIndex
,FeatureTileTableCoreLinker
,GeometryExtensions
,MetadataExtension
,PortrayalExtension
,PropertiesCoreExtension
,RelatedTablesCoreExtension
,RTreeIndexCoreExtension
,SchemaExtension
,TileMatrixSetExtension
,TileTableScaling
,VectorTilesEncodingExtension
,VectorTilesExtension
,WebPExtension
,ZoomOtherExtension
public abstract class BaseExtension extends Object
Abstract base GeoPackage extension- Since:
- 1.1.8
- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description protected ExtensionsDao
extensionsDao
Extensions DAOprotected GeoPackageCore
geoPackage
GeoPackage Core
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseExtension(GeoPackageCore geoPackage)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <D extends GeoPackageDao<T,?>,T>
DcreateDao(Class<T> type)
Create a daoprotected Extensions
get(String extensionName, String tableName, String columnName)
Get the extension for the name, table name, and column nameprotected List<Extensions>
getExtensions(String extensionName)
Get the extension for the nameprotected List<Extensions>
getExtensions(String extensionName, String tableName)
Get the extension for the name and table nameExtensionsDao
getExtensionsDao()
Get the Extensions DAOGeoPackageCore
getGeoPackage()
Get the GeoPackageprotected Extensions
getOrCreate(String extensionName, String tableName, String columnName, String definition, ExtensionScopeType scopeType)
Get the extension or create as neededprotected boolean
has(String extensionName)
Determine if the GeoPackage has the extensionprotected boolean
has(String extensionName, String tableName)
Determine if the GeoPackage has the extensionprotected boolean
has(String extensionName, String tableName, String columnName)
Determine if the GeoPackage has the extensionvoid
verifyWritable()
Verify the GeoPackage is writable and throw an exception if it is not
-
-
-
Field Detail
-
geoPackage
protected final GeoPackageCore geoPackage
GeoPackage Core
-
extensionsDao
protected final ExtensionsDao extensionsDao
Extensions DAO
-
-
Constructor Detail
-
BaseExtension
protected BaseExtension(GeoPackageCore geoPackage)
Constructor- Parameters:
geoPackage
- GeoPackage
-
-
Method Detail
-
getGeoPackage
public GeoPackageCore getGeoPackage()
Get the GeoPackage- Returns:
- geoPackage
-
getExtensionsDao
public ExtensionsDao getExtensionsDao()
Get the Extensions DAO- Returns:
- extensions DAO
-
getOrCreate
protected Extensions getOrCreate(String extensionName, String tableName, String columnName, String definition, ExtensionScopeType scopeType)
Get the extension or create as needed- Parameters:
extensionName
- extension nametableName
- table namecolumnName
- column namedefinition
- extension definitionscopeType
- extension scope type- Returns:
- extension
-
get
protected Extensions get(String extensionName, String tableName, String columnName)
Get the extension for the name, table name, and column name- Parameters:
extensionName
- extension nametableName
- table namecolumnName
- column name- Returns:
- extension
-
has
protected boolean has(String extensionName, String tableName, String columnName)
Determine if the GeoPackage has the extension- Parameters:
extensionName
- extension nametableName
- table namecolumnName
- column name- Returns:
- true if has extension
-
getExtensions
protected List<Extensions> getExtensions(String extensionName, String tableName)
Get the extension for the name and table name- Parameters:
extensionName
- extension nametableName
- table name- Returns:
- extension
-
has
protected boolean has(String extensionName, String tableName)
Determine if the GeoPackage has the extension- Parameters:
extensionName
- extension nametableName
- table name- Returns:
- true if has extension
-
getExtensions
protected List<Extensions> getExtensions(String extensionName)
Get the extension for the name- Parameters:
extensionName
- extension name- Returns:
- extension
-
has
protected boolean has(String extensionName)
Determine if the GeoPackage has the extension- Parameters:
extensionName
- extension name- Returns:
- true if has extension
-
verifyWritable
public void verifyWritable()
Verify the GeoPackage is writable and throw an exception if it is not- Since:
- 4.0.0
-
createDao
public <D extends GeoPackageDao<T,?>,T> D createDao(Class<T> type)
Create a dao- Type Parameters:
D
- dao typeT
- class type- Parameters:
type
- dao class type- Returns:
- base dao implementation
- Since:
- 4.0.0
-
-