Skip to content

Commit

Permalink
fix minoccurs/maxoccurs
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Apr 16, 2020
1 parent 39641c4 commit 40f3fdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions R/geoflow_action_geometa_create_iso_19110.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions R/geoflow_featuremember.R
Original file line number Diff line number Diff line change
Expand Up @@ -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'")
Expand Down

0 comments on commit 40f3fdf

Please sign in to comment.