Skip to content

Commit

Permalink
support #404
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jan 13, 2025
1 parent 410342b commit 43d80e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions inst/actions/geometa_create_iso_19115.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function(action, entity, config){
include_service_identification <- action$getOption("include_service_identification")
include_coverage_data_dimension_values <- action$getOption("include_coverage_data_dimension_values")
include_coverage_service_dimension_values <- action$getOption("include_coverage_service_dimension_values")
include_online_resource_ids = action$getOption("include_online_resource_ids")

#check inspire metadata validator configuration
INSPIRE_VALIDATOR <- NULL
Expand Down Expand Up @@ -778,6 +779,7 @@ function(action, entity, config){
doi_or$setName("DOI")
doi_or$setDescription("Digital Object Identifier")
doi_or$setProtocol("WWW:LINK-1.0-http--link")
if(include_online_resource_ids) doi_or$setAttr("id", the_doi)
dto$addOnlineResource(doi_or)
}

Expand Down Expand Up @@ -840,6 +842,12 @@ function(action, entity, config){
"WWW:LINK-1.0-http--link"
)
or$setProtocol(protocol)

if(include_online_resource_ids) if(any(sapply(c("wms", "wfs", "wcs","download"), function(x){startsWith(http_relation$key, x)}))) {
resource_id = paste(tolower(entity$identifiers[["id"]]), http_relation$key, tolower(http_relation$name),sep="_")
or$setAttr("id", resource_id)
}

dto$onLine = c(dto$onLine,or)
}
}
Expand Down
4 changes: 4 additions & 0 deletions inst/actions/geometa_create_iso_19115.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ available_options:
def: Include ogc dimensions's range values to coverage description
class: logical
default: false
include_online_resource_ids:
def: Include online resource IDs (Applies only to DOIs, OGC services and download resources)
class: logical
default: false

0 comments on commit 43d80e0

Please sign in to comment.