From 313df1bb9b0e93d6636ee57b79d27103851462d3 Mon Sep 17 00:00:00 2001 From: eblondel Date: Tue, 1 Oct 2024 21:40:21 +0200 Subject: [PATCH] #181 use 19139 instead of 19115-1/2 --- R/ISOAbstractObject.R | 6 +-- R/ISOAddress.R | 2 +- R/ISOAnchor.R | 2 +- R/ISOAngle.R | 2 +- R/ISOApplicationSchemaInformation.R | 2 +- R/ISOBaseBoolean.R | 2 +- R/ISOBaseCharacterString.R | 2 +- R/ISOBaseDate.R | 2 +- R/ISOBaseDateTime.R | 2 +- R/ISOBaseDecimal.R | 2 +- R/ISOBaseInteger.R | 2 +- R/ISOBaseReal.R | 2 +- R/ISOBinary.R | 2 +- R/ISOBoundingPolygon.R | 2 +- R/ISOBrowseGraphic.R | 2 +- R/ISOCharacterSet.R | 2 +- R/ISOCitation.R | 2 +- R/ISOCitationSeries.R | 2 +- R/ISOClassification.R | 2 +- R/ISOCodeDefinition.R | 2 +- R/ISOCodeListDictionary.R | 2 +- R/ISOCodelistCatalogue.R | 52 +++++++++++++++++++++++-- R/ISOCodelistValueNew.R | 2 +- R/ISOConstraints.R | 2 +- R/ISOContact.R | 2 +- R/ISOCountry.R | 4 +- R/ISODate.R | 2 +- R/ISODateType.R | 2 +- R/ISODistance.R | 2 +- R/ISOExtent.R | 2 +- R/ISOFileName.R | 2 +- R/ISOFreeText.R | 2 +- R/ISOGeographicBoundingBox.R | 2 +- R/ISOGeographicDescription.R | 2 +- R/ISOGeographicExtent.R | 2 +- R/ISOLanguage.R | 2 +- R/ISOLegalConstraints.R | 2 +- R/ISOLength.R | 2 +- R/ISOLocalName.R | 2 +- R/ISOLocale.R | 2 +- R/ISOLocaleContainer.R | 2 +- R/ISOLocalisedCharacterString.R | 2 +- R/ISOMLCodeDefinition.R | 2 +- R/ISOMLCodeListDictionary.R | 2 +- R/ISOMeasure.R | 2 +- R/ISOMemberName.R | 2 +- R/ISOMetaIdentifier.R | 2 +- R/ISOMetadata.R | 2 +- R/ISOMetadataNamespace.R | 60 ++++++++++++++--------------- R/ISOMetadataSchemas.R | 18 +++++---- R/ISOMimeFileType.R | 2 +- R/ISOMultiplicity.R | 2 +- R/ISOMultiplicityRange.R | 2 +- R/ISOOnLineFunction.R | 2 +- R/ISOOnlineResource.R | 2 +- R/ISOPresentationForm.R | 2 +- R/ISOProgress.R | 2 +- R/ISORestriction.R | 2 +- R/ISORole.R | 2 +- R/ISOScale.R | 2 +- R/ISOScope.R | 2 +- R/ISOScopeDescription.R | 2 +- R/ISOScopedName.R | 2 +- R/ISOSecurityConstraints.R | 2 +- R/ISOSpatialRepresentationType.R | 2 +- R/ISOSpatialTemporalExtent.R | 2 +- R/ISOTelephone.R | 2 +- R/ISOTemporalExtent.R | 2 +- R/ISOTypeName.R | 2 +- R/ISOUnlimitedInteger.R | 2 +- R/ISOVerticalExtent.R | 2 +- R/geometa_coverage.R | 2 +- R/profile.R | 15 +++----- inst/extdata/coverage/coverage.R | 2 +- 74 files changed, 167 insertions(+), 124 deletions(-) diff --git a/R/ISOAbstractObject.R b/R/ISOAbstractObject.R index b1e85a80..d5ca2e9b 100644 --- a/R/ISOAbstractObject.R +++ b/R/ISOAbstractObject.R @@ -58,7 +58,7 @@ ISOAbstractObject <- R6Class("ISOAbstractObject", metadataStandardCompliance = TRUE, xmlElement = "AbstractObject", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ), encoding = options("encoding"), @@ -705,7 +705,7 @@ ISOAbstractObject <- R6Class("ISOAbstractObject", rootXMLAttrs <- rootXMLAttrs[!is.na(rootXMLAttrs)] } freeTextAttr <- list("xsi:type" = switch(getMetadataStandard(), - "19115-1/2" = "gmd:PT_FreeText_PropertyType", + "19139" = "gmd:PT_FreeText_PropertyType", "19115-3" = "lan:PT_FreeText_PropertyType", )) @@ -1472,7 +1472,7 @@ ISOAbstractObject$getStandardByPrefix = function(prefix){ return(std) } -ISOAbstractObject$getISOStandard = function(clazz, version = "19115-1/2"){ +ISOAbstractObject$getISOStandard = function(clazz, version = "19139"){ std <- NA if(is.null(clazz$private_fields)) return(std) if(is.null(clazz$private_fields$xmlNamespacePrefix)) return(std) diff --git a/R/ISOAddress.R b/R/ISOAddress.R index 007db240..b46aadbd 100644 --- a/R/ISOAddress.R +++ b/R/ISOAddress.R @@ -26,7 +26,7 @@ ISOAddress <- R6Class("ISOAddress", private = list( xmlElement = "CI_Address", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOAnchor.R b/R/ISOAnchor.R index 7a379e3b..07cf071a 100644 --- a/R/ISOAnchor.R +++ b/R/ISOAnchor.R @@ -21,7 +21,7 @@ ISOAnchor <- R6Class("ISOAnchor", private = list( xmlElement = "Anchor", xmlNamespacePrefix = list( - "19115-1/2" = "GMX", + "19139" = "GMX", "19115-3" = "GCX" ) ), diff --git a/R/ISOAngle.R b/R/ISOAngle.R index 7a4e0548..3d153b03 100644 --- a/R/ISOAngle.R +++ b/R/ISOAngle.R @@ -17,7 +17,7 @@ ISOAngle <- R6Class("ISOAngle", private = list( xmlElement = "Angle", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOApplicationSchemaInformation.R b/R/ISOApplicationSchemaInformation.R index ea6cce25..e87d643c 100644 --- a/R/ISOApplicationSchemaInformation.R +++ b/R/ISOApplicationSchemaInformation.R @@ -17,7 +17,7 @@ ISOApplicationSchemaInformation <- R6Class("ISOApplicationSchemaInformation", private = list( xmlElement = "MD_ApplicationSchemaInformation", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MAS" ) ), diff --git a/R/ISOBaseBoolean.R b/R/ISOBaseBoolean.R index 89faa543..0d569573 100644 --- a/R/ISOBaseBoolean.R +++ b/R/ISOBaseBoolean.R @@ -19,7 +19,7 @@ ISOBaseBoolean <- R6Class("ISOBaseBoolean", private = list( xmlElement = "Boolean", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOBaseCharacterString.R b/R/ISOBaseCharacterString.R index d6a7f0ea..e3974c6a 100644 --- a/R/ISOBaseCharacterString.R +++ b/R/ISOBaseCharacterString.R @@ -19,7 +19,7 @@ ISOBaseCharacterString <- R6Class("ISOBaseCharacterString", private = list( xmlElement = "CharacterString", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOBaseDate.R b/R/ISOBaseDate.R index 7f6b76fa..7591079f 100644 --- a/R/ISOBaseDate.R +++ b/R/ISOBaseDate.R @@ -19,7 +19,7 @@ ISOBaseDate <- R6Class("ISOBaseDate", private = list( xmlElement = "Date", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOBaseDateTime.R b/R/ISOBaseDateTime.R index 780b82d8..cc469e18 100644 --- a/R/ISOBaseDateTime.R +++ b/R/ISOBaseDateTime.R @@ -19,7 +19,7 @@ ISOBaseDateTime <- R6Class("ISOBaseDateTime", private = list( xmlElement = "DateTime", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOBaseDecimal.R b/R/ISOBaseDecimal.R index a478f51c..70949828 100644 --- a/R/ISOBaseDecimal.R +++ b/R/ISOBaseDecimal.R @@ -18,7 +18,7 @@ ISOBaseDecimal <- R6Class("ISOBaseDecimal", private = list( xmlElement = "Decimal", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ), diff --git a/R/ISOBaseInteger.R b/R/ISOBaseInteger.R index a8d82261..8b7c5f80 100644 --- a/R/ISOBaseInteger.R +++ b/R/ISOBaseInteger.R @@ -19,7 +19,7 @@ ISOBaseInteger <- R6Class("ISOBaseInteger", private = list( xmlElement = "Integer", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOBaseReal.R b/R/ISOBaseReal.R index 1f944060..5cf3f035 100644 --- a/R/ISOBaseReal.R +++ b/R/ISOBaseReal.R @@ -19,7 +19,7 @@ ISOBaseReal <- R6Class("ISOBaseReal", private = list( xmlElement = "Real", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOBinary.R b/R/ISOBinary.R index f7fda8cf..4368d346 100644 --- a/R/ISOBinary.R +++ b/R/ISOBinary.R @@ -20,7 +20,7 @@ ISOBinary <- R6Class("ISOBinary", private = list( xmlElement = "Binary", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOBoundingPolygon.R b/R/ISOBoundingPolygon.R index 9806604a..cdb0d1ce 100644 --- a/R/ISOBoundingPolygon.R +++ b/R/ISOBoundingPolygon.R @@ -19,7 +19,7 @@ ISOBoundingPolygon <- R6Class("ISOBoundingPolygon", private = list( xmlElement = "EX_BoundingPolygon", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/ISOBrowseGraphic.R b/R/ISOBrowseGraphic.R index 53eadae4..90d89091 100644 --- a/R/ISOBrowseGraphic.R +++ b/R/ISOBrowseGraphic.R @@ -25,7 +25,7 @@ ISOBrowseGraphic <- R6Class("ISOBrowseGraphic", private = list( xmlElement = "MD_BrowseGraphic", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCC" ) ), diff --git a/R/ISOCharacterSet.R b/R/ISOCharacterSet.R index e954a491..7783bfb7 100644 --- a/R/ISOCharacterSet.R +++ b/R/ISOCharacterSet.R @@ -24,7 +24,7 @@ ISOCharacterSet <- R6Class("ISOCharacterSet", private = list( xmlElement = "MD_CharacterSetCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "LAN" ) ), diff --git a/R/ISOCitation.R b/R/ISOCitation.R index 94ecba30..978ec4d8 100644 --- a/R/ISOCitation.R +++ b/R/ISOCitation.R @@ -52,7 +52,7 @@ ISOCitation<- R6Class("ISOCitation", private = list( xmlElement = "CI_Citation", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOCitationSeries.R b/R/ISOCitationSeries.R index 724cebc8..f0c81b76 100644 --- a/R/ISOCitationSeries.R +++ b/R/ISOCitationSeries.R @@ -17,7 +17,7 @@ ISOCitationSeries <- R6Class("ISOCitationSeries", private = list( xmlElement = "CI_Series", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOClassification.R b/R/ISOClassification.R index 9484692b..9cbad9ae 100644 --- a/R/ISOClassification.R +++ b/R/ISOClassification.R @@ -24,7 +24,7 @@ ISOClassification <- R6Class("ISOClassification", private = list( xmlElement = "MD_ClassificationCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCO" ) ), diff --git a/R/ISOCodeDefinition.R b/R/ISOCodeDefinition.R index d9cb76b1..afe6cd43 100644 --- a/R/ISOCodeDefinition.R +++ b/R/ISOCodeDefinition.R @@ -19,7 +19,7 @@ ISOCodeDefinition <- R6Class("ISOCodeDefinition", private = list( xmlElement = "CodeDefinition", xmlNamespacePrefix = list( - "19115-1/2" = "GMX" + "19139" = "GMX" ) ), public = list( diff --git a/R/ISOCodeListDictionary.R b/R/ISOCodeListDictionary.R index aea17845..347fc3a8 100644 --- a/R/ISOCodeListDictionary.R +++ b/R/ISOCodeListDictionary.R @@ -19,7 +19,7 @@ ISOCodeListDictionary <- R6Class("ISOCodeListDictionary", private = list( xmlElement = "CodeListDictionary", xmlNamespacePrefix = list( - "19115-1/2" = "GMX" + "19139" = "GMX" ) ), public = list( diff --git a/R/ISOCodelistCatalogue.R b/R/ISOCodelistCatalogue.R index 73258369..5991f366 100644 --- a/R/ISOCodelistCatalogue.R +++ b/R/ISOCodelistCatalogue.R @@ -17,7 +17,7 @@ ISOCodelistCatalogue <- R6Class("ISOCodelistCatalogue", private = list( xmlElement = "CT_CodelistCatalogue", xmlNamespacePrefix = list( - "19115-1/2" = "GMX", + "19139" = "GMX", "19115-3" = "CAT" ) ), @@ -37,10 +37,56 @@ ISOCodelistCatalogue <- R6Class("ISOCodelistCatalogue", #'@description Initializes object #'@param xml object of class \link{XMLInternalNode-class} - initialize = function(xml = NULL){ - super$initialize(xml = xml) + #'@param refFile ref file + initialize = function(xml = NULL, refFile = NULL){ + if(!is.null(refFile)){ + xml = XML::xmlParse(refFile) + xml <- methods::as(xml, "character") + xml <- gsub("", "", xml) + xml <- XML::xmlParse(xml, asText = TRUE) + } + if(!is.null(xml)){ + super$initialize(xml = xml) + } }, + #'@description Decodes and builds an \code{ISOCodelistCatalogue} from XML. This is done + #'specifically for this class, without using the generic \code{ISOAbstractObject} + #'decoder, to make it fully decodable on package load. + #'@param xml object of class \link{XMLInternalNode-class} + # decode = function(xml){ + # message("custom decode") + # xml = XML::xmlRoot(xml) + # children = XML::xmlChildren(xml) + # self$codelistItem = lapply(children[names(children)=="codelistItem"], function(x){ + # xml_dict = XML::xmlChildren(x)[[1]] + # the_dict = switch(xmlName(xml_dict), + # "CodeListDictionary" = { + # dict = ISOCodeListDictionary$new(xml = xml_dict) + # xml_dict_c = xmlChildren(xml_dict) + # dict$codeEntry = lapply(xml_dict_c[names(xml_dict_c)=="codeEntry"], function(y){ + # xml_ce = XML::xmlChildren(y)[[1]] + # ISOCodeDefinition$new(xml = xml_ce) + # }) + # dict + # }, + # "CT_Codelist" = { + # cl = ISOCodelist$new(xml = xml_dict) + # xml_cl = xmlChildren(xml_dict) + # cl$identifier = ISOScopedName$new(xml = xmlChildren(xml_cl$name)[[1]]) + # cl$codeEntry = lapply(xml_cl[names(xml_cl)=="codeEntry"], function(y){ + # xml_clval = XML::xmlChildren(y)[[1]] + # clval = ISOCodelistValue$new(xml = xml_clval) + # xml_clval_c = xmlChildren(xml_clval) + # clval$identifier = ISOScopedName$new(xml = xmlChildren(xml_clval_c$name)[[1]]) + # }) + # cl + # } + # ) + # return(the_dict) + # }) + # }, + #'@description Get codelists. The method ensure an harmonized output made of objects of #' class \link{ISOCodelist}. In the catalogue is built of objects of class \link{ISOCodeListDictionary}, these #' will be mapped as \link{ISOCodelist}, to facilitate the consumption of codelists by \pkg{geometa} diff --git a/R/ISOCodelistValueNew.R b/R/ISOCodelistValueNew.R index 8232b9b0..38a89744 100644 --- a/R/ISOCodelistValueNew.R +++ b/R/ISOCodelistValueNew.R @@ -20,7 +20,7 @@ ISOCodelistValue <- R6Class("ISOCodelistValue", metadataStandardCompliance = FALSE, xmlElement = "CT_CodelistValue", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", #fake to allow codelist value harmonization + "19139" = "GCO", #fake to allow codelist value harmonization "19115-3" = "CAT" ) ), diff --git a/R/ISOConstraints.R b/R/ISOConstraints.R index bd808b41..7f4d7266 100644 --- a/R/ISOConstraints.R +++ b/R/ISOConstraints.R @@ -19,7 +19,7 @@ ISOConstraints<- R6Class("ISOConstraints", private = list( xmlElement = "MD_Constraints", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCO" ) ), diff --git a/R/ISOContact.R b/R/ISOContact.R index f3d54d65..fe2422fe 100644 --- a/R/ISOContact.R +++ b/R/ISOContact.R @@ -36,7 +36,7 @@ ISOContact <- R6Class("ISOContact", private = list( xmlElement = "CI_Contact", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOCountry.R b/R/ISOCountry.R index 8e91074d..89570440 100644 --- a/R/ISOCountry.R +++ b/R/ISOCountry.R @@ -23,11 +23,11 @@ ISOCountry <- R6Class("ISOCountry", inherit = ISOCodeListValue, private = list( xmlElement = list( - "19115-1/2" = "Country", + "19139" = "Country", "19115-3" = "CountryCode" ), xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "LAN" ) ), diff --git a/R/ISODate.R b/R/ISODate.R index 7f46c5a1..22a2faf1 100644 --- a/R/ISODate.R +++ b/R/ISODate.R @@ -23,7 +23,7 @@ ISODate <- R6Class("ISODate", private = list( xmlElement = "CI_Date", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISODateType.R b/R/ISODateType.R index f5dd076a..aed3e9a6 100644 --- a/R/ISODateType.R +++ b/R/ISODateType.R @@ -24,7 +24,7 @@ ISODateType <- R6Class("ISODateType", private = list( xmlElement = "CI_DateTypeCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISODistance.R b/R/ISODistance.R index 28215be8..e9a87276 100644 --- a/R/ISODistance.R +++ b/R/ISODistance.R @@ -26,7 +26,7 @@ ISODistance <- R6Class("ISODistance", private = list( xmlElement = "Distance", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOExtent.R b/R/ISOExtent.R index f21b8214..66fff5db 100644 --- a/R/ISOExtent.R +++ b/R/ISOExtent.R @@ -17,7 +17,7 @@ ISOExtent <- R6Class("ISOExtent", private = list( xmlElement = "EX_Extent", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/ISOFileName.R b/R/ISOFileName.R index 980f1505..436877f2 100644 --- a/R/ISOFileName.R +++ b/R/ISOFileName.R @@ -21,7 +21,7 @@ ISOFileName <- R6Class("ISOFileName", private = list( xmlElement = "FileName", xmlNamespacePrefix = list( - "19115-1/2" = "GMX", + "19139" = "GMX", "19115-3" = "GCX" ) ), diff --git a/R/ISOFreeText.R b/R/ISOFreeText.R index c6d06ca2..18fe89f4 100644 --- a/R/ISOFreeText.R +++ b/R/ISOFreeText.R @@ -20,7 +20,7 @@ ISOFreeText <- R6Class("ISOFreeText", private = list( xmlElement = "PT_FreeText", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "LAN" ) ), diff --git a/R/ISOGeographicBoundingBox.R b/R/ISOGeographicBoundingBox.R index b7541b17..0c427a21 100644 --- a/R/ISOGeographicBoundingBox.R +++ b/R/ISOGeographicBoundingBox.R @@ -21,7 +21,7 @@ ISOGeographicBoundingBox <- R6Class("ISOGeographicBoundingBox", private = list( xmlElement = "EX_GeographicBoundingBox", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/ISOGeographicDescription.R b/R/ISOGeographicDescription.R index ab2c0c2e..54ef5f76 100644 --- a/R/ISOGeographicDescription.R +++ b/R/ISOGeographicDescription.R @@ -22,7 +22,7 @@ ISOGeographicDescription <- R6Class("ISOGeographicDescription", private = list( xmlElement = "EX_GeographicDescription", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/ISOGeographicExtent.R b/R/ISOGeographicExtent.R index 78fd2342..7b7489ab 100644 --- a/R/ISOGeographicExtent.R +++ b/R/ISOGeographicExtent.R @@ -19,7 +19,7 @@ ISOGeographicExtent <- R6Class("ISOGeographicExtent", private = list( xmlElement = "AbstractEX_GeographicExtent", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/ISOLanguage.R b/R/ISOLanguage.R index 9b6d8e57..1d442399 100644 --- a/R/ISOLanguage.R +++ b/R/ISOLanguage.R @@ -24,7 +24,7 @@ ISOLanguage <- R6Class("ISOLanguage", private = list( xmlElement = "LanguageCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "LAN" ) ), diff --git a/R/ISOLegalConstraints.R b/R/ISOLegalConstraints.R index be994697..5294129d 100644 --- a/R/ISOLegalConstraints.R +++ b/R/ISOLegalConstraints.R @@ -30,7 +30,7 @@ ISOLegalConstraints <- R6Class("ISOLegalConstraints", private = list( xmlElement = "MD_LegalConstraints", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCO" ) ), diff --git a/R/ISOLength.R b/R/ISOLength.R index d78a2eb1..8a927b66 100644 --- a/R/ISOLength.R +++ b/R/ISOLength.R @@ -17,7 +17,7 @@ ISOLength <- R6Class("ISOLength", private = list( xmlElement = "Length", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOLocalName.R b/R/ISOLocalName.R index 4e1ad2f9..537b2f62 100644 --- a/R/ISOLocalName.R +++ b/R/ISOLocalName.R @@ -17,7 +17,7 @@ ISOLocalName <- R6Class("ISOLocalName", private = list( xmlElement = "LocalName", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOLocale.R b/R/ISOLocale.R index 88ed13a3..8aae3da3 100644 --- a/R/ISOLocale.R +++ b/R/ISOLocale.R @@ -24,7 +24,7 @@ ISOLocale <- R6Class("ISOLocale", private = list( xmlElement = "PT_Locale", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "LAN" ) ), diff --git a/R/ISOLocaleContainer.R b/R/ISOLocaleContainer.R index 059af75d..5a913c4c 100644 --- a/R/ISOLocaleContainer.R +++ b/R/ISOLocaleContainer.R @@ -17,7 +17,7 @@ ISOLocaleContainer <- R6Class("ISOLocaleContainer", private = list( xmlElement = "PT_LocaleContainer", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "LAN" ) ), diff --git a/R/ISOLocalisedCharacterString.R b/R/ISOLocalisedCharacterString.R index a074dcff..44cadc79 100644 --- a/R/ISOLocalisedCharacterString.R +++ b/R/ISOLocalisedCharacterString.R @@ -21,7 +21,7 @@ ISOLocalisedCharacterString <- R6Class("ISOLocalisedCharacterString", private = list( xmlElement = "LocalisedCharacterString", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "LAN" ) ), diff --git a/R/ISOMLCodeDefinition.R b/R/ISOMLCodeDefinition.R index 52e25c12..a8d423db 100644 --- a/R/ISOMLCodeDefinition.R +++ b/R/ISOMLCodeDefinition.R @@ -19,7 +19,7 @@ ISOMLCodeDefinition <- R6Class("ISOMLCodeDefinition", private = list( xmlElement = "ML_CodeDefinition", xmlNamespacePrefix = list( - "19115-1/2" = "GMX" + "19139" = "GMX" ) ), public = list( diff --git a/R/ISOMLCodeListDictionary.R b/R/ISOMLCodeListDictionary.R index bd3652bc..72eac657 100644 --- a/R/ISOMLCodeListDictionary.R +++ b/R/ISOMLCodeListDictionary.R @@ -19,7 +19,7 @@ ISOMLCodeListDictionary <- R6Class("ISOMLCodeListDictionary", private = list( xmlElement = "ML_CodeListDictionary", xmlNamespacePrefix = list( - "19115-1/2" = "GMX" + "19139" = "GMX" ) ), public = list( diff --git a/R/ISOMeasure.R b/R/ISOMeasure.R index 15ebf99b..932cdfd7 100644 --- a/R/ISOMeasure.R +++ b/R/ISOMeasure.R @@ -17,7 +17,7 @@ ISOMeasure <- R6Class("ISOMeasure", private = list( xmlElement = "Measure", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOMemberName.R b/R/ISOMemberName.R index 933bf11e..327c8432 100644 --- a/R/ISOMemberName.R +++ b/R/ISOMemberName.R @@ -17,7 +17,7 @@ ISOMemberName <- R6Class("ISOMemberName", private = list( xmlElement = "MemberName", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOMetaIdentifier.R b/R/ISOMetaIdentifier.R index 54c25e99..5be45c84 100644 --- a/R/ISOMetaIdentifier.R +++ b/R/ISOMetaIdentifier.R @@ -21,7 +21,7 @@ ISOMetaIdentifier <- R6Class("ISOMetaIdentifier", private = list( xmlElement = "MD_Identifier", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCC" ) ), diff --git a/R/ISOMetadata.R b/R/ISOMetadata.R index ac6e319d..55da876d 100644 --- a/R/ISOMetadata.R +++ b/R/ISOMetadata.R @@ -333,7 +333,7 @@ ISOMetadata <- R6Class("ISOMetadata", document = TRUE, xmlElement = "MD_Metadata", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MDB" ) ), diff --git a/R/ISOMetadataNamespace.R b/R/ISOMetadataNamespace.R index c9d6f23e..cb658fa5 100644 --- a/R/ISOMetadataNamespace.R +++ b/R/ISOMetadataNamespace.R @@ -49,7 +49,7 @@ ISOMetadataNamespace <- R6Class("ISOMetadataNamespace", #' setMetadataNamespaces #' @export -setISOMetadataNamespaces <- function(version = "19115-1/2"){ +setISOMetadataNamespaces <- function(version = "19139"){ #XML 1.0 #---------------------------------------------------- @@ -98,7 +98,7 @@ setISOMetadataNamespaces <- function(version = "19115-1/2"){ #ISO 19115 and related #---------------------------------------------------- iso_namespaces <- switch(version, - "19115-1/2" = list( + "19139" = list( #ISO 19110 #---------------------------------------------------- #GFC @@ -147,144 +147,144 @@ setISOMetadataNamespaces <- function(version = "19115-1/2"){ #FCC ISOMetadataNamespace$new( id = "fcc", uri = "https://standards.iso.org/iso/19110/fcc/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO/TS 19139:2007", title = "Feature Catalog Common (FCC) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO/TS 19139:2007", title = "Feature Catalog Common (FCC) Version: 1.0", stringsAsFactors = FALSE) ), #ISO 19115-3 #---------------------------------------------------- #CAT ISOMetadataNamespace$new( id = "cat", uri = "http://standards.iso.org/iso/19115/-3/cat/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO/TS 19139:2007", title = "CATalogue Objects (CAT) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO/TS 19139:2007", title = "CATalogue Objects (CAT) Version: 1.0", stringsAsFactors = FALSE) ), #CIT ISOMetadataNamespace$new( id = "cit", uri = "http://standards.iso.org/iso/19115/-3/cit/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Citation and responsible party information (CIT) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Citation and responsible party information (CIT) Version: 2.0", stringsAsFactors = FALSE) ), #GCO ISOMetadataNamespace$new( id = "gco", uri = "http://standards.iso.org/iso/19115/-3/gco/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Geospatial COmmon Objects (GCO) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Geospatial COmmon Objects (GCO) Version: 1.0", stringsAsFactors = FALSE) ), #GCX ISOMetadataNamespace$new( id = "gcx", uri = "http://standards.iso.org/iso/19115/-3/gcx/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Geospatial Common eXtension (GCX) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Geospatial Common eXtension (GCX) Version: 1.0", stringsAsFactors = FALSE) ), #GEX ISOMetadataNamespace$new( id = "gex", uri = "http://standards.iso.org/iso/19115/-3/gex/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Geospatial EXtent (GEX) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Geospatial EXtent (GEX) Version: 1.0", stringsAsFactors = FALSE) ), #GMW ISOMetadataNamespace$new( id = "gmw", uri = "http://standards.iso.org/iso/19115/-3/gmw/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Geographic Markup Wrappers (GMW) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Geographic Markup Wrappers (GMW) Version: 1.0", stringsAsFactors = FALSE) ), #LAN ISOMetadataNamespace$new( id = "lan", uri = "http://standards.iso.org/iso/19115/-3/lan/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "metadata for LANguage and localization (LAN) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "metadata for LANguage and localization (LAN) Version: 1.0", stringsAsFactors = FALSE) ), #MAC ISOMetadataNamespace$new( id = "mac", uri = "http://standards.iso.org/iso/19115/-3/mac/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for ACquisition (MAC) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for ACquisition (MAC) Version: 2.0", stringsAsFactors = FALSE) ), #MAS ISOMetadataNamespace$new( id = "mas", uri = "http://standards.iso.org/iso/19115/-3/mas/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Application Schemas (MAS) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Application Schemas (MAS) Version: 2.0", stringsAsFactors = FALSE) ), #MCC ISOMetadataNamespace$new( id = "mcc", uri = "http://standards.iso.org/iso/19115/-3/mcc/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata Common Classes (MCC) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata Common Classes (MCC) Version: 1.0", stringsAsFactors = FALSE) ), #MCO ISOMetadataNamespace$new( id = "mco", uri = "http://standards.iso.org/iso/19115/-3/mco/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for COnstraints (MCO) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for COnstraints (MCO) Version: 1.0", stringsAsFactors = FALSE) ), #MDA ISOMetadataNamespace$new( id = "mda", uri = "http://standards.iso.org/iso/19115/-3/mda/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "MetaData for Applications (MDA) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "MetaData for Applications (MDA) Version: 2.0", stringsAsFactors = FALSE) ), #MDB ISOMetadataNamespace$new( id = "mdb", uri = "http://standards.iso.org/iso/19115/-3/mdb/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "MetaData Base (MDB) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "MetaData Base (MDB) Version: 2.0", stringsAsFactors = FALSE) ), #MDS ISOMetadataNamespace$new( id = "mds", uri = "http://standards.iso.org/iso/19115/-3/mds/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "MetaData for Service identification (MDS) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "MetaData for Service identification (MDS) Version: 2.0", stringsAsFactors = FALSE) ), #MDT ISOMetadataNamespace$new( id = "mdt", uri = "http://standards.iso.org/iso/19115/-3/mdt/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Data Transfer (MDT) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Data Transfer (MDT) Version: 2.0", stringsAsFactors = FALSE) ), #MEX ISOMetadataNamespace$new( id = "mex", uri = "http://standards.iso.org/iso/19115/-3/mex/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata EXtensions (MEX) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata EXtensions (MEX) Version: 1.0", stringsAsFactors = FALSE) ), #MMI ISOMetadataNamespace$new( id = "mmi", uri = "http://standards.iso.org/iso/19115/-3/mmi/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Maintenance Information (MMI) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Maintenance Information (MMI) Version: 1.0", stringsAsFactors = FALSE) ), #MPC ISOMetadataNamespace$new( id = "mpc", uri = "http://standards.iso.org/iso/19115/-3/mpc/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Portrayal Catalogues (MPC) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Portrayal Catalogues (MPC) Version: 1.0", stringsAsFactors = FALSE) ), #MRC ISOMetadataNamespace$new( id = "mrc", uri = "http://standards.iso.org/iso/19115/-3/mrc/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Resource Content (MRC) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Resource Content (MRC) Version: 1.0", stringsAsFactors = FALSE) ), #MRD ISOMetadataNamespace$new( id = "mrd", uri = "http://standards.iso.org/iso/19115/-3/mrd/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Resource Distribution (MRD) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Resource Distribution (MRD) Version: 1.0", stringsAsFactors = FALSE) ), #MRI ISOMetadataNamespace$new( id = "mri", uri = "http://standards.iso.org/iso/19115/-3/mri/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Resource Identification (MRI) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Resource Identification (MRI) Version: 1.0", stringsAsFactors = FALSE) ), #MRL ISOMetadataNamespace$new( id = "mrl", uri = "http://standards.iso.org/iso/19115/-3/mrl/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Resource Lineage (MRL) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Resource Lineage (MRL) Version: 2.0", stringsAsFactors = FALSE) ), #MRS ISOMetadataNamespace$new( id = "mrs", uri = "http://standards.iso.org/iso/19115/-3/mrs/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Reference Systems (MRS) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Reference Systems (MRS) Version: 1.0", stringsAsFactors = FALSE) ), #MSR ISOMetadataNamespace$new( id = "msr", uri = "http://standards.iso.org/iso/19115/-3/msr/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for Spatial Representation (MSR) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for Spatial Representation (MSR) Version: 2.0", stringsAsFactors = FALSE) ), #SRV ISOMetadataNamespace$new( id = "srv", uri = "http://standards.iso.org/iso/19115/-3/srv/2.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19115-1:2014", title = "Metadata for SeRVices (SRV) Version: 2.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19115-1:2014", title = "Metadata for SeRVices (SRV) Version: 2.0", stringsAsFactors = FALSE) ), #DQC ISOMetadataNamespace$new( id = "dqc", uri = "http://standards.iso.org/iso/19157/-2/dqc/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19157", title = "Data Quality abstract Classes (DQC) Version 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19157", title = "Data Quality abstract Classes (DQC) Version 1.0", stringsAsFactors = FALSE) ), #MDQ ISOMetadataNamespace$new( id = "mdq", uri = "http://standards.iso.org/iso/19157/-2/mdq/1.0", - standard = data.frame(specification = "ISO/TS 19115-3:2016", schema = "ISO 19157", title = "Metadata for Data Quality (MDQ) Version: 1.0", stringsAsFactors = FALSE) + standard = data.frame(specification = "ISO/TS 19115-3:2023", schema = "ISO 19157", title = "Metadata for Data Quality (MDQ) Version: 1.0", stringsAsFactors = FALSE) ) ) ) diff --git a/R/ISOMetadataSchemas.R b/R/ISOMetadataSchemas.R index 75ae0b97..319f995f 100644 --- a/R/ISOMetadataSchemas.R +++ b/R/ISOMetadataSchemas.R @@ -26,8 +26,8 @@ registerISOMetadataSchema <- function(xsdFile){ #'getISOMetadataSchemaFile #'@export -getISOMetadataSchemaFile <- function(version = "19115-1/2"){ - available_versions <- c("19115-1/2","19115-3") +getISOMetadataSchemaFile <- function(version = "19139"){ + available_versions <- c("19139","19115-3") if(!version %in% available_versions){ errMsg <- sprintf("Version '%s' not among available schema versions (%s)", version, paste0(available_versions, collapse = ",")) @@ -35,11 +35,11 @@ getISOMetadataSchemaFile <- function(version = "19115-1/2"){ } schemaPath <- "extdata/schemas" namespace <- switch(version, - "19115-1/2" = "19115/-1/gmd", + "19139" = "19115/-1/gmd", "19115-3" = "19115/-3/mdb/2.0" ) xsdFilename <- switch(version, - "19115-1/2" = "gmd.xsd", + "19139" = "gmd.xsd", "19115-3" = "mdb.xsd" ) defaultXsdFile <- system.file(paste(schemaPath, namespace, sep="/"), xsdFilename, package = "geometa", mustWork = TRUE) @@ -48,7 +48,7 @@ getISOMetadataSchemaFile <- function(version = "19115-1/2"){ #'setISOMetadataSchemas #'@export -setISOMetadataSchemas <- function(version = "19115-1/2"){ +setISOMetadataSchemas <- function(version = "19139"){ packageStartupMessage("Loading ISO 19139 XML schemas...") registerISOMetadataSchema(getISOMetadataSchemaFile(version = version)) } @@ -76,7 +76,7 @@ getISOMetadataSchemas <- function(){ #' @title setMetadataStandard #' @export #' @description \code{setMetadataStandard} allows to set the standard to use for encoding/decoding in \pkg{geometa}. -#' By default the standard "19115-1/2" will be used. Possible alternative value "19115-3" +#' By default the standard "19139" will be used. Possible alternative value "19115-3" #' #' @usage setMetadataStandard(version) #' @@ -87,15 +87,17 @@ getISOMetadataSchemas <- function(){ #' #' @author Emmanuel Blondel, \email{emmanuel.blondel1@@gmail.com} # -setMetadataStandard <- function(version = "19115-1/2"){ - available_versions <- c("19115-1/2","19115-3") +setMetadataStandard <- function(version = "19139"){ + available_versions <- c("19139","19115-3") if(!version %in% available_versions){ errMsg <- sprintf("Version '%s' not among available schema versions (%s)", version, paste0(available_versions, collapse = ",")) stop(errMsg) } .geometa.iso$version <- version + setISOMetadataSchemas(version = version) setISOMetadataNamespaces(version = version) + setISOCodelists() } #' @name getMetadataStandard diff --git a/R/ISOMimeFileType.R b/R/ISOMimeFileType.R index d4952559..ae26e224 100644 --- a/R/ISOMimeFileType.R +++ b/R/ISOMimeFileType.R @@ -21,7 +21,7 @@ ISOMimeFileType <- R6Class("ISOMimeFileType", private = list( xmlElement = "MimeFileType", xmlNamespacePrefix = list( - "19115-1/2" = "GMX", + "19139" = "GMX", "19115-3" = "GCX" ) ), diff --git a/R/ISOMultiplicity.R b/R/ISOMultiplicity.R index 93590cae..9cedfdbc 100644 --- a/R/ISOMultiplicity.R +++ b/R/ISOMultiplicity.R @@ -21,7 +21,7 @@ ISOMultiplicity <- R6Class("ISOMultiplicity", private = list( xmlElement = "Multiplicity", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOMultiplicityRange.R b/R/ISOMultiplicityRange.R index d0f20ed6..d6846f9b 100644 --- a/R/ISOMultiplicityRange.R +++ b/R/ISOMultiplicityRange.R @@ -22,7 +22,7 @@ ISOMultiplicityRange <- R6Class("ISOMultiplicityRange", private = list( xmlElement = "MultiplicityRange", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOOnLineFunction.R b/R/ISOOnLineFunction.R index 87cd107b..92ee9868 100644 --- a/R/ISOOnLineFunction.R +++ b/R/ISOOnLineFunction.R @@ -24,7 +24,7 @@ ISOOnLineFunction <- R6Class("ISOOnLineFunction", private = list( xmlElement = "CI_OnLineFunctionCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOOnlineResource.R b/R/ISOOnlineResource.R index 5ec79f8d..26f51d4c 100644 --- a/R/ISOOnlineResource.R +++ b/R/ISOOnlineResource.R @@ -26,7 +26,7 @@ ISOOnlineResource <- R6Class("ISOOnlineResource", private = list( xmlElement = "CI_OnlineResource", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOPresentationForm.R b/R/ISOPresentationForm.R index 9ef268b5..c82546fc 100644 --- a/R/ISOPresentationForm.R +++ b/R/ISOPresentationForm.R @@ -24,7 +24,7 @@ ISOPresentationForm <- R6Class("ISOPresentationForm", private = list( xmlElement = "CI_PresentationFormCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOProgress.R b/R/ISOProgress.R index 168b2d15..0bc9d2c6 100644 --- a/R/ISOProgress.R +++ b/R/ISOProgress.R @@ -25,7 +25,7 @@ ISOProgress<- R6Class("ISOProgress", private = list( xmlElement = "MD_ProgressCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCC" ) ), diff --git a/R/ISORestriction.R b/R/ISORestriction.R index daf6feae..79cb607b 100644 --- a/R/ISORestriction.R +++ b/R/ISORestriction.R @@ -24,7 +24,7 @@ ISORestriction <- R6Class("ISORestriction", private = list( xmlElement = "MD_RestrictionCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCO" ) ), diff --git a/R/ISORole.R b/R/ISORole.R index 40df777d..a3338a78 100644 --- a/R/ISORole.R +++ b/R/ISORole.R @@ -24,7 +24,7 @@ ISORole <- R6Class("ISORole", private = list( xmlElement = "CI_RoleCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOScale.R b/R/ISOScale.R index 81a7a9f4..f9ffe228 100644 --- a/R/ISOScale.R +++ b/R/ISOScale.R @@ -17,7 +17,7 @@ ISOScale <- R6Class("ISOScale", private = list( xmlElement = "Scale", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOScope.R b/R/ISOScope.R index d4671038..7f807fee 100644 --- a/R/ISOScope.R +++ b/R/ISOScope.R @@ -30,7 +30,7 @@ ISOScope <- R6Class("ISOScope", private = list( xmlElement = "MD_ScopeCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCC" ) ), diff --git a/R/ISOScopeDescription.R b/R/ISOScopeDescription.R index 46be32d8..dfc78b1e 100644 --- a/R/ISOScopeDescription.R +++ b/R/ISOScopeDescription.R @@ -21,7 +21,7 @@ ISOScopeDescription <- R6Class("ISOScopeDescription", private = list( xmlElement = "MD_ScopeDescription", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCC" ) ), diff --git a/R/ISOScopedName.R b/R/ISOScopedName.R index a3e56a47..22e38655 100644 --- a/R/ISOScopedName.R +++ b/R/ISOScopedName.R @@ -17,7 +17,7 @@ ISOScopedName <- R6Class("ISOScopedName", private = list( xmlElement = "ScopedName", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOSecurityConstraints.R b/R/ISOSecurityConstraints.R index 7adc4b71..d301d78a 100644 --- a/R/ISOSecurityConstraints.R +++ b/R/ISOSecurityConstraints.R @@ -27,7 +27,7 @@ ISOSecurityConstraints <- R6Class("ISOSecurityConstraints", private = list( xmlElement = "MD_SecurityConstraints", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCO" ) ), diff --git a/R/ISOSpatialRepresentationType.R b/R/ISOSpatialRepresentationType.R index a775543f..5b9694d6 100644 --- a/R/ISOSpatialRepresentationType.R +++ b/R/ISOSpatialRepresentationType.R @@ -25,7 +25,7 @@ ISOSpatialRepresentationType <- R6Class("ISOSpatialRepresentationType", private = list( xmlElement = "MD_SpatialRepresentationTypeCode", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "MCC" ) ), diff --git a/R/ISOSpatialTemporalExtent.R b/R/ISOSpatialTemporalExtent.R index 14fc5015..fe3e586a 100644 --- a/R/ISOSpatialTemporalExtent.R +++ b/R/ISOSpatialTemporalExtent.R @@ -29,7 +29,7 @@ ISOSpatialTemporalExtent <- R6Class("ISOSpatialTemporalExtent", private = list( xmlElement = "EX_SpatialTemporalExtent", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/ISOTelephone.R b/R/ISOTelephone.R index 143594b6..72d7fd77 100644 --- a/R/ISOTelephone.R +++ b/R/ISOTelephone.R @@ -23,7 +23,7 @@ ISOTelephone <- R6Class("ISOTelephone", private = list( xmlElement = "CI_Telephone", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "CIT" ) ), diff --git a/R/ISOTemporalExtent.R b/R/ISOTemporalExtent.R index 283e781f..5495e7f3 100644 --- a/R/ISOTemporalExtent.R +++ b/R/ISOTemporalExtent.R @@ -24,7 +24,7 @@ ISOTemporalExtent <- R6Class("ISOTemporalExtent", private = list( xmlElement = "EX_TemporalExtent", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/ISOTypeName.R b/R/ISOTypeName.R index 3e735451..15d798dd 100644 --- a/R/ISOTypeName.R +++ b/R/ISOTypeName.R @@ -21,7 +21,7 @@ ISOTypeName <- R6Class("ISOTypeName", private = list( xmlElement = "TypeName", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOUnlimitedInteger.R b/R/ISOUnlimitedInteger.R index 3ed7e0df..639ec6a4 100644 --- a/R/ISOUnlimitedInteger.R +++ b/R/ISOUnlimitedInteger.R @@ -19,7 +19,7 @@ ISOUnlimitedInteger <- R6Class("ISOUnlimitedInteger", private = list( xmlElement = "UnlimitedInteger", xmlNamespacePrefix = list( - "19115-1/2" = "GCO", + "19139" = "GCO", "19115-3" = "GCO" ) ), diff --git a/R/ISOVerticalExtent.R b/R/ISOVerticalExtent.R index 3df101d6..5f5fd504 100644 --- a/R/ISOVerticalExtent.R +++ b/R/ISOVerticalExtent.R @@ -23,7 +23,7 @@ ISOVerticalExtent <- R6Class("ISOVerticalExtent", private = list( xmlElement = "EX_VerticalExtent", xmlNamespacePrefix = list( - "19115-1/2" = "GMD", + "19139" = "GMD", "19115-3" = "GEX" ) ), diff --git a/R/geometa_coverage.R b/R/geometa_coverage.R index d9077d32..ec4080a3 100644 --- a/R/geometa_coverage.R +++ b/R/geometa_coverage.R @@ -238,7 +238,7 @@ get_schema_elements <- function(url, verbose = FALSE, schemaCollector = new.env( #' #' @author Emmanuel Blondel, \email{emmanuel.blondel1@@gmail.com} #' -geometa_coverage <- function(version = "19115-1/2"){ +geometa_coverage <- function(version = "19139"){ setMetadataStandard(version = version) xsd_filepath = getISOMetadataSchemaFile(version = version) elements <- get_schema_elements(xsd_filepath) diff --git a/R/profile.R b/R/profile.R index 71044a9e..4682b519 100644 --- a/R/profile.R +++ b/R/profile.R @@ -12,18 +12,13 @@ assign(".geometa.iana", new.env(), envir= asNamespace(pkgname)) #set default metadata standard - setMetadataStandard(version = "19115-1/2") - - #set ISO metadata namespaces - setISOMetadataNamespaces() - - #set ISO schemas - setISOMetadataSchemas(version = "19115-1/2") - setISOMetadataSchemas(version = "19115-3") - - #set ISO codelists + #setMetadataStandard(version = "19139") + #setISOMetadataNamespaces(version = "19139") + .geometa.iso$version <- "19139" + setISOMetadataSchemas(version = "19139") setISOCodelists() + #set IANA Mime Types setIANAMimeTypes() diff --git a/inst/extdata/coverage/coverage.R b/inst/extdata/coverage/coverage.R index c024e127..e3a26949 100644 --- a/inst/extdata/coverage/coverage.R +++ b/inst/extdata/coverage/coverage.R @@ -1,6 +1,6 @@ #compute coverage require(geometa, quietly = TRUE) -cov_1 <- geometa_coverage(version = "19115-1/2") +cov_1 <- geometa_coverage(version = "19139") cov_2 <- geometa_coverage(version = "19115-3") cov <- unique(rbind(cov_1, cov_2))