/** * Set the contents * * @param contents * contents */ public void setContents(Contents contents) { this.contents = contents; if (contents != null) { // Verify the Contents have an attributes data type ContentsDataType dataType = contents.getDataType(); if (dataType == null || dataType != ContentsDataType.ATTRIBUTES) { throw new GeoPackageException("The " + Contents.class.getSimpleName() + " of a " + AttributesTable.class.getSimpleName() + " must have a data type of " + ContentsDataType.ATTRIBUTES.getName()); } } }
/** * {@inheritDoc} */ @Override public AttributesDao getAttributesDao(Contents contents) { if (contents == null) { throw new GeoPackageException("Non null " + Contents.class.getSimpleName() + " is required to create " + AttributesDao.class.getSimpleName()); } if (contents.getDataType() != ContentsDataType.ATTRIBUTES) { throw new GeoPackageException(Contents.class.getSimpleName() + " is required to be of type " + ContentsDataType.ATTRIBUTES + ". Actual: " + contents.getDataTypeString()); } // Read the existing table and create the dao AttributesTableReader tableReader = new AttributesTableReader( contents.getTableName()); AttributesConnection userDb = new AttributesConnection(database); final AttributesTable attributesTable = tableReader.readTable(userDb); attributesTable.setContents(contents); AttributesDao dao = new AttributesDao(getName(), database, userDb, attributesTable); return dao; }
public void setContents(Contents contents) { this.contents = contents; if (contents != null) { // Verify the Contents have a features data type (Spec Requirement // 23) ContentsDataType dataType = contents.getDataType(); if (dataType == null || dataType != ContentsDataType.FEATURES) { throw new GeoPackageException("The " + Contents.class.getSimpleName() + " of a " + GeometryColumnsSfSql.class.getSimpleName() + " must have a data type of " + ContentsDataType.FEATURES.getName()); } fTableName = contents.getId(); } }
+ AttributesDao.class.getSimpleName()); if (contents.getDataType() != ContentsDataType.ATTRIBUTES) { throw new GeoPackageException(Contents.class.getSimpleName() + " is required to be of type "
public void setContents(Contents contents) { this.contents = contents; if (contents != null) { // Verify the Contents have a features data type (Spec Requirement // 23) ContentsDataType dataType = contents.getDataType(); if (dataType == null || dataType != ContentsDataType.FEATURES) { throw new GeoPackageException("The " + Contents.class.getSimpleName() + " of a " + GeometryColumnsSqlMm.class.getSimpleName() + " must have a data type of " + ContentsDataType.FEATURES.getName()); } tableName = contents.getId(); } }
/** * Validate contents * * @param mediaTable media table * @param contents contents */ private static void validateContents(MediaTable mediaTable, Contents contents) { TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getDataType()); TestCase.assertEquals(MediaTable.RELATION_TYPE.getDataType(), contents .getDataType().getName()); TestCase.assertEquals(MediaTable.RELATION_TYPE.getDataType(), contents.getDataTypeString()); TestCase.assertEquals(mediaTable.getTableName(), contents.getTableName()); TestCase.assertNotNull(contents.getLastChange()); }
public void setContents(Contents contents) { this.contents = contents; if (contents != null) { // Verify the Contents have a features data type (Spec Requirement // 23) ContentsDataType dataType = contents.getDataType(); if (dataType == null || dataType != ContentsDataType.FEATURES) { throw new GeoPackageException("The " + Contents.class.getSimpleName() + " of a " + GeometryColumns.class.getSimpleName() + " must have a data type of " + ContentsDataType.FEATURES.getName()); } tableName = contents.getId(); } else { tableName = null; } }
/** * Validate contents * * @param simpleAttributesTable simple attributes table * @param contents contents */ private static void validateContents( SimpleAttributesTable simpleAttributesTable, Contents contents) { TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getDataType()); TestCase.assertEquals( SimpleAttributesTable.RELATION_TYPE.getDataType(), contents .getDataType().getName()); TestCase.assertEquals( SimpleAttributesTable.RELATION_TYPE.getDataType(), contents.getDataTypeString()); TestCase.assertEquals(simpleAttributesTable.getTableName(), contents.getTableName()); TestCase.assertNotNull(contents.getLastChange()); }
public void setContents(Contents contents) { this.contents = contents; if (contents != null) { // Verify the Contents have a tiles data type (Spec Requirement 33) ContentsDataType dataType = contents.getDataType(); if (dataType == null || (dataType != ContentsDataType.TILES && dataType != ContentsDataType.GRIDDED_COVERAGE)) { throw new GeoPackageException("The " + Contents.class.getSimpleName() + " of a " + TileMatrixSet.class.getSimpleName() + " must have a data type of " + ContentsDataType.TILES.getName() + " or " + ContentsDataType.GRIDDED_COVERAGE.getName()); } tableName = contents.getId(); } else { tableName = null; } }
public void setContents(Contents contents) { this.contents = contents; if (contents != null) { // Verify the Contents have a tiles data type (Spec Requirement 42) ContentsDataType dataType = contents.getDataType(); if (dataType == null || (dataType != ContentsDataType.TILES && dataType != ContentsDataType.GRIDDED_COVERAGE)) { throw new GeoPackageException("The " + Contents.class.getSimpleName() + " of a " + TileMatrix.class.getSimpleName() + " must have a data type of " + ContentsDataType.TILES.getName() + " or " + ContentsDataType.GRIDDED_COVERAGE.getName()); } tableName = contents.getId(); } else { tableName = null; } }
/** * Text output from a Contents * * @param contents * contents * @return text */ public String textOutput(Contents contents) { StringBuilder output = new StringBuilder(); output.append("\t" + Contents.COLUMN_TABLE_NAME + ": " + contents.getTableName()); output.append("\n\t" + Contents.COLUMN_DATA_TYPE + ": " + contents.getDataType()); output.append("\n\t" + Contents.COLUMN_IDENTIFIER + ": " + contents.getIdentifier()); output.append("\n\t" + Contents.COLUMN_DESCRIPTION + ": " + contents.getDescription()); output.append("\n\t" + Contents.COLUMN_LAST_CHANGE + ": " + contents.getLastChange()); output.append("\n\t" + Contents.COLUMN_MIN_X + ": " + contents.getMinX()); output.append("\n\t" + Contents.COLUMN_MIN_Y + ": " + contents.getMinY()); output.append("\n\t" + Contents.COLUMN_MAX_X + ": " + contents.getMaxX()); output.append("\n\t" + Contents.COLUMN_MAX_Y + ": " + contents.getMaxY()); output.append("\n" + textOutput(contents.getSrs())); return output.toString(); }
ContentsDataType dataType = contents.getDataType(); if (dataType != null) { switch (dataType) {
if(dao.getTileMatrixSet().getContents().getDataType() != ContentsDataType.GRIDDED_COVERAGE) { TestCase.assertNotNull(bitmap); TestCase.assertEquals(tileMatrix.getTileWidth(), bitmap.getWidth());
TestCase.assertNotNull(result.getDataType()); TestCase.assertNotNull(result.getLastChange()); SpatialReferenceSystem srs = result.getSrs(); fieldValues.put(Contents.COLUMN_DATA_TYPE, contents.getDataType() .getName()); if (contents.getSrs() != null) { boolean found = false; for (Contents queryContentsValue : queryContentsList) { TestCase.assertEquals(contents.getDataType(), queryContentsValue.getDataType()); if (contents.getSrs() != null) { TestCase.assertEquals(contents.getSrs().getSrsId(),
TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getTableName()); TestCase.assertNotNull(contents.getDataType()); TestCase.assertNotNull(contents.getLastChange());
contents.getDataType().getName()); PreparedQuery<Contents> query = qb.prepare(); List<Contents> queryResults = dao.query(query); DeleteBuilder<Contents, String> db = dao.deleteBuilder(); db.where().eq(Contents.COLUMN_DATA_TYPE, contents.getDataType().getName()); PreparedDelete<Contents> deleteQuery = db.prepare(); deleted = dao.delete(deleteQuery);
TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getTableName()); TestCase.assertNotNull(contents.getDataType()); TestCase.assertNotNull(contents.getLastChange());
ContentsDataType dataType = contents.getDataType();
TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getTableName()); TestCase.assertNotNull(contents.getDataType()); TestCase.assertNotNull(contents.getLastChange());
TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getTableName()); TestCase.assertNotNull(contents.getDataType()); TestCase.assertNotNull(contents.getLastChange());