From f9540cfaa3e307aa2844fb41316fb8a6eb44bfd8 Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 30 Dec 2024 01:25:14 +0100 Subject: [PATCH] #181 - addition of SRV + GFC implementation --- NAMESPACE | 6 + R/ISOAbstractPropertyType.R | 47 +- R/ISOCodeListValue.R | 2 +- R/ISOCodelist.R | 2 +- R/ISOFeatureAttribute.R | 16 +- R/ISOFeatureCatalogue.R | 17 +- R/ISOFeatureType.R | 192 +------ R/ISOFeatureType19115_3.R | 266 +++++++++ R/ISOFeatureType19139.R | 250 +++++++++ R/ISOOperationMetadata.R | 14 +- R/ISOProgress.R | 4 +- R/ISOSRVParameter.R | 10 +- R/ISOServiceIdentification.R | 116 +++- inst/extdata/schemas/19115/-3/mdb/2.0/mdb.xsd | 4 + man/ISOAbstractPropertyType.Rd | 25 +- man/ISOAssociationRole.Rd | 1 + man/ISOFeatureAssociation.Rd | 16 - man/ISOFeatureAttribute.Rd | 4 +- man/ISOFeatureCatalogue.Rd | 2 +- man/ISOFeatureOperation.Rd | 1 + man/ISOFeatureType.Rd | 353 +----------- man/ISOFeatureType19115_3.Rd | 528 ++++++++++++++++++ man/ISOFeatureType19139.Rd | 503 +++++++++++++++++ man/ISOOperationMetadata.Rd | 6 +- man/ISOPropertyType.Rd | 1 + man/ISOSRVParameter.Rd | 6 +- man/ISOSRVServiceIdentification19115_3.Rd | 136 +++++ man/ISOSRVServiceIdentification19139.Rd | 126 +++++ man/ISOServiceIdentification19115_3.Rd | 136 +++++ man/ISOServiceIdentification19139.Rd | 126 +++++ man/ISOStatus.Rd | 2 +- tests/testthat/test_ISODataQuality.R | 4 +- tests/testthat/test_ISOFeatureCatalogue.R | 88 +++ tests/testthat/test_ISOGeorectified.R | 4 +- tests/testthat/test_ISOImageryMetadata.R | 6 +- tests/testthat/test_ISOOperationMetadata.R | 4 +- ..._ISOParameter.R => test_ISOSRVParameter.R} | 14 +- tests/testthat/test_ISOScopeCode.R | 25 - 38 files changed, 2438 insertions(+), 625 deletions(-) create mode 100644 R/ISOFeatureType19115_3.R create mode 100644 R/ISOFeatureType19139.R create mode 100644 man/ISOFeatureType19115_3.Rd create mode 100644 man/ISOFeatureType19139.Rd create mode 100644 man/ISOSRVServiceIdentification19115_3.Rd create mode 100644 man/ISOSRVServiceIdentification19139.Rd create mode 100644 man/ISOServiceIdentification19115_3.Rd create mode 100644 man/ISOServiceIdentification19139.Rd rename tests/testthat/{test_ISOParameter.R => test_ISOSRVParameter.R} (86%) delete mode 100644 tests/testthat/test_ISOScopeCode.R diff --git a/NAMESPACE b/NAMESPACE index b11ff81c..a3319b46 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -217,6 +217,8 @@ export(ISOFeatureCatalogue) export(ISOFeatureCatalogueDescription) export(ISOFeatureOperation) export(ISOFeatureType) +export(ISOFeatureType19115_3) +export(ISOFeatureType19139) export(ISOFeatureTypeInfo) export(ISOFileName) export(ISOFormat) @@ -361,6 +363,8 @@ export(ISORoleType) export(ISOSRVParameter) export(ISOSRVParameterDirection) export(ISOSRVServiceIdentification) +export(ISOSRVServiceIdentification19115_3) +export(ISOSRVServiceIdentification19139) export(ISOSampleBasedInspection) export(ISOSampleDimension) export(ISOScale) @@ -372,6 +376,8 @@ export(ISOSecurityConstraints) export(ISOSensor) export(ISOSeries) export(ISOServiceIdentification) +export(ISOServiceIdentification19115_3) +export(ISOServiceIdentification19139) export(ISOSource) export(ISOSpatialRepresentation) export(ISOSpatialRepresentationType) diff --git a/R/ISOAbstractPropertyType.R b/R/ISOAbstractPropertyType.R index 4d49480f..81187f40 100644 --- a/R/ISOAbstractPropertyType.R +++ b/R/ISOAbstractPropertyType.R @@ -26,6 +26,8 @@ ISOAbstractPropertyType <- R6Class("ISOAbstractPropertyType", definition = NULL, #'@field cardinality cardinality [1..1]: ISOMultiplicity cardinality = NULL, + #'@field designation designatio [0..1]: character (=> ISO 19115-3) + designation = NULL, #'@field definitionReference definitionReference [0..1] definitionReference = NULL, #'@field featureCatalogue featureCatalogue [0..1] @@ -40,9 +42,17 @@ ISOAbstractPropertyType <- R6Class("ISOAbstractPropertyType", }, #'@description Set member name - #'@param memberName member name object of class \link{character} or \link{ISOLocalName} + #'@param memberName member name object of class \link{character} (in ISO 19139 and 19115-3) + #'or \link{ISOLocalName} (in ISO 19139 only) setMemberName = function(memberName){ - if(!is(memberName,"ISOLocalName")) memberName <- ISOLocalName$new(value = memberName) + switch(getMetadataStandard(), + "19139" = { + if(!is(memberName,"ISOLocalName")) memberName <- ISOLocalName$new(value = memberName) + }, + "19115-3" = { + memberName <- ISOElementSequence$new(value = memberName) + } + ) self$memberName <- memberName }, @@ -60,7 +70,38 @@ ISOAbstractPropertyType <- R6Class("ISOAbstractPropertyType", #'@param lower lower #'@param upper upper setCardinality = function(lower, upper){ - self$cardinality = ISOMultiplicity$new(lower = lower, upper = upper) + self$cardinality = switch(getMetadataStandard(), + "19139" = ISOMultiplicity$new(lower = lower, upper = upper), + "19115-3" = { + lower_str = switch(as.character(lower), + "0" = "0", + "1" = "1", + "Inf" = "*", + "-Inf" = "*", + as.character(lower) + ) + upper_str = switch(as.character(upper), + "0" = "0", + "1" = "1", + "Inf" = "*", + "-Inf" = "*", + as.character(upper) + ) + card = paste0(lower_str, "..", upper_str) + if(lower == 1 & upper == 1) card = "1" + card + } + ) + }, + + #'@description Set designation + #'@param designation designation + #'@param locales locale designations, as \link{list} + setDesignation = function(designation, locales = NULL){ + self$designation <- designation + if(!is.null(locales)){ + self$designation <- self$createLocalisedProperty(designation, locales) + } }, #'@description Set definition reference diff --git a/R/ISOCodeListValue.R b/R/ISOCodeListValue.R index 84b9705f..c974b20f 100644 --- a/R/ISOCodeListValue.R +++ b/R/ISOCodeListValue.R @@ -167,7 +167,7 @@ ISOCodeListValue$values = function(class, labels = FALSE){ } if(element == "MD_ScopeCode") element <- "MX_ScopeCode" cl = getISOCodelist(element) - out = sapply(cl$codeEntry, function(x){x$identifier$value}) + out = sapply(cl$codeEntry, function(x){if(is(x$identifier, "ISOScopedName")) x$identifier$value else x$identifier}) if(labels){ out = data.frame( out, diff --git a/R/ISOCodelist.R b/R/ISOCodelist.R index a974ec02..4de517e0 100644 --- a/R/ISOCodelist.R +++ b/R/ISOCodelist.R @@ -57,7 +57,7 @@ ISOCodelist <- R6Class("ISOCodelist", if(pretty){ entries <- do.call("rbind", lapply(entries, function(entry){ data.frame( - identifier = entry$identifier, + identifier = if(is(entry$identifier,"ISOScopedName")) entry$identifier$value else entry$identifier, description = entry$description, stringsAsFactors = FALSE ) diff --git a/R/ISOFeatureAttribute.R b/R/ISOFeatureAttribute.R index 532f5f78..0e67da49 100644 --- a/R/ISOFeatureAttribute.R +++ b/R/ISOFeatureAttribute.R @@ -75,11 +75,19 @@ ISOFeatureAttribute <- R6Class("ISOFeatureAttribute", }, #'@description Set value measurement unit - #'@param uom uom, object of class \link{GMLUnitDefinition} + #'@param uom uom, object of class \link{GMLUnitDefinition} (in ISO 19139) + #'or \link{ISOUomIdentifier} / \link{character} (in ISO 19115-3) setValueMeasurementUnit = function(uom){ - if(!is(uom, "GMLUnitDefinition")){ - stop("The argument should be an object of class 'GMLUnitDefinition") - } + switch(getMetadataStandard(), + "19139" = { + if(!is(uom, "GMLUnitDefinition")){ + stop("The argument should be an object of class 'GMLUnitDefinition") + } + }, + "19115-3" = { + if(!is(uom, "ISOUomIdentifier")) uom = ISOUomIdentifier$new(value = uom) + } + ) self$valueMeasurementUnit <- uom }, diff --git a/R/ISOFeatureCatalogue.R b/R/ISOFeatureCatalogue.R index 8e137def..38050711 100644 --- a/R/ISOFeatureCatalogue.R +++ b/R/ISOFeatureCatalogue.R @@ -109,11 +109,20 @@ ISOFeatureCatalogue <- R6Class("ISOFeatureCatalogue", }, #'@description Set producer - #'@param producer object of class \link{ISOResponsibleParty} + #'@param producer object of class \link{ISOResponsibleParty} (in ISO 19139) or \link{ISOResponsibility} (in ISO 19115-3) setProducer = function(producer){ - if(!is(producer,"ISOResponsibleParty")){ - stop("The argument should be a 'ISOResponsibleParty' object") - } + switch(getMetadataStandard(), + "19139" = { + if(!is(producer,"ISOResponsibleParty")){ + stop("The argument should be a 'ISOResponsibleParty' object") + } + }, + "19115-3" = { + if(!is(producer,"ISOResponsibility")){ + stop("The argument should be a 'ISOResponsibility' object") + } + } + ) self$producer <- producer }, diff --git a/R/ISOFeatureType.R b/R/ISOFeatureType.R index cb933fca..2bbfcefa 100644 --- a/R/ISOFeatureType.R +++ b/R/ISOFeatureType.R @@ -56,7 +56,9 @@ #' xml <- md$encode() #' #' @references -#' ISO 19110:2005 Methodology for Feature cataloguing +#' - ISO 19110 - GFC 1.0 https://schemas.isotc211.org/19110/-/gfc/1.0/gfc/#element_FC_FeatureType (in ISO 19139) +#' +#' - ISO 19110 - GFC 1.1 https://schemas.isotc211.org/19110/gfc/1.1/gfc/#element_FC_FeatureType (in ISO 19115-3) #' #' @author Emmanuel Blondel #' @@ -67,189 +69,19 @@ ISOFeatureType <- R6Class("ISOFeatureType", xmlNamespacePrefix = "GFC" ), public = list( - - #'@field typeName typeName [1..1]: ISOLocalName - typeName = NULL, - #'@field definition definition [0..1]: character - definition = NULL, - #'@field code code [0..1]: character - code = NULL, - #'@field isAbstract isAbstract [1..1]: logical - isAbstract = FALSE, - #'@field aliases aliases [0..*]: ISOLocalName - aliases = list(), - #'@field inheritsFrom inheritsFrom [0..*]: ISOInheritanceRelation - inheritsFrom = list(), - #'@field inheritsTo inheritsTo [0..*]: ISOInheritanceRelation - inheritsTo = list(), - #'@field featureCatalogue featureCatalogue: ISOFeatureCatalogue - featureCatalogue = NA, - #'@field constrainedBy constrainedBy [0..*]: ISOConstraint - constrainedBy = list(), - #'@field definitionReference definitionReference [0..*]: ISODefinitionReference - definitionReference = list(), - #'@field carrierOfCharacteristics carrierOfCharacteristics [0..*]: ISOCarrierOfCharacteristics - carrierOfCharacteristics = list(), - + #'@description Initializes object #'@param xml object of class \link{XMLInternalNode-class} initialize = function(xml = NULL){ super$initialize(xml = xml) - }, - - #'@description Set type name - #'@param typeName type name, object of class \link{ISOLocalName} or \link{character} - setTypeName = function(typeName){ - if(!is(typeName,"ISOLocalName")) typeName <- ISOLocalName$new(value = typeName) - self$typeName <- typeName - }, - - #'@description Set definition - #'@param definition definition - #'@param locales list of localized definitions. Default is \code{NULL} - setDefinition = function(definition, locales = NULL){ - self$definition <- definition - if(!is.null(locales)){ - self$definition <- self$createLocalisedProperty(definition, locales) - } - }, - - #'@description Set code - #'@param code definition - #'@param locales list of localized codes. Default is \code{NULL} - setCode = function(code, locales = NULL){ - self$code = code - if(!is.null(locales)){ - self$code <- self$createLocalisedProperty(code, locales) - } - }, - - #'@description Set whether feature type is abstract - #'@param isAbstract object of class \link{logical} - setIsAbstract = function(isAbstract){ - if(!is.logical(isAbstract)) isAbstract <- as.logical(isAbstract) - if(is.na(isAbstract)){ - stop("Value cannot be coerced to 'logical'") - } - self$isAbstract <- isAbstract - }, - - #'@description Adds alias - #'@param alias object of class \link{ISOLocalName} or \link{character} - #'@return \code{TRUE} if added, \code{FALSE} otherwise - addAlias = function(alias){ - if(!is(alias, "ISOLocalName")){ - alias <- ISOLocalName$new(value = alias) - } - return(self$addListElement("aliases", alias)) - }, - - #'@description Deletes alias - #'@param alias object of class \link{ISOLocalName} or \link{character} - #'@return \code{TRUE} if deleted, \code{FALSE} otherwise - delAlias = function(alias){ - if(!is(alias, "ISOLocalName")){ - alias <- ISOLocalName$new(value = alias) - } - return(self$delListElement("aliases", alias)) - }, - - #'@description Adds 'inheritsFrom' relation - #'@param rel rel, object of class \link{ISOInheritanceRelation} - #'@return \code{TRUE} if added, \code{FALSE} otherwise - addInheritsFrom = function(rel){ - if(!is(rel, "ISOInheritanceRelation")){ - stop("Argument value should be an object of class 'ISOInheritanceRelation'") - } - return(self$addListElement("inheritsFrom", rel)) - }, - - #'@description Deletes 'inheritsFrom' relation - #'@param rel rel, object of class \link{ISOInheritanceRelation} - #'@return \code{TRUE} if deleted, \code{FALSE} otherwise - delInheritsFrom = function(rel){ - if(!is(rel, "ISOInheritanceRelation")){ - stop("Argument value should be an object of class 'ISOInheritanceRelation'") - } - return(self$delListElement("inheritsFrom", rel)) - }, - - #'@description Adds 'inheritsTo' relation - #'@param rel rel, object of class \link{ISOInheritanceRelation} - #'@return \code{TRUE} if added, \code{FALSE} otherwise - addInheritsTo = function(rel){ - if(!is(rel, "ISOInheritanceRelation")){ - stop("Argument value should be an object of class 'ISOInheritanceRelation'") - } - return(self$addListElement("inheritsTo", rel)) - }, - - #'@description Deletes 'inheritsTo' relation - #'@param rel rel, object of class \link{ISOInheritanceRelation} - #'@return \code{TRUE} if deleted, \code{FALSE} otherwise - delInheritsTo = function(rel){ - if(!is(rel, "ISOInheritanceRelation")){ - stop("Argument value should be an object of class 'ISOInheritanceRelation'") - } - return(self$delListElement("inheritsTo", rel)) - }, - - #'@description Set feature catalogue - #'@param fc object of class \link{ISOFeatureCatalogue} - setFeatureCatalogue = function(fc){ - if(!is(fc, "ISOFeatureCatalogue")){ - stop("Argument value should be an object of class 'ISOFeatureCatalogue'") - } - self$featureCatalogue = fc - }, - - #'@description Adds constraint - #'@param constraint constraint, object of class \link{ISOConstraint} - #'@return \code{TRUE} if added, \code{FALSE} otherwise - addConstraint = function(constraint){ - if(!is(constraint, "ISOConstraint")){ - constraint <- ISOConstraint$new(description = constraint) - } - return(self$addListElement("constrainedBy", constraint)) - }, - - #'@description Deletes constraint - #'@param constraint constraint, object of class \link{ISOConstraint} - #'@return \code{TRUE} if deleted, \code{FALSE} otherwise - delConstraint = function(constraint){ - if(!is(constraint, "ISOConstraint")){ - constraint <- ISOConstraint$new(description = constraint) - } - return(self$delListElement("constrainedBy", constraint)) - }, - - #'@description Set definition reference - #'@param definitionReference object of class \link{ISODefinitionReference} - setDefinitionReference = function(definitionReference){ - if(!is(definitionReference, "ISODefinitionReference")){ - stop("The argument should be an object of class 'ISODefinitionReference'") - } - self$definitionReference = definitionReference - }, - - #'@description Adds characteristic - #'@param characteristic characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics} - #'@return \code{TRUE} if added, \code{FALSE} otherwise - addCharacteristic = function(characteristic){ - if(!is(characteristic, "ISOAbstractCarrierOfCharacteristics")){ - stop("The argument should be an object of class extending 'ISOAbstractCarrierOfCharacteristics'") - } - return(self$addListElement("carrierOfCharacteristics", characteristic)) - }, - - #'@description Deletes characteristic - #'@param characteristic characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics} - #'@return \code{TRUE} if deleted, \code{FALSE} otherwise - delCharacteristic = function(characteristic){ - if(!is(characteristic, "ISOAbstractCarrierOfCharacteristics")){ - stop("The argument should be an object of class extending 'ISOAbstractCarrierOfCharacteristics'") - } - return(self$delListElement("carrierOfCharacteristics", characteristic)) } ) ) + +ISOFeatureType$new = function(xml = NULL){ + self <- switch(getMetadataStandard(), + "19139" = ISOFeatureType19139$new(xml = xml), + "19115-3" = ISOFeatureType19115_3$new(xml = xml) + ) + return(self) +} diff --git a/R/ISOFeatureType19115_3.R b/R/ISOFeatureType19115_3.R new file mode 100644 index 00000000..5797a7d6 --- /dev/null +++ b/R/ISOFeatureType19115_3.R @@ -0,0 +1,266 @@ +#' ISOFeatureType19115_3 +#' +#' @docType class +#' @importFrom R6 R6Class +#' @export +#' @keywords ISO feature type +#' @return Object of \code{\link{R6Class}} for modelling an ISO FeatureType in ISO 19115-3 +#' @format \code{\link{R6Class}} object. +#' +#' @examples +#' #featuretype +#' md <- ISOFeatureType$new() +#' md$setTypeName("typeName") +#' md$setDefinition("definition") +#' md$setDesignation("designation") +#' md$setCode("code") +#' md$setIsAbstract(FALSE) +#' md$addAlias("alias1") +#' md$addAlias("alias2") +#' +#' #add feature attributes +#' for(i in 1:3){ +#' #create attribute +#' fat <- ISOFeatureAttribute$new() +#' fat$setMemberName(sprintf("name %s",i)) +#' fat$setDefinition(sprintf("definition %s",i)) +#' fat$setCardinality(lower=1,upper=1) +#' fat$setCode(sprintf("code %s",i)) +#' +#' #add measurement unit +#' gml <- GMLBaseUnit$new(id = "ID%") +#' gml$setDescriptionReference("someref") +#' gml$setIdentifier("identifier", "codespace") +#' gml$addName("name1", "codespace") +#' gml$addName("name2", "codespace") +#' gml$setQuantityTypeReference("someref") +#' gml$setCatalogSymbol("symbol") +#' gml$setUnitsSystem("somelink") +#' fat$setValueMeasurementUnit(gml) +#' +#' #add listed values +#' val1 <- ISOListedValue$new() +#' val1$setCode("code1") +#' val1$setLabel("label1") +#' val1$setDefinition("definition1") +#' fat$addListedValue(val1) +#' val2 <- ISOListedValue$new() +#' val2$setCode("code2") +#' val2$setLabel("label2") +#' val2$setDefinition("definition2") +#' fat$addListedValue(val2) +#' fat$setValueType("typeName") +#' +#' #add feature attribute as carrierOfCharacteristic +#' md$addCharacteristic(fat) +#' } +#' xml <- md$encode() +#' +#' @references +#' - ISO 19110 - GFC 1.1 https://schemas.isotc211.org/19110/gfc/1.1/gfc/#element_FC_FeatureType +#' +#' @author Emmanuel Blondel +#' +ISOFeatureType19115_3 <- R6Class("ISOFeatureType19115_3", + inherit = ISOFeatureType, + private = list( + xmlElement = "FC_FeatureType", + xmlNamespacePrefix = "GFC" + ), + public = list( + + #'@field typeName typeName [1..1]: character + typeName = NULL, + #'@field definition definition [0..1]: character + definition = NULL, + #'@field code code [0..1]: character + code = NULL, + #'@field isAbstract isAbstract [1..1]: logical + isAbstract = FALSE, + #'@field aliases aliases [0..*]: character + aliases = list(), + #'@field designation designation [0..1]: character + designation = NULL, + #'@field carrierOfCharacteristics carrierOfCharacteristics [0..*]: ISOCarrierOfCharacteristics + carrierOfCharacteristics = list(), + #'@field inheritsFrom inheritsFrom [0..*]: ISOInheritanceRelation + inheritsFrom = list(), + #'@field inheritsTo inheritsTo [0..*]: ISOInheritanceRelation + inheritsTo = list(), + #'@field constrainedBy constrainedBy [0..*]: ISOConstraint + constrainedBy = list(), + #'@field definitionReference definitionReference [0..*]: ISODefinitionReference + definitionReference = list(), + #'@field featureCatalogue featureCatalogue: ISOFeatureCatalogue + featureCatalogue = NA, + + #'@description Initializes object + #'@param xml object of class \link{XMLInternalNode-class} + initialize = function(xml = NULL){ + super$initialize(xml = xml) + }, + + #'@description Set type name + #'@param typeName type name, object of class \link{character} + setTypeName = function(typeName){ + typeName <- ISOElementSequence$new(value = typeName) + self$typeName <- typeName + }, + + #'@description Set definition + #'@param definition definition + #'@param locales list of localized definitions. Default is \code{NULL} + setDefinition = function(definition, locales = NULL){ + self$definition <- definition + if(!is.null(locales)){ + self$definition <- self$createLocalisedProperty(definition, locales) + } + }, + + #'@description Set code + #'@param code definition + #'@param locales list of localized codes. Default is \code{NULL} + setCode = function(code, locales = NULL){ + self$code = code + if(!is.null(locales)){ + self$code <- self$createLocalisedProperty(code, locales) + } + }, + + #'@description Set whether feature type is abstract + #'@param isAbstract object of class \link{logical} + setIsAbstract = function(isAbstract){ + if(!is.logical(isAbstract)) isAbstract <- as.logical(isAbstract) + if(is.na(isAbstract)){ + stop("Value cannot be coerced to 'logical'") + } + self$isAbstract <- isAbstract + }, + + #'@description Adds alias + #'@param alias object of class \link{ISOLocalName} (in ISO 19139 only) + #'or \link{character} (in ISO 19139 or ISO 19115-3) + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addAlias = function(alias){ + alias <- ISOElementSequence$new(value = alias) + return(self$addListElement("aliases", alias)) + }, + + #'@param alias object of class \link{ISOLocalName} (in ISO 19139 only) + #'or \link{character} (in ISO 19139 or ISO 19115-3) + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delAlias = function(alias){ + alias <- ISOElementSequence$new(value = alias) + return(self$delListElement("aliases", alias)) + }, + + #'@description Set designation + #'@param designation designation + #'@param locales list of localized designations. Default is \code{NULL} + setDesignation = function(designation, locales = NULL){ + self$stopIfMetadataStandardIsNot("19115-3") + self$designation <- designation + if(!is.null(locales)){ + self$designation <- self$createLocalisedProperty(designation, locales) + } + }, + + #'@description Adds characteristic + #'@param characteristic characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addCharacteristic = function(characteristic){ + if(!is(characteristic, "ISOAbstractCarrierOfCharacteristics")){ + stop("The argument should be an object of class extending 'ISOAbstractCarrierOfCharacteristics'") + } + return(self$addListElement("carrierOfCharacteristics", characteristic)) + }, + + #'@description Deletes characteristic + #'@param characteristic characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delCharacteristic = function(characteristic){ + if(!is(characteristic, "ISOAbstractCarrierOfCharacteristics")){ + stop("The argument should be an object of class extending 'ISOAbstractCarrierOfCharacteristics'") + } + return(self$delListElement("carrierOfCharacteristics", characteristic)) + }, + + #'@description Adds 'inheritsFrom' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addInheritsFrom = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$addListElement("inheritsFrom", rel)) + }, + + #'@description Deletes 'inheritsFrom' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delInheritsFrom = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$delListElement("inheritsFrom", rel)) + }, + + #'@description Adds 'inheritsTo' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addInheritsTo = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$addListElement("inheritsTo", rel)) + }, + + #'@description Deletes 'inheritsTo' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delInheritsTo = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$delListElement("inheritsTo", rel)) + }, + + #'@description Adds constraint + #'@param constraint constraint, object of class \link{ISOConstraint} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addConstraint = function(constraint){ + if(!is(constraint, "ISOConstraint")){ + constraint <- ISOConstraint$new(description = constraint) + } + return(self$addListElement("constrainedBy", constraint)) + }, + + #'@description Deletes constraint + #'@param constraint constraint, object of class \link{ISOConstraint} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delConstraint = function(constraint){ + if(!is(constraint, "ISOConstraint")){ + constraint <- ISOConstraint$new(description = constraint) + } + return(self$delListElement("constrainedBy", constraint)) + }, + + #'@description Set definition reference + #'@param definitionReference object of class \link{ISODefinitionReference} + setDefinitionReference = function(definitionReference){ + if(!is(definitionReference, "ISODefinitionReference")){ + stop("The argument should be an object of class 'ISODefinitionReference'") + } + self$definitionReference = definitionReference + }, + + #'@description Set feature catalogue + #'@param fc object of class \link{ISOFeatureCatalogue} + setFeatureCatalogue = function(fc){ + if(!is(fc, "ISOFeatureCatalogue")){ + stop("Argument value should be an object of class 'ISOFeatureCatalogue'") + } + self$featureCatalogue = fc + } + ) +) diff --git a/R/ISOFeatureType19139.R b/R/ISOFeatureType19139.R new file mode 100644 index 00000000..f898f664 --- /dev/null +++ b/R/ISOFeatureType19139.R @@ -0,0 +1,250 @@ +#' ISOFeatureType19139 +#' +#' @docType class +#' @importFrom R6 R6Class +#' @export +#' @keywords ISO feature type +#' @return Object of \code{\link{R6Class}} for modelling an ISO FeatureType in ISO 19139 +#' @format \code{\link{R6Class}} object. +#' +#' @examples +#' #featuretype +#' md <- ISOFeatureType$new() +#' md$setTypeName("typeName") +#' md$setDefinition("definition") +#' md$setCode("code") +#' md$setIsAbstract(FALSE) +#' md$addAlias("alias1") +#' md$addAlias("alias2") +#' +#' #add feature attributes +#' for(i in 1:3){ +#' #create attribute +#' fat <- ISOFeatureAttribute$new() +#' fat$setMemberName(sprintf("name %s",i)) +#' fat$setDefinition(sprintf("definition %s",i)) +#' fat$setCardinality(lower=1,upper=1) +#' fat$setCode(sprintf("code %s",i)) +#' +#' #add measurement unit +#' gml <- GMLBaseUnit$new(id = "ID%") +#' gml$setDescriptionReference("someref") +#' gml$setIdentifier("identifier", "codespace") +#' gml$addName("name1", "codespace") +#' gml$addName("name2", "codespace") +#' gml$setQuantityTypeReference("someref") +#' gml$setCatalogSymbol("symbol") +#' gml$setUnitsSystem("somelink") +#' fat$setValueMeasurementUnit(gml) +#' +#' #add listed values +#' val1 <- ISOListedValue$new() +#' val1$setCode("code1") +#' val1$setLabel("label1") +#' val1$setDefinition("definition1") +#' fat$addListedValue(val1) +#' val2 <- ISOListedValue$new() +#' val2$setCode("code2") +#' val2$setLabel("label2") +#' val2$setDefinition("definition2") +#' fat$addListedValue(val2) +#' fat$setValueType("typeName") +#' +#' #add feature attribute as carrierOfCharacteristic +#' md$addCharacteristic(fat) +#' } +#' xml <- md$encode() +#' +#' @references +#' - ISO 19110 - GFC 1.0 https://schemas.isotc211.org/19110/-/gfc/1.0/gfc/#element_FC_FeatureType +#' +#' @author Emmanuel Blondel +#' +ISOFeatureType19139 <- R6Class("ISOFeatureType19139", + inherit = ISOFeatureType, + private = list( + xmlElement = "FC_FeatureType", + xmlNamespacePrefix = "GFC" + ), + public = list( + + #'@field typeName typeName [1..1]: ISOLocalName or character + typeName = NULL, + #'@field definition definition [0..1]: character + definition = NULL, + #'@field code code [0..1]: character + code = NULL, + #'@field isAbstract isAbstract [1..1]: logical + isAbstract = FALSE, + #'@field aliases aliases [0..*]: ISOLocalName or character + aliases = list(), + #'@field inheritsFrom inheritsFrom [0..*]: ISOInheritanceRelation + inheritsFrom = list(), + #'@field inheritsTo inheritsTo [0..*]: ISOInheritanceRelation + inheritsTo = list(), + #'@field featureCatalogue featureCatalogue: ISOFeatureCatalogue + featureCatalogue = NA, + #'@field constrainedBy constrainedBy [0..*]: ISOConstraint + constrainedBy = list(), + #'@field definitionReference definitionReference [0..*]: ISODefinitionReference + definitionReference = list(), + #'@field carrierOfCharacteristics carrierOfCharacteristics [0..*]: ISOCarrierOfCharacteristics + carrierOfCharacteristics = list(), + + #'@description Initializes object + #'@param xml object of class \link{XMLInternalNode-class} + initialize = function(xml = NULL){ + super$initialize(xml = xml) + }, + + #'@description Set type name + #'@param typeName type name, object of class \link{ISOLocalName} or \link{character} + setTypeName = function(typeName){ + if(!is(typeName,"ISOLocalName")) typeName <- ISOLocalName$new(value = typeName) + self$typeName <- typeName + }, + + #'@description Set definition + #'@param definition definition + #'@param locales list of localized definitions. Default is \code{NULL} + setDefinition = function(definition, locales = NULL){ + self$definition <- definition + if(!is.null(locales)){ + self$definition <- self$createLocalisedProperty(definition, locales) + } + }, + + #'@description Set code + #'@param code definition + #'@param locales list of localized codes. Default is \code{NULL} + setCode = function(code, locales = NULL){ + self$code = code + if(!is.null(locales)){ + self$code <- self$createLocalisedProperty(code, locales) + } + }, + + #'@description Set whether feature type is abstract + #'@param isAbstract object of class \link{logical} + setIsAbstract = function(isAbstract){ + if(!is.logical(isAbstract)) isAbstract <- as.logical(isAbstract) + if(is.na(isAbstract)){ + stop("Value cannot be coerced to 'logical'") + } + self$isAbstract <- isAbstract + }, + + #'@description Adds alias + #'@param alias object of class \link{ISOLocalName} or \link{character} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addAlias = function(alias){ + if(!is(alias, "ISOLocalName")) alias <- ISOLocalName$new(value = alias) + return(self$addListElement("aliases", alias)) + }, + + #'@param alias object of class \link{ISOLocalName} or \link{character} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delAlias = function(alias){ + if(!is(alias, "ISOLocalName")) alias <- ISOLocalName$new(value = alias) + return(self$delListElement("aliases", alias)) + }, + + #'@description Adds 'inheritsFrom' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addInheritsFrom = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$addListElement("inheritsFrom", rel)) + }, + + #'@description Deletes 'inheritsFrom' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delInheritsFrom = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$delListElement("inheritsFrom", rel)) + }, + + #'@description Adds 'inheritsTo' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addInheritsTo = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$addListElement("inheritsTo", rel)) + }, + + #'@description Deletes 'inheritsTo' relation + #'@param rel rel, object of class \link{ISOInheritanceRelation} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delInheritsTo = function(rel){ + if(!is(rel, "ISOInheritanceRelation")){ + stop("Argument value should be an object of class 'ISOInheritanceRelation'") + } + return(self$delListElement("inheritsTo", rel)) + }, + + #'@description Set feature catalogue + #'@param fc object of class \link{ISOFeatureCatalogue} + setFeatureCatalogue = function(fc){ + if(!is(fc, "ISOFeatureCatalogue")){ + stop("Argument value should be an object of class 'ISOFeatureCatalogue'") + } + self$featureCatalogue = fc + }, + + #'@description Adds constraint + #'@param constraint constraint, object of class \link{ISOConstraint} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addConstraint = function(constraint){ + if(!is(constraint, "ISOConstraint")){ + constraint <- ISOConstraint$new(description = constraint) + } + return(self$addListElement("constrainedBy", constraint)) + }, + + #'@description Deletes constraint + #'@param constraint constraint, object of class \link{ISOConstraint} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delConstraint = function(constraint){ + if(!is(constraint, "ISOConstraint")){ + constraint <- ISOConstraint$new(description = constraint) + } + return(self$delListElement("constrainedBy", constraint)) + }, + + #'@description Set definition reference + #'@param definitionReference object of class \link{ISODefinitionReference} + setDefinitionReference = function(definitionReference){ + if(!is(definitionReference, "ISODefinitionReference")){ + stop("The argument should be an object of class 'ISODefinitionReference'") + } + self$definitionReference = definitionReference + }, + + #'@description Adds characteristic + #'@param characteristic characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics} + #'@return \code{TRUE} if added, \code{FALSE} otherwise + addCharacteristic = function(characteristic){ + if(!is(characteristic, "ISOAbstractCarrierOfCharacteristics")){ + stop("The argument should be an object of class extending 'ISOAbstractCarrierOfCharacteristics'") + } + return(self$addListElement("carrierOfCharacteristics", characteristic)) + }, + + #'@description Deletes characteristic + #'@param characteristic characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics} + #'@return \code{TRUE} if deleted, \code{FALSE} otherwise + delCharacteristic = function(characteristic){ + if(!is(characteristic, "ISOAbstractCarrierOfCharacteristics")){ + stop("The argument should be an object of class extending 'ISOAbstractCarrierOfCharacteristics'") + } + return(self$delListElement("carrierOfCharacteristics", characteristic)) + } + ) +) diff --git a/R/ISOOperationMetadata.R b/R/ISOOperationMetadata.R index 886eb728..3589ca23 100644 --- a/R/ISOOperationMetadata.R +++ b/R/ISOOperationMetadata.R @@ -34,7 +34,7 @@ ISOOperationMetadata <- R6Class("ISOOperationMetadata", operationDescription = NULL, #'@field invocationName invocationName [0..1]: character invocationName = NULL, - #'@field parameters parameters [0..*]: ISOParameter + #'@field parameters parameters [0..*]: ISOSRVParameter parameters = list(), #'@field connectPoint connectPoint [1..*]: ISOOnlineResource connectPoint = list(), @@ -100,21 +100,21 @@ ISOOperationMetadata <- R6Class("ISOOperationMetadata", }, #'@description Adds parameter - #'@param parameter object of class \link{ISOParameter} + #'@param parameter object of class \link{ISOSRVParameter} #'@return \code{TRUE} if added, \code{FALSE} otherwise addParameter = function(parameter){ - if(!is(parameter, "ISOParameter")){ - stop("The argument value should be an object of class 'ISOParameter'") + if(!is(parameter, "ISOSRVParameter")){ + stop("The argument value should be an object of class 'ISOSRVParameter'") } return(self$addListElement("parameters", parameter)) }, #'@description Deletes parameter - #'@param parameter object of class \link{ISOParameter} + #'@param parameter object of class \link{ISOSRVParameter} #'@return \code{TRUE} if deleted, \code{FALSE} otherwise delParameter = function(parameter){ - if(!is(parameter, "ISOParameter")){ - stop("The argument value should be an object of class 'ISOParameter'") + if(!is(parameter, "ISOSRVParameter")){ + stop("The argument value should be an object of class 'ISOSRVParameter'") } return(self$delListElement("parameters", parameter)) }, diff --git a/R/ISOProgress.R b/R/ISOProgress.R index 876d15be..092f7c02 100644 --- a/R/ISOProgress.R +++ b/R/ISOProgress.R @@ -72,7 +72,7 @@ ISOProgress$values <- function(labels = FALSE){ #' @author Emmanuel Blondel #' ISOStatus<- R6Class("ISOStatus", - inherit = ISOCodeListValue, + inherit = ISOProgress, private = list( deprecated = TRUE, xmlElement = "MD_ProgressCode", @@ -88,8 +88,8 @@ ISOStatus<- R6Class("ISOStatus", #'@param value value #'@param description description initialize = function(xml = NULL, value, description = NULL){ + super$initialize(xml = xml, value = value, description = description) warnings("Class 'ISOStatus' is deprecated, please use 'ISOProgress' instead!") - ISOProgress$new(xml = xml, value = value, description = description) } ) ) diff --git a/R/ISOSRVParameter.R b/R/ISOSRVParameter.R index 5ef5d9fd..403da08f 100644 --- a/R/ISOSRVParameter.R +++ b/R/ISOSRVParameter.R @@ -37,7 +37,7 @@ ISOSRVParameter <- R6Class("ISOSRVParameter", #'@field name name [1..1]: character name = NULL, - #'@field direction direction [0..1]: ISOParameterDirection + #'@field direction direction [0..1]: ISOParameterDirection or character direction = NULL, #'@field description description [0..1]: character description = NULL, @@ -71,11 +71,11 @@ ISOSRVParameter <- R6Class("ISOSRVParameter", }, #'@description Set direction - #'@param direction object of class \link{ISOParameterDirection} or \link{character} - #' among values returned by \code{ISOParameterDirection$values()} + #'@param direction object of class \link{ISOSRVParameterDirection} or \link{character} + #' among values returned by \code{ISOSRVParameterDirection$values()} setDirection = function(direction){ - if(!is(direction, "ISOParameterDirection")){ - direction <- ISOParameterDirection$new(value = direction) + if(!is(direction, "ISOSRVParameterDirection")){ + direction <- ISOSRVParameterDirection$new(value = direction) } self$direction <- direction }, diff --git a/R/ISOServiceIdentification.R b/R/ISOServiceIdentification.R index ad501f06..0ba320b2 100644 --- a/R/ISOServiceIdentification.R +++ b/R/ISOServiceIdentification.R @@ -100,6 +100,63 @@ ISOServiceIdentification <- R6Class("ISOServiceIdentification", ) ) +#' ISOServiceIdentification19139 +#' +#' @docType class +#' @importFrom R6 R6Class +#' @export +#' @keywords ISO service identification +#' @return Object of \code{\link{R6Class}} for modelling an ISO ServiceIdentification in ISO 19139 +#' @format \code{\link{R6Class}} object. +ISOServiceIdentification19139 <- R6Class("ISOServiceIdentification19139", + inherit = ISOIdentification19139, + private = list( + xmlElement = "MD_ServiceIdentification", + xmlNamespacePrefix = "GMD" + ), + public = list( + + #'@description Initializes object + #'@param xml object of class \link{XMLInternalNode-class} + initialize = function(xml = NULL){ + defaults <- list(characterSet = ISOCharacterSet$new(value = "utf8")) + super$initialize(xml = xml, defaults = defaults) + } + ) +) + +#' ISOServiceIdentification19115_3 +#' +#' @docType class +#' @importFrom R6 R6Class +#' @export +#' @keywords ISO service identification +#' @return Object of \code{\link{R6Class}} for modelling an ISO ServiceIdentification in ISO 19115-3 +#' @format \code{\link{R6Class}} object. +ISOServiceIdentification19115_3 <- R6Class("ISOServiceIdentification19115_3", + inherit = ISOIdentification19115_3, + private = list( + xmlElement = "MD_ServiceIdentification", + xmlNamespacePrefix = "GMD" + ), + public = list( + + #'@description Initializes object + #'@param xml object of class \link{XMLInternalNode-class} + initialize = function(xml = NULL){ + super$initialize(xml = xml) + } + ) +) + +ISOServiceIdentification$new = function(xml = NULL){ + self <- switch(getMetadataStandard(), + "19139" = ISOServiceIdentification19139$new(xml = xml), + "19115-3" = ISOServiceIdentification19115_3$new(xml = xml) + ) + return(self) +} + #' ISOSRVServiceIdentification #' #' @docType class @@ -491,4 +548,61 @@ ISOSRVServiceIdentification <- R6Class("ISOSRVServiceIdentification", } ) -) \ No newline at end of file +) + +#' ISOSRVServiceIdentification19139 +#' +#' @docType class +#' @importFrom R6 R6Class +#' @export +#' @keywords ISO service identification +#' @return Object of \code{\link{R6Class}} for modelling an ISO SRV ServiceIdentification in ISO 19139 +#' @format \code{\link{R6Class}} object. +ISOSRVServiceIdentification19139 <- R6Class("ISOSRVServiceIdentification19139", + inherit = ISOServiceIdentification19139, + private = list( + xmlElement = "SV_ServiceIdentification", + xmlNamespacePrefix = "SRV" + ), + public = list( + + #'@description Initializes object + #'@param xml object of class \link{XMLInternalNode-class} + initialize = function(xml = NULL){ + defaults <- list(characterSet = ISOCharacterSet$new(value = "utf8")) + super$initialize(xml = xml, defaults = defaults) + } + ) +) + +#' ISOSRVServiceIdentification19115_3 +#' +#' @docType class +#' @importFrom R6 R6Class +#' @export +#' @keywords ISO service identification +#' @return Object of \code{\link{R6Class}} for modelling an ISO SRV ServiceIdentification in ISO 19115-3 +#' @format \code{\link{R6Class}} object. +ISOSRVServiceIdentification19115_3 <- R6Class("ISOSRVServiceIdentification19115_3", + inherit = ISOServiceIdentification19115_3, + private = list( + xmlElement = "SV_ServiceIdentification", + xmlNamespacePrefix = "SRV" + ), + public = list( + + #'@description Initializes object + #'@param xml object of class \link{XMLInternalNode-class} + initialize = function(xml = NULL){ + super$initialize(xml = xml) + } + ) +) + +ISOSRVServiceIdentification$new = function(xml = NULL){ + self <- switch(getMetadataStandard(), + "19139" = ISOSRVServiceIdentification19139$new(xml = xml), + "19115-3" = ISOSRVServiceIdentification19115_3$new(xml = xml) + ) + return(self) +} \ No newline at end of file diff --git a/inst/extdata/schemas/19115/-3/mdb/2.0/mdb.xsd b/inst/extdata/schemas/19115/-3/mdb/2.0/mdb.xsd index 39442ddb..fd7a8601 100644 --- a/inst/extdata/schemas/19115/-3/mdb/2.0/mdb.xsd +++ b/inst/extdata/schemas/19115/-3/mdb/2.0/mdb.xsd @@ -22,4 +22,8 @@ + + + + diff --git a/man/ISOAbstractPropertyType.Rd b/man/ISOAbstractPropertyType.Rd index 3a8bdae9..ffce0157 100644 --- a/man/ISOAbstractPropertyType.Rd +++ b/man/ISOAbstractPropertyType.Rd @@ -37,6 +37,8 @@ Emmanuel Blondel \item{\code{cardinality}}{cardinality [1..1]: ISOMultiplicity} +\item{\code{designation}}{designatio [0..1]: character (=> ISO 19115-3)} + \item{\code{definitionReference}}{definitionReference [0..1]} \item{\code{featureCatalogue}}{featureCatalogue [0..1]} @@ -50,6 +52,7 @@ Emmanuel Blondel \item \href{#method-ISOAbstractPropertyType-setMemberName}{\code{ISOAbstractPropertyType$setMemberName()}} \item \href{#method-ISOAbstractPropertyType-setDefinition}{\code{ISOAbstractPropertyType$setDefinition()}} \item \href{#method-ISOAbstractPropertyType-setCardinality}{\code{ISOAbstractPropertyType$setCardinality()}} +\item \href{#method-ISOAbstractPropertyType-setDesignation}{\code{ISOAbstractPropertyType$setDesignation()}} \item \href{#method-ISOAbstractPropertyType-setDefinitionReference}{\code{ISOAbstractPropertyType$setDefinitionReference()}} \item \href{#method-ISOAbstractPropertyType-setFeatureCatalogue}{\code{ISOAbstractPropertyType$setFeatureCatalogue()}} \item \href{#method-ISOAbstractPropertyType-clone}{\code{ISOAbstractPropertyType$clone()}} @@ -124,7 +127,8 @@ Set member name \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{memberName}}{member name object of class \link{character} or \link{ISOLocalName}} +\item{\code{memberName}}{member name object of class \link{character} (in ISO 19139 and 19115-3) +or \link{ISOLocalName} (in ISO 19139 only)} } \if{html}{\out{
}} } @@ -168,6 +172,25 @@ Set cardinality } } \if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOAbstractPropertyType-setDesignation}{}}} +\subsection{Method \code{setDesignation()}}{ +Set designation +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{ISOAbstractPropertyType$setDesignation(designation, locales = NULL)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{designation}}{designation} + +\item{\code{locales}}{locale designations, as \link{list}} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ISOAbstractPropertyType-setDefinitionReference}{}}} \subsection{Method \code{setDefinitionReference()}}{ diff --git a/man/ISOAssociationRole.Rd b/man/ISOAssociationRole.Rd index 01805554..922c0c8b 100644 --- a/man/ISOAssociationRole.Rd +++ b/man/ISOAssociationRole.Rd @@ -93,6 +93,7 @@ Emmanuel Blondel
  • geometa::ISOAbstractPropertyType$setCardinality()
  • geometa::ISOAbstractPropertyType$setDefinition()
  • geometa::ISOAbstractPropertyType$setDefinitionReference()
  • +
  • geometa::ISOAbstractPropertyType$setDesignation()
  • geometa::ISOAbstractPropertyType$setFeatureCatalogue()
  • geometa::ISOAbstractPropertyType$setMemberName()
  • diff --git a/man/ISOFeatureAssociation.Rd b/man/ISOFeatureAssociation.Rd index fef3badc..e2af827c 100644 --- a/man/ISOFeatureAssociation.Rd +++ b/man/ISOFeatureAssociation.Rd @@ -75,22 +75,6 @@ Emmanuel Blondel
  • geometa::ISOAbstractObject$stopIfMetadataStandardIsNot()
  • geometa::ISOAbstractObject$validate()
  • geometa::ISOAbstractObject$wrapBaseElement()
  • -
  • geometa::ISOFeatureType$addAlias()
  • -
  • geometa::ISOFeatureType$addCharacteristic()
  • -
  • geometa::ISOFeatureType$addConstraint()
  • -
  • geometa::ISOFeatureType$addInheritsFrom()
  • -
  • geometa::ISOFeatureType$addInheritsTo()
  • -
  • geometa::ISOFeatureType$delAlias()
  • -
  • geometa::ISOFeatureType$delCharacteristic()
  • -
  • geometa::ISOFeatureType$delConstraint()
  • -
  • geometa::ISOFeatureType$delInheritsFrom()
  • -
  • geometa::ISOFeatureType$delInheritsTo()
  • -
  • geometa::ISOFeatureType$setCode()
  • -
  • geometa::ISOFeatureType$setDefinition()
  • -
  • geometa::ISOFeatureType$setDefinitionReference()
  • -
  • geometa::ISOFeatureType$setFeatureCatalogue()
  • -
  • geometa::ISOFeatureType$setIsAbstract()
  • -
  • geometa::ISOFeatureType$setTypeName()
  • }} diff --git a/man/ISOFeatureAttribute.Rd b/man/ISOFeatureAttribute.Rd index e43ff5e7..eb23b2dc 100644 --- a/man/ISOFeatureAttribute.Rd +++ b/man/ISOFeatureAttribute.Rd @@ -120,6 +120,7 @@ Emmanuel Blondel
  • geometa::ISOAbstractPropertyType$setCardinality()
  • geometa::ISOAbstractPropertyType$setDefinition()
  • geometa::ISOAbstractPropertyType$setDefinitionReference()
  • +
  • geometa::ISOAbstractPropertyType$setDesignation()
  • geometa::ISOAbstractPropertyType$setFeatureCatalogue()
  • geometa::ISOAbstractPropertyType$setMemberName()
  • @@ -173,7 +174,8 @@ Set value measurement unit \subsection{Arguments}{ \if{html}{\out{
    }} \describe{ -\item{\code{uom}}{uom, object of class \link{GMLUnitDefinition}} +\item{\code{uom}}{uom, object of class \link{GMLUnitDefinition} (in ISO 19139) +or \link{ISOUomIdentifier} / \link{character} (in ISO 19115-3)} } \if{html}{\out{
    }} } diff --git a/man/ISOFeatureCatalogue.Rd b/man/ISOFeatureCatalogue.Rd index d9bff755..8d22f483 100644 --- a/man/ISOFeatureCatalogue.Rd +++ b/man/ISOFeatureCatalogue.Rd @@ -202,7 +202,7 @@ Set producer \subsection{Arguments}{ \if{html}{\out{
    }} \describe{ -\item{\code{producer}}{object of class \link{ISOResponsibleParty}} +\item{\code{producer}}{object of class \link{ISOResponsibleParty} (in ISO 19139) or \link{ISOResponsibility} (in ISO 19115-3)} } \if{html}{\out{
    }} } diff --git a/man/ISOFeatureOperation.Rd b/man/ISOFeatureOperation.Rd index 38f9d5ab..0c4299b1 100644 --- a/man/ISOFeatureOperation.Rd +++ b/man/ISOFeatureOperation.Rd @@ -92,6 +92,7 @@ Emmanuel Blondel
  • geometa::ISOAbstractPropertyType$setCardinality()
  • geometa::ISOAbstractPropertyType$setDefinition()
  • geometa::ISOAbstractPropertyType$setDefinitionReference()
  • +
  • geometa::ISOAbstractPropertyType$setDesignation()
  • geometa::ISOAbstractPropertyType$setFeatureCatalogue()
  • geometa::ISOAbstractPropertyType$setMemberName()
  • diff --git a/man/ISOFeatureType.Rd b/man/ISOFeatureType.Rd index 70f39de9..0b94bf40 100644 --- a/man/ISOFeatureType.Rd +++ b/man/ISOFeatureType.Rd @@ -65,7 +65,9 @@ ISOFeatureType } \references{ -ISO 19110:2005 Methodology for Feature cataloguing +- ISO 19110 - GFC 1.0 https://schemas.isotc211.org/19110/-/gfc/1.0/gfc/#element_FC_FeatureType (in ISO 19139) + + - ISO 19110 - GFC 1.1 https://schemas.isotc211.org/19110/gfc/1.1/gfc/#element_FC_FeatureType (in ISO 19115-3) } \author{ Emmanuel Blondel @@ -76,53 +78,10 @@ Emmanuel Blondel \section{Super classes}{ \code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{ISOFeatureType} } -\section{Public fields}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{typeName}}{typeName [1..1]: ISOLocalName} - -\item{\code{definition}}{definition [0..1]: character} - -\item{\code{code}}{code [0..1]: character} - -\item{\code{isAbstract}}{isAbstract [1..1]: logical} - -\item{\code{aliases}}{aliases [0..*]: ISOLocalName} - -\item{\code{inheritsFrom}}{inheritsFrom [0..*]: ISOInheritanceRelation} - -\item{\code{inheritsTo}}{inheritsTo [0..*]: ISOInheritanceRelation} - -\item{\code{featureCatalogue}}{featureCatalogue: ISOFeatureCatalogue} - -\item{\code{constrainedBy}}{constrainedBy [0..*]: ISOConstraint} - -\item{\code{definitionReference}}{definitionReference [0..*]: ISODefinitionReference} - -\item{\code{carrierOfCharacteristics}}{carrierOfCharacteristics [0..*]: ISOCarrierOfCharacteristics} -} -\if{html}{\out{
    }} -} \section{Methods}{ \subsection{Public methods}{ \itemize{ \item \href{#method-ISOFeatureType-new}{\code{ISOFeatureType$new()}} -\item \href{#method-ISOFeatureType-setTypeName}{\code{ISOFeatureType$setTypeName()}} -\item \href{#method-ISOFeatureType-setDefinition}{\code{ISOFeatureType$setDefinition()}} -\item \href{#method-ISOFeatureType-setCode}{\code{ISOFeatureType$setCode()}} -\item \href{#method-ISOFeatureType-setIsAbstract}{\code{ISOFeatureType$setIsAbstract()}} -\item \href{#method-ISOFeatureType-addAlias}{\code{ISOFeatureType$addAlias()}} -\item \href{#method-ISOFeatureType-delAlias}{\code{ISOFeatureType$delAlias()}} -\item \href{#method-ISOFeatureType-addInheritsFrom}{\code{ISOFeatureType$addInheritsFrom()}} -\item \href{#method-ISOFeatureType-delInheritsFrom}{\code{ISOFeatureType$delInheritsFrom()}} -\item \href{#method-ISOFeatureType-addInheritsTo}{\code{ISOFeatureType$addInheritsTo()}} -\item \href{#method-ISOFeatureType-delInheritsTo}{\code{ISOFeatureType$delInheritsTo()}} -\item \href{#method-ISOFeatureType-setFeatureCatalogue}{\code{ISOFeatureType$setFeatureCatalogue()}} -\item \href{#method-ISOFeatureType-addConstraint}{\code{ISOFeatureType$addConstraint()}} -\item \href{#method-ISOFeatureType-delConstraint}{\code{ISOFeatureType$delConstraint()}} -\item \href{#method-ISOFeatureType-setDefinitionReference}{\code{ISOFeatureType$setDefinitionReference()}} -\item \href{#method-ISOFeatureType-addCharacteristic}{\code{ISOFeatureType$addCharacteristic()}} -\item \href{#method-ISOFeatureType-delCharacteristic}{\code{ISOFeatureType$delCharacteristic()}} \item \href{#method-ISOFeatureType-clone}{\code{ISOFeatureType$clone()}} } } @@ -179,312 +138,6 @@ Initializes object } } \if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-setTypeName}{}}} -\subsection{Method \code{setTypeName()}}{ -Set type name -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$setTypeName(typeName)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{typeName}}{type name, object of class \link{ISOLocalName} or \link{character}} -} -\if{html}{\out{
    }} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-setDefinition}{}}} -\subsection{Method \code{setDefinition()}}{ -Set definition -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$setDefinition(definition, locales = NULL)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{definition}}{definition} - -\item{\code{locales}}{list of localized definitions. Default is \code{NULL}} -} -\if{html}{\out{
    }} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-setCode}{}}} -\subsection{Method \code{setCode()}}{ -Set code -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$setCode(code, locales = NULL)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{code}}{definition} - -\item{\code{locales}}{list of localized codes. Default is \code{NULL}} -} -\if{html}{\out{
    }} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-setIsAbstract}{}}} -\subsection{Method \code{setIsAbstract()}}{ -Set whether feature type is abstract -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$setIsAbstract(isAbstract)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{isAbstract}}{object of class \link{logical}} -} -\if{html}{\out{
    }} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-addAlias}{}}} -\subsection{Method \code{addAlias()}}{ -Adds alias -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$addAlias(alias)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{alias}}{object of class \link{ISOLocalName} or \link{character}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if added, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-delAlias}{}}} -\subsection{Method \code{delAlias()}}{ -Deletes alias -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$delAlias(alias)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{alias}}{object of class \link{ISOLocalName} or \link{character}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if deleted, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-addInheritsFrom}{}}} -\subsection{Method \code{addInheritsFrom()}}{ -Adds 'inheritsFrom' relation -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$addInheritsFrom(rel)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if added, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-delInheritsFrom}{}}} -\subsection{Method \code{delInheritsFrom()}}{ -Deletes 'inheritsFrom' relation -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$delInheritsFrom(rel)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if deleted, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-addInheritsTo}{}}} -\subsection{Method \code{addInheritsTo()}}{ -Adds 'inheritsTo' relation -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$addInheritsTo(rel)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if added, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-delInheritsTo}{}}} -\subsection{Method \code{delInheritsTo()}}{ -Deletes 'inheritsTo' relation -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$delInheritsTo(rel)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if deleted, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-setFeatureCatalogue}{}}} -\subsection{Method \code{setFeatureCatalogue()}}{ -Set feature catalogue -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$setFeatureCatalogue(fc)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{fc}}{object of class \link{ISOFeatureCatalogue}} -} -\if{html}{\out{
    }} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-addConstraint}{}}} -\subsection{Method \code{addConstraint()}}{ -Adds constraint -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$addConstraint(constraint)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{constraint}}{constraint, object of class \link{ISOConstraint}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if added, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-delConstraint}{}}} -\subsection{Method \code{delConstraint()}}{ -Deletes constraint -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$delConstraint(constraint)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{constraint}}{constraint, object of class \link{ISOConstraint}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if deleted, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-setDefinitionReference}{}}} -\subsection{Method \code{setDefinitionReference()}}{ -Set definition reference -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$setDefinitionReference(definitionReference)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{definitionReference}}{object of class \link{ISODefinitionReference}} -} -\if{html}{\out{
    }} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-addCharacteristic}{}}} -\subsection{Method \code{addCharacteristic()}}{ -Adds characteristic -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$addCharacteristic(characteristic)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{characteristic}}{characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if added, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-ISOFeatureType-delCharacteristic}{}}} -\subsection{Method \code{delCharacteristic()}}{ -Deletes characteristic -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{ISOFeatureType$delCharacteristic(characteristic)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{characteristic}}{characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{TRUE} if deleted, \code{FALSE} otherwise -} -} -\if{html}{\out{
    }} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ISOFeatureType-clone}{}}} \subsection{Method \code{clone()}}{ diff --git a/man/ISOFeatureType19115_3.Rd b/man/ISOFeatureType19115_3.Rd new file mode 100644 index 00000000..8a093d64 --- /dev/null +++ b/man/ISOFeatureType19115_3.Rd @@ -0,0 +1,528 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ISOFeatureType19115_3.R +\docType{class} +\name{ISOFeatureType19115_3} +\alias{ISOFeatureType19115_3} +\title{ISOFeatureType19115_3} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling an ISO FeatureType in ISO 19115-3 +} +\description{ +ISOFeatureType19115_3 + +ISOFeatureType19115_3 +} +\examples{ + #featuretype + md <- ISOFeatureType$new() + md$setTypeName("typeName") + md$setDefinition("definition") + md$setDesignation("designation") + md$setCode("code") + md$setIsAbstract(FALSE) + md$addAlias("alias1") + md$addAlias("alias2") + + #add feature attributes + for(i in 1:3){ + #create attribute + fat <- ISOFeatureAttribute$new() + fat$setMemberName(sprintf("name \%s",i)) + fat$setDefinition(sprintf("definition \%s",i)) + fat$setCardinality(lower=1,upper=1) + fat$setCode(sprintf("code \%s",i)) + + #add measurement unit + gml <- GMLBaseUnit$new(id = "ID\%") + gml$setDescriptionReference("someref") + gml$setIdentifier("identifier", "codespace") + gml$addName("name1", "codespace") + gml$addName("name2", "codespace") + gml$setQuantityTypeReference("someref") + gml$setCatalogSymbol("symbol") + gml$setUnitsSystem("somelink") + fat$setValueMeasurementUnit(gml) + + #add listed values + val1 <- ISOListedValue$new() + val1$setCode("code1") + val1$setLabel("label1") + val1$setDefinition("definition1") + fat$addListedValue(val1) + val2 <- ISOListedValue$new() + val2$setCode("code2") + val2$setLabel("label2") + val2$setDefinition("definition2") + fat$addListedValue(val2) + fat$setValueType("typeName") + + #add feature attribute as carrierOfCharacteristic + md$addCharacteristic(fat) + } + xml <- md$encode() + +} +\references{ +- ISO 19110 - GFC 1.1 https://schemas.isotc211.org/19110/gfc/1.1/gfc/#element_FC_FeatureType +} +\author{ +Emmanuel Blondel +} +\keyword{ISO} +\keyword{feature} +\keyword{type} +\section{Super classes}{ +\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOFeatureType]{geometa::ISOFeatureType}} -> \code{ISOFeatureType19115_3} +} +\section{Public fields}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{typeName}}{typeName [1..1]: character} + +\item{\code{definition}}{definition [0..1]: character} + +\item{\code{code}}{code [0..1]: character} + +\item{\code{isAbstract}}{isAbstract [1..1]: logical} + +\item{\code{aliases}}{aliases [0..*]: character} + +\item{\code{designation}}{designation [0..1]: character} + +\item{\code{carrierOfCharacteristics}}{carrierOfCharacteristics [0..*]: ISOCarrierOfCharacteristics} + +\item{\code{inheritsFrom}}{inheritsFrom [0..*]: ISOInheritanceRelation} + +\item{\code{inheritsTo}}{inheritsTo [0..*]: ISOInheritanceRelation} + +\item{\code{constrainedBy}}{constrainedBy [0..*]: ISOConstraint} + +\item{\code{definitionReference}}{definitionReference [0..*]: ISODefinitionReference} + +\item{\code{featureCatalogue}}{featureCatalogue: ISOFeatureCatalogue} +} +\if{html}{\out{
    }} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-ISOFeatureType19115_3-new}{\code{ISOFeatureType19115_3$new()}} +\item \href{#method-ISOFeatureType19115_3-setTypeName}{\code{ISOFeatureType19115_3$setTypeName()}} +\item \href{#method-ISOFeatureType19115_3-setDefinition}{\code{ISOFeatureType19115_3$setDefinition()}} +\item \href{#method-ISOFeatureType19115_3-setCode}{\code{ISOFeatureType19115_3$setCode()}} +\item \href{#method-ISOFeatureType19115_3-setIsAbstract}{\code{ISOFeatureType19115_3$setIsAbstract()}} +\item \href{#method-ISOFeatureType19115_3-addAlias}{\code{ISOFeatureType19115_3$addAlias()}} +\item \href{#method-ISOFeatureType19115_3-delAlias}{\code{ISOFeatureType19115_3$delAlias()}} +\item \href{#method-ISOFeatureType19115_3-setDesignation}{\code{ISOFeatureType19115_3$setDesignation()}} +\item \href{#method-ISOFeatureType19115_3-addCharacteristic}{\code{ISOFeatureType19115_3$addCharacteristic()}} +\item \href{#method-ISOFeatureType19115_3-delCharacteristic}{\code{ISOFeatureType19115_3$delCharacteristic()}} +\item \href{#method-ISOFeatureType19115_3-addInheritsFrom}{\code{ISOFeatureType19115_3$addInheritsFrom()}} +\item \href{#method-ISOFeatureType19115_3-delInheritsFrom}{\code{ISOFeatureType19115_3$delInheritsFrom()}} +\item \href{#method-ISOFeatureType19115_3-addInheritsTo}{\code{ISOFeatureType19115_3$addInheritsTo()}} +\item \href{#method-ISOFeatureType19115_3-delInheritsTo}{\code{ISOFeatureType19115_3$delInheritsTo()}} +\item \href{#method-ISOFeatureType19115_3-addConstraint}{\code{ISOFeatureType19115_3$addConstraint()}} +\item \href{#method-ISOFeatureType19115_3-delConstraint}{\code{ISOFeatureType19115_3$delConstraint()}} +\item \href{#method-ISOFeatureType19115_3-setDefinitionReference}{\code{ISOFeatureType19115_3$setDefinitionReference()}} +\item \href{#method-ISOFeatureType19115_3-setFeatureCatalogue}{\code{ISOFeatureType19115_3$setFeatureCatalogue()}} +\item \href{#method-ISOFeatureType19115_3-clone}{\code{ISOFeatureType19115_3$clone()}} +} +} +\if{html}{\out{ +
    Inherited methods + +
    +}} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-new}{}}} +\subsection{Method \code{new()}}{ +Initializes object +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$new(xml = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{xml}}{object of class \link{XMLInternalNode-class}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-setTypeName}{}}} +\subsection{Method \code{setTypeName()}}{ +Set type name +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$setTypeName(typeName)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{typeName}}{type name, object of class \link{character}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-setDefinition}{}}} +\subsection{Method \code{setDefinition()}}{ +Set definition +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$setDefinition(definition, locales = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{definition}}{definition} + +\item{\code{locales}}{list of localized definitions. Default is \code{NULL}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-setCode}{}}} +\subsection{Method \code{setCode()}}{ +Set code +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$setCode(code, locales = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{code}}{definition} + +\item{\code{locales}}{list of localized codes. Default is \code{NULL}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-setIsAbstract}{}}} +\subsection{Method \code{setIsAbstract()}}{ +Set whether feature type is abstract +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$setIsAbstract(isAbstract)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{isAbstract}}{object of class \link{logical}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-addAlias}{}}} +\subsection{Method \code{addAlias()}}{ +Adds alias +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$addAlias(alias)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{alias}}{object of class \link{ISOLocalName} (in ISO 19139 only) +or \link{character} (in ISO 19139 or ISO 19115-3)} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-delAlias}{}}} +\subsection{Method \code{delAlias()}}{ +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$delAlias(alias)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{alias}}{object of class \link{ISOLocalName} (in ISO 19139 only) +or \link{character} (in ISO 19139 or ISO 19115-3)} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-setDesignation}{}}} +\subsection{Method \code{setDesignation()}}{ +Set designation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$setDesignation(designation, locales = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{designation}}{designation} + +\item{\code{locales}}{list of localized designations. Default is \code{NULL}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-addCharacteristic}{}}} +\subsection{Method \code{addCharacteristic()}}{ +Adds characteristic +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$addCharacteristic(characteristic)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{characteristic}}{characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-delCharacteristic}{}}} +\subsection{Method \code{delCharacteristic()}}{ +Deletes characteristic +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$delCharacteristic(characteristic)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{characteristic}}{characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-addInheritsFrom}{}}} +\subsection{Method \code{addInheritsFrom()}}{ +Adds 'inheritsFrom' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$addInheritsFrom(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-delInheritsFrom}{}}} +\subsection{Method \code{delInheritsFrom()}}{ +Deletes 'inheritsFrom' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$delInheritsFrom(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-addInheritsTo}{}}} +\subsection{Method \code{addInheritsTo()}}{ +Adds 'inheritsTo' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$addInheritsTo(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-delInheritsTo}{}}} +\subsection{Method \code{delInheritsTo()}}{ +Deletes 'inheritsTo' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$delInheritsTo(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-addConstraint}{}}} +\subsection{Method \code{addConstraint()}}{ +Adds constraint +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$addConstraint(constraint)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{constraint}}{constraint, object of class \link{ISOConstraint}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-delConstraint}{}}} +\subsection{Method \code{delConstraint()}}{ +Deletes constraint +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$delConstraint(constraint)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{constraint}}{constraint, object of class \link{ISOConstraint}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-setDefinitionReference}{}}} +\subsection{Method \code{setDefinitionReference()}}{ +Set definition reference +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$setDefinitionReference(definitionReference)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{definitionReference}}{object of class \link{ISODefinitionReference}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-setFeatureCatalogue}{}}} +\subsection{Method \code{setFeatureCatalogue()}}{ +Set feature catalogue +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$setFeatureCatalogue(fc)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{fc}}{object of class \link{ISOFeatureCatalogue}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19115_3-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19115_3$clone(deep = FALSE)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
    }} +} +} +} diff --git a/man/ISOFeatureType19139.Rd b/man/ISOFeatureType19139.Rd new file mode 100644 index 00000000..f9f78746 --- /dev/null +++ b/man/ISOFeatureType19139.Rd @@ -0,0 +1,503 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ISOFeatureType19139.R +\docType{class} +\name{ISOFeatureType19139} +\alias{ISOFeatureType19139} +\title{ISOFeatureType19139} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling an ISO FeatureType in ISO 19139 +} +\description{ +ISOFeatureType19139 + +ISOFeatureType19139 +} +\examples{ + #featuretype + md <- ISOFeatureType$new() + md$setTypeName("typeName") + md$setDefinition("definition") + md$setCode("code") + md$setIsAbstract(FALSE) + md$addAlias("alias1") + md$addAlias("alias2") + + #add feature attributes + for(i in 1:3){ + #create attribute + fat <- ISOFeatureAttribute$new() + fat$setMemberName(sprintf("name \%s",i)) + fat$setDefinition(sprintf("definition \%s",i)) + fat$setCardinality(lower=1,upper=1) + fat$setCode(sprintf("code \%s",i)) + + #add measurement unit + gml <- GMLBaseUnit$new(id = "ID\%") + gml$setDescriptionReference("someref") + gml$setIdentifier("identifier", "codespace") + gml$addName("name1", "codespace") + gml$addName("name2", "codespace") + gml$setQuantityTypeReference("someref") + gml$setCatalogSymbol("symbol") + gml$setUnitsSystem("somelink") + fat$setValueMeasurementUnit(gml) + + #add listed values + val1 <- ISOListedValue$new() + val1$setCode("code1") + val1$setLabel("label1") + val1$setDefinition("definition1") + fat$addListedValue(val1) + val2 <- ISOListedValue$new() + val2$setCode("code2") + val2$setLabel("label2") + val2$setDefinition("definition2") + fat$addListedValue(val2) + fat$setValueType("typeName") + + #add feature attribute as carrierOfCharacteristic + md$addCharacteristic(fat) + } + xml <- md$encode() + +} +\references{ +- ISO 19110 - GFC 1.0 https://schemas.isotc211.org/19110/-/gfc/1.0/gfc/#element_FC_FeatureType +} +\author{ +Emmanuel Blondel +} +\keyword{ISO} +\keyword{feature} +\keyword{type} +\section{Super classes}{ +\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOFeatureType]{geometa::ISOFeatureType}} -> \code{ISOFeatureType19139} +} +\section{Public fields}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{typeName}}{typeName [1..1]: ISOLocalName or character} + +\item{\code{definition}}{definition [0..1]: character} + +\item{\code{code}}{code [0..1]: character} + +\item{\code{isAbstract}}{isAbstract [1..1]: logical} + +\item{\code{aliases}}{aliases [0..*]: ISOLocalName or character} + +\item{\code{inheritsFrom}}{inheritsFrom [0..*]: ISOInheritanceRelation} + +\item{\code{inheritsTo}}{inheritsTo [0..*]: ISOInheritanceRelation} + +\item{\code{featureCatalogue}}{featureCatalogue: ISOFeatureCatalogue} + +\item{\code{constrainedBy}}{constrainedBy [0..*]: ISOConstraint} + +\item{\code{definitionReference}}{definitionReference [0..*]: ISODefinitionReference} + +\item{\code{carrierOfCharacteristics}}{carrierOfCharacteristics [0..*]: ISOCarrierOfCharacteristics} +} +\if{html}{\out{
    }} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-ISOFeatureType19139-new}{\code{ISOFeatureType19139$new()}} +\item \href{#method-ISOFeatureType19139-setTypeName}{\code{ISOFeatureType19139$setTypeName()}} +\item \href{#method-ISOFeatureType19139-setDefinition}{\code{ISOFeatureType19139$setDefinition()}} +\item \href{#method-ISOFeatureType19139-setCode}{\code{ISOFeatureType19139$setCode()}} +\item \href{#method-ISOFeatureType19139-setIsAbstract}{\code{ISOFeatureType19139$setIsAbstract()}} +\item \href{#method-ISOFeatureType19139-addAlias}{\code{ISOFeatureType19139$addAlias()}} +\item \href{#method-ISOFeatureType19139-delAlias}{\code{ISOFeatureType19139$delAlias()}} +\item \href{#method-ISOFeatureType19139-addInheritsFrom}{\code{ISOFeatureType19139$addInheritsFrom()}} +\item \href{#method-ISOFeatureType19139-delInheritsFrom}{\code{ISOFeatureType19139$delInheritsFrom()}} +\item \href{#method-ISOFeatureType19139-addInheritsTo}{\code{ISOFeatureType19139$addInheritsTo()}} +\item \href{#method-ISOFeatureType19139-delInheritsTo}{\code{ISOFeatureType19139$delInheritsTo()}} +\item \href{#method-ISOFeatureType19139-setFeatureCatalogue}{\code{ISOFeatureType19139$setFeatureCatalogue()}} +\item \href{#method-ISOFeatureType19139-addConstraint}{\code{ISOFeatureType19139$addConstraint()}} +\item \href{#method-ISOFeatureType19139-delConstraint}{\code{ISOFeatureType19139$delConstraint()}} +\item \href{#method-ISOFeatureType19139-setDefinitionReference}{\code{ISOFeatureType19139$setDefinitionReference()}} +\item \href{#method-ISOFeatureType19139-addCharacteristic}{\code{ISOFeatureType19139$addCharacteristic()}} +\item \href{#method-ISOFeatureType19139-delCharacteristic}{\code{ISOFeatureType19139$delCharacteristic()}} +\item \href{#method-ISOFeatureType19139-clone}{\code{ISOFeatureType19139$clone()}} +} +} +\if{html}{\out{ +
    Inherited methods + +
    +}} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-new}{}}} +\subsection{Method \code{new()}}{ +Initializes object +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$new(xml = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{xml}}{object of class \link{XMLInternalNode-class}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-setTypeName}{}}} +\subsection{Method \code{setTypeName()}}{ +Set type name +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$setTypeName(typeName)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{typeName}}{type name, object of class \link{ISOLocalName} or \link{character}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-setDefinition}{}}} +\subsection{Method \code{setDefinition()}}{ +Set definition +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$setDefinition(definition, locales = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{definition}}{definition} + +\item{\code{locales}}{list of localized definitions. Default is \code{NULL}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-setCode}{}}} +\subsection{Method \code{setCode()}}{ +Set code +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$setCode(code, locales = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{code}}{definition} + +\item{\code{locales}}{list of localized codes. Default is \code{NULL}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-setIsAbstract}{}}} +\subsection{Method \code{setIsAbstract()}}{ +Set whether feature type is abstract +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$setIsAbstract(isAbstract)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{isAbstract}}{object of class \link{logical}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-addAlias}{}}} +\subsection{Method \code{addAlias()}}{ +Adds alias +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$addAlias(alias)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{alias}}{object of class \link{ISOLocalName} or \link{character}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-delAlias}{}}} +\subsection{Method \code{delAlias()}}{ +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$delAlias(alias)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{alias}}{object of class \link{ISOLocalName} or \link{character}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-addInheritsFrom}{}}} +\subsection{Method \code{addInheritsFrom()}}{ +Adds 'inheritsFrom' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$addInheritsFrom(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-delInheritsFrom}{}}} +\subsection{Method \code{delInheritsFrom()}}{ +Deletes 'inheritsFrom' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$delInheritsFrom(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-addInheritsTo}{}}} +\subsection{Method \code{addInheritsTo()}}{ +Adds 'inheritsTo' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$addInheritsTo(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-delInheritsTo}{}}} +\subsection{Method \code{delInheritsTo()}}{ +Deletes 'inheritsTo' relation +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$delInheritsTo(rel)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{rel}}{rel, object of class \link{ISOInheritanceRelation}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-setFeatureCatalogue}{}}} +\subsection{Method \code{setFeatureCatalogue()}}{ +Set feature catalogue +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$setFeatureCatalogue(fc)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{fc}}{object of class \link{ISOFeatureCatalogue}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-addConstraint}{}}} +\subsection{Method \code{addConstraint()}}{ +Adds constraint +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$addConstraint(constraint)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{constraint}}{constraint, object of class \link{ISOConstraint}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-delConstraint}{}}} +\subsection{Method \code{delConstraint()}}{ +Deletes constraint +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$delConstraint(constraint)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{constraint}}{constraint, object of class \link{ISOConstraint}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-setDefinitionReference}{}}} +\subsection{Method \code{setDefinitionReference()}}{ +Set definition reference +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$setDefinitionReference(definitionReference)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{definitionReference}}{object of class \link{ISODefinitionReference}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-addCharacteristic}{}}} +\subsection{Method \code{addCharacteristic()}}{ +Adds characteristic +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$addCharacteristic(characteristic)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{characteristic}}{characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if added, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-delCharacteristic}{}}} +\subsection{Method \code{delCharacteristic()}}{ +Deletes characteristic +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$delCharacteristic(characteristic)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{characteristic}}{characteristic, object inheriting class \link{ISOAbstractCarrierOfCharacteristics}} +} +\if{html}{\out{
    }} +} +\subsection{Returns}{ +\code{TRUE} if deleted, \code{FALSE} otherwise +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOFeatureType19139-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOFeatureType19139$clone(deep = FALSE)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
    }} +} +} +} diff --git a/man/ISOOperationMetadata.Rd b/man/ISOOperationMetadata.Rd index 01f870eb..c20258fd 100644 --- a/man/ISOOperationMetadata.Rd +++ b/man/ISOOperationMetadata.Rd @@ -44,7 +44,7 @@ Emmanuel Blondel \item{\code{invocationName}}{invocationName [0..1]: character} -\item{\code{parameters}}{parameters [0..*]: ISOParameter} +\item{\code{parameters}}{parameters [0..*]: ISOSRVParameter} \item{\code{connectPoint}}{connectPoint [1..*]: ISOOnlineResource} @@ -236,7 +236,7 @@ Adds parameter \subsection{Arguments}{ \if{html}{\out{
    }} \describe{ -\item{\code{parameter}}{object of class \link{ISOParameter}} +\item{\code{parameter}}{object of class \link{ISOSRVParameter}} } \if{html}{\out{
    }} } @@ -256,7 +256,7 @@ Deletes parameter \subsection{Arguments}{ \if{html}{\out{
    }} \describe{ -\item{\code{parameter}}{object of class \link{ISOParameter}} +\item{\code{parameter}}{object of class \link{ISOSRVParameter}} } \if{html}{\out{
    }} } diff --git a/man/ISOPropertyType.Rd b/man/ISOPropertyType.Rd index f8899481..99f1da2c 100644 --- a/man/ISOPropertyType.Rd +++ b/man/ISOPropertyType.Rd @@ -72,6 +72,7 @@ Emmanuel Blondel
  • geometa::ISOAbstractPropertyType$setCardinality()
  • geometa::ISOAbstractPropertyType$setDefinition()
  • geometa::ISOAbstractPropertyType$setDefinitionReference()
  • +
  • geometa::ISOAbstractPropertyType$setDesignation()
  • geometa::ISOAbstractPropertyType$setFeatureCatalogue()
  • geometa::ISOAbstractPropertyType$setMemberName()
  • diff --git a/man/ISOSRVParameter.Rd b/man/ISOSRVParameter.Rd index fa3d2be8..bb592ec1 100644 --- a/man/ISOSRVParameter.Rd +++ b/man/ISOSRVParameter.Rd @@ -43,7 +43,7 @@ Emmanuel Blondel \describe{ \item{\code{name}}{name [1..1]: character} -\item{\code{direction}}{direction [0..1]: ISOParameterDirection} +\item{\code{direction}}{direction [0..1]: ISOParameterDirection or character} \item{\code{description}}{description [0..1]: character} @@ -153,8 +153,8 @@ Set direction \subsection{Arguments}{ \if{html}{\out{
    }} \describe{ -\item{\code{direction}}{object of class \link{ISOParameterDirection} or \link{character} -among values returned by \code{ISOParameterDirection$values()}} +\item{\code{direction}}{object of class \link{ISOSRVParameterDirection} or \link{character} +among values returned by \code{ISOSRVParameterDirection$values()}} } \if{html}{\out{
    }} } diff --git a/man/ISOSRVServiceIdentification19115_3.Rd b/man/ISOSRVServiceIdentification19115_3.Rd new file mode 100644 index 00000000..95720cb8 --- /dev/null +++ b/man/ISOSRVServiceIdentification19115_3.Rd @@ -0,0 +1,136 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ISOServiceIdentification.R +\docType{class} +\name{ISOSRVServiceIdentification19115_3} +\alias{ISOSRVServiceIdentification19115_3} +\title{ISOSRVServiceIdentification19115_3} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling an ISO SRV ServiceIdentification in ISO 19115-3 +} +\description{ +ISOSRVServiceIdentification19115_3 + +ISOSRVServiceIdentification19115_3 +} +\keyword{ISO} +\keyword{identification} +\keyword{service} +\section{Super classes}{ +\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOIdentification]{geometa::ISOIdentification}} -> \code{\link[geometa:ISOIdentification19115_3]{geometa::ISOIdentification19115_3}} -> \code{\link[geometa:ISOServiceIdentification19115_3]{geometa::ISOServiceIdentification19115_3}} -> \code{ISOSRVServiceIdentification19115_3} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-ISOSRVServiceIdentification19115_3-new}{\code{ISOSRVServiceIdentification19115_3$new()}} +\item \href{#method-ISOSRVServiceIdentification19115_3-clone}{\code{ISOSRVServiceIdentification19115_3$clone()}} +} +} +\if{html}{\out{ +
    Inherited methods + +
    +}} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOSRVServiceIdentification19115_3-new}{}}} +\subsection{Method \code{new()}}{ +Initializes object +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOSRVServiceIdentification19115_3$new(xml = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{xml}}{object of class \link{XMLInternalNode-class}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOSRVServiceIdentification19115_3-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOSRVServiceIdentification19115_3$clone(deep = FALSE)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
    }} +} +} +} diff --git a/man/ISOSRVServiceIdentification19139.Rd b/man/ISOSRVServiceIdentification19139.Rd new file mode 100644 index 00000000..fcb0fed0 --- /dev/null +++ b/man/ISOSRVServiceIdentification19139.Rd @@ -0,0 +1,126 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ISOServiceIdentification.R +\docType{class} +\name{ISOSRVServiceIdentification19139} +\alias{ISOSRVServiceIdentification19139} +\title{ISOSRVServiceIdentification19139} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling an ISO SRV ServiceIdentification in ISO 19139 +} +\description{ +ISOSRVServiceIdentification19139 + +ISOSRVServiceIdentification19139 +} +\keyword{ISO} +\keyword{identification} +\keyword{service} +\section{Super classes}{ +\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOIdentification]{geometa::ISOIdentification}} -> \code{\link[geometa:ISOIdentification19139]{geometa::ISOIdentification19139}} -> \code{\link[geometa:ISOServiceIdentification19139]{geometa::ISOServiceIdentification19139}} -> \code{ISOSRVServiceIdentification19139} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-ISOSRVServiceIdentification19139-new}{\code{ISOSRVServiceIdentification19139$new()}} +\item \href{#method-ISOSRVServiceIdentification19139-clone}{\code{ISOSRVServiceIdentification19139$clone()}} +} +} +\if{html}{\out{ +
    Inherited methods + +
    +}} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOSRVServiceIdentification19139-new}{}}} +\subsection{Method \code{new()}}{ +Initializes object +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOSRVServiceIdentification19139$new(xml = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{xml}}{object of class \link{XMLInternalNode-class}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOSRVServiceIdentification19139-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOSRVServiceIdentification19139$clone(deep = FALSE)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
    }} +} +} +} diff --git a/man/ISOServiceIdentification19115_3.Rd b/man/ISOServiceIdentification19115_3.Rd new file mode 100644 index 00000000..ab4f0f68 --- /dev/null +++ b/man/ISOServiceIdentification19115_3.Rd @@ -0,0 +1,136 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ISOServiceIdentification.R +\docType{class} +\name{ISOServiceIdentification19115_3} +\alias{ISOServiceIdentification19115_3} +\title{ISOServiceIdentification19115_3} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling an ISO ServiceIdentification in ISO 19115-3 +} +\description{ +ISOServiceIdentification19115_3 + +ISOServiceIdentification19115_3 +} +\keyword{ISO} +\keyword{identification} +\keyword{service} +\section{Super classes}{ +\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOIdentification]{geometa::ISOIdentification}} -> \code{\link[geometa:ISOIdentification19115_3]{geometa::ISOIdentification19115_3}} -> \code{ISOServiceIdentification19115_3} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-ISOServiceIdentification19115_3-new}{\code{ISOServiceIdentification19115_3$new()}} +\item \href{#method-ISOServiceIdentification19115_3-clone}{\code{ISOServiceIdentification19115_3$clone()}} +} +} +\if{html}{\out{ +
    Inherited methods + +
    +}} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOServiceIdentification19115_3-new}{}}} +\subsection{Method \code{new()}}{ +Initializes object +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOServiceIdentification19115_3$new(xml = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{xml}}{object of class \link{XMLInternalNode-class}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOServiceIdentification19115_3-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOServiceIdentification19115_3$clone(deep = FALSE)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
    }} +} +} +} diff --git a/man/ISOServiceIdentification19139.Rd b/man/ISOServiceIdentification19139.Rd new file mode 100644 index 00000000..3fd6e575 --- /dev/null +++ b/man/ISOServiceIdentification19139.Rd @@ -0,0 +1,126 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ISOServiceIdentification.R +\docType{class} +\name{ISOServiceIdentification19139} +\alias{ISOServiceIdentification19139} +\title{ISOServiceIdentification19139} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling an ISO ServiceIdentification in ISO 19139 +} +\description{ +ISOServiceIdentification19139 + +ISOServiceIdentification19139 +} +\keyword{ISO} +\keyword{identification} +\keyword{service} +\section{Super classes}{ +\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOIdentification]{geometa::ISOIdentification}} -> \code{\link[geometa:ISOIdentification19139]{geometa::ISOIdentification19139}} -> \code{ISOServiceIdentification19139} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-ISOServiceIdentification19139-new}{\code{ISOServiceIdentification19139$new()}} +\item \href{#method-ISOServiceIdentification19139-clone}{\code{ISOServiceIdentification19139$clone()}} +} +} +\if{html}{\out{ +
    Inherited methods + +
    +}} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOServiceIdentification19139-new}{}}} +\subsection{Method \code{new()}}{ +Initializes object +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOServiceIdentification19139$new(xml = NULL)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{xml}}{object of class \link{XMLInternalNode-class}} +} +\if{html}{\out{
    }} +} +} +\if{html}{\out{
    }} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ISOServiceIdentification19139-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
    }}\preformatted{ISOServiceIdentification19139$clone(deep = FALSE)}\if{html}{\out{
    }} +} + +\subsection{Arguments}{ +\if{html}{\out{
    }} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
    }} +} +} +} diff --git a/man/ISOStatus.Rd b/man/ISOStatus.Rd index 511fb7d2..144b3219 100644 --- a/man/ISOStatus.Rd +++ b/man/ISOStatus.Rd @@ -37,7 +37,7 @@ Emmanuel Blondel \keyword{ISO} \keyword{status} \section{Super classes}{ -\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOCodeListValue]{geometa::ISOCodeListValue}} -> \code{ISOStatus} +\code{\link[geometa:geometaLogger]{geometa::geometaLogger}} -> \code{\link[geometa:ISOAbstractObject]{geometa::ISOAbstractObject}} -> \code{\link[geometa:ISOCodeListValue]{geometa::ISOCodeListValue}} -> \code{\link[geometa:ISOProgress]{geometa::ISOProgress}} -> \code{ISOStatus} } \section{Methods}{ \subsection{Public methods}{ diff --git a/tests/testthat/test_ISODataQuality.R b/tests/testthat/test_ISODataQuality.R index c81c7277..59faa324 100644 --- a/tests/testthat/test_ISODataQuality.R +++ b/tests/testthat/test_ISODataQuality.R @@ -14,7 +14,7 @@ test_that("encoding",{ dq <- ISODataQuality$new() #add scope - scope <- ISOScopeCode$new() + scope <- ISODataQualityScope$new() scope$setLevel("dataset") dq$setScope(scope) @@ -57,7 +57,7 @@ test_that("encoding - i18n",{ dq <- ISODataQuality$new() #add scope - scope <- ISOScopeCode$new() + scope <- ISODataQualityScope$new() scope$setLevel("dataset") dq$setScope(scope) diff --git a/tests/testthat/test_ISOFeatureCatalogue.R b/tests/testthat/test_ISOFeatureCatalogue.R index 6bca7724..5c03893f 100644 --- a/tests/testthat/test_ISOFeatureCatalogue.R +++ b/tests/testthat/test_ISOFeatureCatalogue.R @@ -317,4 +317,92 @@ test_that("encoding - i18n",{ expect_true(ISOAbstractObject$compare(fc, fc2, "xml")) +}) + +test_that("encoding - ISO 19115-3",{ + testthat::skip_on_cran() + + setMetadataStandard("19115-3") + + #encoding + fc <- ISOFeatureCatalogue$new(uuid = "my-fc-identifier") + fc$setName("name") + fc$addScope("scope1") + fc$addScope("scope2") + fc$addFieldOfApplication("field1") + fc$addFieldOfApplication("field2") + fc$setVersionNumber("1.0") + fc$setVersionDate(ISOdate(2015, 1, 1, 1)) + + producer <- ISOResponsibility$new() + producer_party = ISOOrganisation$new() + producer_party$setName("ORG") + producer$addParty(producer_party) + producer$setRole("originator") + fc$setProducer(producer) + fc$setFunctionalLanguage("eng") + + cit <- ISOCitation$new() + cit$setTitle("some citation title") + cit$addAlternateTitle("alternate title") + d <- ISODate$new() + d$setDate(ISOdate(2015,1,1)) + d$setDateType("creation") + cit$addDate(d) + fc$addDefinitionSource(cit) + + #add featureType + ft <- ISOFeatureType$new() + ft$setTypeName("typeName") + ft$setDefinition("definition") + ft$setDesignation("Type name") + ft$setCode("code") + ft$setIsAbstract(FALSE) + ft$addAlias("alias1") + ft$addAlias("alias2") + + #add feature attributes + for(i in 1:3){ + #create attribute + fat <- ISOFeatureAttribute$new() + fat$setMemberName(sprintf("name %s",i)) + fat$setDefinition(sprintf("definition %s",i)) + fat$setCardinality(lower=1,upper=1) + fat$setCode(sprintf("code %s",i)) + + #add measurement unit + fat$setValueMeasurementUnit("symbol") + + #add listed values + val1 <- ISOListedValue$new() + val1$setCode("code1") + val1$setLabel("label1") + val1$setDefinition("definition1") + fat$addListedValue(val1) + val2 <- ISOListedValue$new() + val2$setCode("code2") + val2$setLabel("label2") + val2$setDefinition("definition2") + fat$addListedValue(val2) + fat$setValueType("typeName") + + #add feature attribute as carrierOfCharacteristic + ft$addCharacteristic(fat) + } + + #add featureType to catalogue + fc$addFeatureType(ft) + + expect_is(fc, "ISOFeatureCatalogue") + xml <- fc$encode() + expect_is(xml, "XMLInternalNode") + + #decoding + fc2 <- ISOFeatureCatalogue$new(xml = xml) + xml2 <- fc2$encode() + + expect_true(ISOAbstractObject$compare(fc, fc2, "xml")) + + setMetadataStandard("19139") + }) \ No newline at end of file diff --git a/tests/testthat/test_ISOGeorectified.R b/tests/testthat/test_ISOGeorectified.R index b9d7136f..f1d66c32 100644 --- a/tests/testthat/test_ISOGeorectified.R +++ b/tests/testthat/test_ISOGeorectified.R @@ -24,7 +24,7 @@ test_that("encoding",{ md$setCheckPointAvailability(TRUE) md$setCheckPointDescription("string") - pt <- st_point(c(1,1)) + pt <- sf::st_point(c(1,1)) md$setCenterPoint(sfg = pt) md$setPixelOrientation("center") @@ -35,5 +35,5 @@ test_that("encoding",{ md2 <- ISOGeorectified$new(xml = xml) xml2 <- md2$encode() - expect_true(ISOAbstractObject$compare(md, md2)) + expect_true(ISOAbstractObject$compare(md, md2, method = "xml")) }) \ No newline at end of file diff --git a/tests/testthat/test_ISOImageryMetadata.R b/tests/testthat/test_ISOImageryMetadata.R index 78c4c703..1cfa7cf9 100644 --- a/tests/testthat/test_ISOImageryMetadata.R +++ b/tests/testthat/test_ISOImageryMetadata.R @@ -271,7 +271,7 @@ test_that("encoding/decoding",{ dq <- ISODataQuality$new() #add scope - scope <- ISOScopeCode$new() + scope <- ISODataQualityScope$new() scope$setLevel("dataset") dq$setScope(scope) @@ -559,7 +559,7 @@ test_that("encoding/decoding",{ dq <- ISODataQuality$new() #add scope - scope <- ISOScopeCode$new() + scope <- ISODataQualityScope$new() scope$setLevel("dataset") dq$setScope(scope) @@ -1196,7 +1196,7 @@ test_that("encoding/decoding - i18n",{ dq <- ISODataQuality$new() #add scope - scope <- ISOScopeCode$new() + scope <- ISODataQualityScope$new() scope$setLevel("dataset") dq$setScope(scope) diff --git a/tests/testthat/test_ISOOperationMetadata.R b/tests/testthat/test_ISOOperationMetadata.R index 5e803f18..a3e77c51 100644 --- a/tests/testthat/test_ISOOperationMetadata.R +++ b/tests/testthat/test_ISOOperationMetadata.R @@ -17,7 +17,7 @@ test_that("encoding",{ md$setOperationDescription("WPS Execute") md$setInvocationName("identifier") for(i in 1:3){ - param <- ISOParameter$new() + param <- ISOSRVParameter$new() param$setName(sprintf("name%s",i), "xs:string") param$setDirection("in") param$setDescription(sprintf("description%s",i)) @@ -26,7 +26,7 @@ test_that("encoding",{ param$setValueType("xs:string") md$addParameter(param) } - outParam <-ISOParameter$new() + outParam <-ISOSRVParameter$new() outParam$setName("name", "xs:string") outParam$setDirection("in") outParam$setDescription("description") diff --git a/tests/testthat/test_ISOParameter.R b/tests/testthat/test_ISOSRVParameter.R similarity index 86% rename from tests/testthat/test_ISOParameter.R rename to tests/testthat/test_ISOSRVParameter.R index 1adb9d8b..72ff86d0 100644 --- a/tests/testthat/test_ISOParameter.R +++ b/tests/testthat/test_ISOSRVParameter.R @@ -1,17 +1,17 @@ -# test_ISOParameter.R +# test_ISOSRVParameter.R # Author: Emmanuel Blondel # -# Description: Unit tests for ISOParameter.R +# Description: Unit tests for ISOSRVParameter #======================= require(geometa, quietly = TRUE) require(testthat) -context("ISOParameter") +context("ISOSRVParameter") test_that("encoding",{ testthat::skip_on_cran() #encoding - md <- ISOParameter$new() + md <- ISOSRVParameter$new() attrType <- ISOTypeName$new() attrType$setName("test") md$setName("name", attrType) @@ -25,7 +25,7 @@ test_that("encoding",{ expect_is(xml, "XMLInternalNode") #decoding - md2 <- ISOParameter$new(xml = xml) + md2 <- ISOSRVParameter$new(xml = xml) xml2 <- md2$encode() expect_true(ISOAbstractObject$compare(md, md2)) @@ -35,7 +35,7 @@ test_that("encoding",{ test_that("encoding - i18n",{ testthat::skip_on_cran() #encoding - md <- ISOParameter$new() + md <- ISOSRVParameter$new() attrType <- ISOTypeName$new() attrType$setName( "name", @@ -68,7 +68,7 @@ test_that("encoding - i18n",{ expect_is(xml, "XMLInternalNode") #decoding - md2 <- ISOParameter$new(xml = xml) + md2 <- ISOSRVParameter$new(xml = xml) xml2 <- md2$encode() expect_true(ISOAbstractObject$compare(md, md2)) diff --git a/tests/testthat/test_ISOScopeCode.R b/tests/testthat/test_ISOScopeCode.R deleted file mode 100644 index 1596a765..00000000 --- a/tests/testthat/test_ISOScopeCode.R +++ /dev/null @@ -1,25 +0,0 @@ -# test_ISOScope.R -# Author: Emmanuel Blondel -# -# Description: Unit tests for ISOScope.R -#======================= -require(geometa, quietly = TRUE) -require(testthat) - -context("ISOScope") - -test_that("encoding",{ - testthat::skip_on_cran() - #encoding - md <- ISOScopeCode$new() - md$setLevel("dataset") - xml <- md$encode() - expect_is(xml, "XMLInternalNode") - - #decoding - md2 <- ISOScopeCode$new(xml = xml) - xml2 <- md2$encode() - - expect_true(ISOAbstractObject$compare(md, md2)) - -}) \ No newline at end of file