Skip to content

Commit

Permalink
#69 add GML operation parameter classes
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jun 27, 2017
1 parent 812735c commit 7b7c486
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(GMLAbstractCoordinateSystem)
export(GMLAbstractGML)
export(GMLAbstractGeneralConversion)
export(GMLAbstractGeneralDerivedCRS)
export(GMLAbstractGeneralOperationParameter)
export(GMLAbstractObject)
export(GMLAbstractSingleCRS)
export(GMLAbstractSingleOperation)
Expand All @@ -27,6 +28,8 @@ export(GMLEllipsoidalCS)
export(GMLGeodeticCRS)
export(GMLLinearCS)
export(GMLObliqueCartesianCS)
export(GMLOperationParameter)
export(GMLOperationParameterGroup)
export(GMLPolarCS)
export(GMLProjectedCRS)
export(GMLSphericalCS)
Expand Down
17 changes: 13 additions & 4 deletions R/GMLConversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,33 @@ GMLConversion <- R6Class("GMLConversion",
),
public = list(

#+ method [1..1]: #TODO
#+ method [1..1]: GMLOperationMethod
method = NULL,
#+ parameterValue [0..*]: #TODO
#+ parameterValue [0..*]: GMLParameterValue
parameterValue = list(),

#setMethod
setMethod = function(method){
if(!is(method, "GMLOperationMethod")){
stop("The argument value should be an object of class 'GMLOperationMethod'")
}
self$method <- GMLElement$create("method", method)
},

#addParameterValue
addParameterValue = function(paramValue){
return(self$addListElement("parameterValue", paramValue))
if(!is(paramValue, "GMLParameterValue")){
stop("The argument value should be an object of class 'GMLParameterValue'")
}
return(self$addListElement("parameterValue", GMLElement$create("parameterValue", value = paramValue)))
},

#delParameterValue
delParameterValue = function(paramValue){
return(self$delListElement("parameterValue", paramValue))
if(!is(paramValue, "GMLParameterValue")){
stop("The argument value should be an object of class 'GMLParameterValue'")
}
return(self$delListElement("parameterValue", GMLElement$create("parameterValue", value = paramValue)))
}

)
Expand Down

0 comments on commit 7b7c486

Please sign in to comment.