mil.nga.geopackage.extension.MetadataExtension Java Examples
The following examples show how to use
mil.nga.geopackage.extension.MetadataExtension.
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: GeoPackageCoreImpl.java From geopackage-core-java with MIT License | 6 votes |
/** * {@inheritDoc} */ @Override public boolean createMetadataTable() { verifyWritable(); boolean created = false; MetadataDao dao = getMetadataDao(); try { if (!dao.isTableExists()) { created = tableCreator.createMetadata() > 0; if (created) { // Create the metadata extension record MetadataExtension metadataExtension = new MetadataExtension( this); metadataExtension.getOrCreate(); } } } catch (SQLException e) { throw new GeoPackageException( "Failed to check if " + Metadata.class.getSimpleName() + " table exists and create it", e); } return created; }
Example #2
Source File: GeoPackageExample.java From geopackage-android with MIT License | 5 votes |
private void validateExtensions(GeoPackage geoPackage, boolean has) throws SQLException { ExtensionsDao extensionsDao = geoPackage.getExtensionsDao(); TestCase.assertEquals(has && RTREE_SPATIAL_INDEX, new RTreeIndexExtension(geoPackage).has()); TestCase.assertEquals( has && (RELATED_TABLES_FEATURES || RELATED_TABLES_MEDIA || RELATED_TABLES_SIMPLE_ATTRIBUTES), new RelatedTablesExtension(geoPackage).has()); TestCase.assertEquals( has && COVERAGE_DATA, extensionsDao.isTableExists() && !extensionsDao.queryByExtension( CoverageData.EXTENSION_NAME).isEmpty()); TestCase.assertEquals(has && SCHEMA, new SchemaExtension(geoPackage).has()); TestCase.assertEquals(has && METADATA, new MetadataExtension(geoPackage).has()); TestCase.assertEquals( has && NON_LINEAR_GEOMETRY_TYPES, extensionsDao.isTableExists() && !extensionsDao .queryByExtension( GeometryExtensions .getExtensionName(GeometryType.CIRCULARSTRING)) .isEmpty()); TestCase.assertEquals(has && WEBP, extensionsDao.isTableExists() && !extensionsDao .queryByExtension(WebPExtension.EXTENSION_NAME) .isEmpty()); TestCase.assertEquals(has && CRS_WKT, new CrsWktExtension(geoPackage).has()); }
Example #3
Source File: GeoPackageExample.java From geopackage-java with MIT License | 5 votes |
private void validateExtensions(GeoPackage geoPackage, boolean has) throws SQLException { ExtensionsDao extensionsDao = geoPackage.getExtensionsDao(); TestCase.assertEquals(has && RTREE_SPATIAL_INDEX, new RTreeIndexExtension(geoPackage).has()); TestCase.assertEquals( has && (RELATED_TABLES_FEATURES || RELATED_TABLES_MEDIA || RELATED_TABLES_SIMPLE_ATTRIBUTES), new RelatedTablesExtension(geoPackage).has()); TestCase.assertEquals(has && COVERAGE_DATA, extensionsDao.isTableExists() && !extensionsDao .queryByExtension(CoverageData.EXTENSION_NAME) .isEmpty()); TestCase.assertEquals(has && SCHEMA, new SchemaExtension(geoPackage).has()); TestCase.assertEquals(has && METADATA, new MetadataExtension(geoPackage).has()); TestCase.assertEquals(has && NON_LINEAR_GEOMETRY_TYPES, extensionsDao.isTableExists() && !extensionsDao .queryByExtension(GeometryExtensions .getExtensionName(GeometryType.CIRCULARSTRING)) .isEmpty()); TestCase.assertEquals(has && WEBP, extensionsDao.isTableExists() && !extensionsDao .queryByExtension(WebPExtension.EXTENSION_NAME) .isEmpty()); TestCase.assertEquals(has && CRS_WKT, new CrsWktExtension(geoPackage).has()); }