Skip to content

Commit

Permalink
validate metadata is set
Browse files Browse the repository at this point in the history
  • Loading branch information
bosborn committed Mar 18, 2024
1 parent 3337d6f commit 6e29ec2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/mil/nga/geopackage/dgiwg/DGIWGValidate.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ public static DGIWGValidationErrors validateMetadata(
primaryKey(metadata)));
}

if (metadata.getMetadata() == null
|| metadata.getMetadata().isBlank()) {
mdErrors.add(new DGIWGValidationError(Metadata.TABLE_NAME,
Metadata.COLUMN_METADATA, metadata.getMetadata(),
DGIWGConstants.DMF_BASE_URI,
DGIWGRequirement.METADATA_GPKG,
primaryKey(metadata)));
}

if (!reference.getReferenceScopeName().equalsIgnoreCase(
ReferenceScopeType.GEOPACKAGE.getValue())) {
mdErrors.add(new DGIWGValidationError(
Expand Down

0 comments on commit 6e29ec2

Please sign in to comment.