Java Code Examples for mil.nga.geopackage.core.contents.ContentsDao#deleteTable()
The following examples show how to use
mil.nga.geopackage.core.contents.ContentsDao#deleteTable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NGAExtensions.java From geopackage-core-java with MIT License | 6 votes |
/** * Delete the properties extension from the GeoPackage * * @param geoPackage * GeoPackage * @since 3.0.2 */ public static void deletePropertiesExtension(GeoPackageCore geoPackage) { ExtensionsDao extensionsDao = geoPackage.getExtensionsDao(); if (geoPackage.isTable(PropertiesCoreExtension.TABLE_NAME)) { ContentsDao contentsDao = geoPackage.getContentsDao(); contentsDao.deleteTable(PropertiesCoreExtension.TABLE_NAME); } try { if (extensionsDao.isTableExists()) { extensionsDao.deleteByExtension( PropertiesCoreExtension.EXTENSION_NAME, PropertiesCoreExtension.TABLE_NAME); } } catch (SQLException e) { throw new GeoPackageException( "Failed to delete Properties extension. GeoPackage: " + geoPackage.getName(), e); } }
Example 2
Source File: GeoPackageCoreImpl.java From geopackage-core-java with MIT License | 5 votes |
/** * {@inheritDoc} */ @Override public void deleteTable(String table) { verifyWritable(); GeoPackageExtensions.deleteTableExtensions(this, table); ContentsDao contentsDao = getContentsDao(); contentsDao.deleteTable(table); }