diff --git a/R/geoflow_action_geometa_create_iso_19110.R b/R/geoflow_action_geometa_create_iso_19110.R index 6c1e09a..4223379 100644 --- a/R/geoflow_action_geometa_create_iso_19110.R +++ b/R/geoflow_action_geometa_create_iso_19110.R @@ -155,6 +155,8 @@ geometa_create_iso_19110 <- function(entity, config, options){ fat$setDefinition(fat_attr$def) minOccurs <- default_min_occurs; if(!is.null(fat_attr)) minOccurs <- fat_attr$minOccurs maxOccurs <- default_max_occurs; if(!is.null(fat_attr)) maxOccurs <- fat_attr$maxOccurs + if(is.null(minOccurs)) minOccurs <- default_min_occurs + if(is.null(maxOccurs)) maxOccurs <- default_max_occurs if(maxOccurs == "Inf") maxOccurs <- Inf fat$setCardinality(lower = minOccurs, upper = maxOccurs) #code diff --git a/R/geoflow_featuremember.R b/R/geoflow_featuremember.R index 4b025ed..e285fe4 100644 --- a/R/geoflow_featuremember.R +++ b/R/geoflow_featuremember.R @@ -32,11 +32,11 @@ geoflow_featuremember <- R6Class("geoflow_featuremember", name = NULL, def = NULL, defSource = NULL, - minOccurs = 1L, - maxOccurs = 1L, + minOccurs = NULL, + maxOccurs = NULL, registerId = NULL, initialize = function(type, code, name, def, defSource = NULL, - minOccurs = 1L, maxOccurs = 1L, + minOccurs = NULL, maxOccurs = NULL, registerId = NULL){ if(!type %in% c("attribute", "variable")){ stop("The member type should be either 'attribute' or 'variable'")