From f97006dbafd597588da8985ce1f3fa59f1c42022 Mon Sep 17 00:00:00 2001 From: eblondel Date: Wed, 26 Jul 2023 23:19:50 +0200 Subject: [PATCH] #337 --- inst/metadata/entity/entity_handler_csw.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inst/metadata/entity/entity_handler_csw.R b/inst/metadata/entity/entity_handler_csw.R index 14869fd8..c37332b8 100644 --- a/inst/metadata/entity/entity_handler_csw.R +++ b/inst/metadata/entity/entity_handler_csw.R @@ -64,7 +64,7 @@ handle_entities_csw <- function(config, source, handle = TRUE){ code = code_parts[length(code_parts)] code_parts = unlist(strsplit(code, ":")) code = code_parts[length(code_parts)] - entity$setSrid(code) + entity$setSrid(as.integer(code)) } #parent identifier @@ -306,7 +306,11 @@ handle_entities_csw <- function(config, source, handle = TRUE){ "http" ) rel$setKey(key) - rel$setName(online_resource$name) + if(is(online_resource$name, "ISOMimeFileType")){ + rel$setName(online_resource$name$value) + }else{ + rel$setName(online_resource$name) + } rel$setDescription(online_resource$description) rel$setLink(online_resource$linkage$value) entity$addRelation(rel)