Skip to content

Commit

Permalink
#187 wrap SWE classes for proper re-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Sep 30, 2022
1 parent 5b8fa0e commit 6cda4d2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/SWEAbstractDataComponent.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SWEAbstractDataComponent <- R6Class("SWEAbstractDataComponent",
#'@param definition definition
initialize = function(xml = NULL, element = NULL, updatable = NULL, optional = FALSE, definition = NULL){
if(is.null(element)) element <- private$xmlElement
super$initialize(xml, element = element, attrs = list(), defaults = list(), wrap = FALSE, value_as_field = TRUE)
super$initialize(xml, element = element, attrs = list(), defaults = list(), wrap = TRUE, value_as_field = TRUE)
if(!is.null(updatable)) if(is.logical(updatable)) self$setAttr("updatable", tolower(updatable))
self$setAttr("optional", tolower(optional))
if(!is.null(definition)) self$setAttr("definition", definition)
Expand Down
2 changes: 1 addition & 1 deletion R/SWEAbstractObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SWEAbstractObject <- R6Class("SWEAbstractObject",
#'@param defaults defaults
#'@param wrap wrap
#'@param value_as_field whether value should be set as field
initialize = function(xml = NULL, element = NULL, attrs = list(), defaults = list(), wrap = FALSE,
initialize = function(xml = NULL, element = NULL, attrs = list(), defaults = list(), wrap = TRUE,
value_as_field = FALSE){
if(is.null(element)) element <- private$xmlElement
super$initialize(xml, element, namespace = private$xmlNamespacePrefix,
Expand Down
2 changes: 1 addition & 1 deletion R/SWEAbstractSWE.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SWEAbstractSWE <- R6Class("SWEAbstractSWE",
#'@param defaults defaults
#'@param wrap wrap
#'@param value_as_field whether value should be set as field
initialize = function(xml = NULL, element = NULL, attrs = list(), defaults = list(), wrap = FALSE,
initialize = function(xml = NULL, element = NULL, attrs = list(), defaults = list(), wrap = TRUE,
value_as_field = FALSE){
if(is.null(element)) element <- private$xmlElement
super$initialize(xml, element,
Expand Down
2 changes: 1 addition & 1 deletion R/SWENilValues.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SWENilValues <- R6Class("SWENilValues",
initialize = function(xml = NULL){
super$initialize(xml, element = private$xmlElement,
attrs = list(), defaults = list(),
wrap = FALSE)
wrap = TRUE)
},

#'@description Adds a nil value with a reason
Expand Down
2 changes: 1 addition & 1 deletion R/SWEQuantity.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SWEQuantity <- R6Class("SWEQuantity",
constraint = NULL,

#'@field value value
value = NA_real_,
value = NULL,

#'@description Initializes an object of class \link{SWEQuantity}
#'@param xml object of class \link{XMLInternalNode-class} from \pkg{XML}
Expand Down

0 comments on commit 6cda4d2

Please sign in to comment.