Class BaseExtension

    • 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 name
        tableName - table name
        columnName - column name
        definition - extension definition
        scopeType - 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 name
        tableName - table name
        columnName - column name
        Returns:
        extension
      • has

        protected boolean has​(String extensionName,
                              String tableName,
                              String columnName)
        Determine if the GeoPackage has the extension
        Parameters:
        extensionName - extension name
        tableName - table name
        columnName - 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 name
        tableName - table name
        Returns:
        extension
      • has

        protected boolean has​(String extensionName,
                              String tableName)
        Determine if the GeoPackage has the extension
        Parameters:
        extensionName - extension name
        tableName - 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 type
        T - class type
        Parameters:
        type - dao class type
        Returns:
        base dao implementation
        Since:
        4.0.0