-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#69 support GML operationParameter & operationParameterGroup
- Loading branch information
Showing
10 changed files
with
592 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#' GMLAbstractGeneralOperationParameter | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO GML abstract general operation parameter | ||
#' @return Object of \code{\link{R6Class}} for modelling an GMLAbstractGeneralOperationParameter | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @field minimumOccurs | ||
#' | ||
#' @section Inherited methods from \code{GMLDefinition} | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml, defaults, id)}}{ | ||
#' This method is used to instantiate a GML AbstractGeneralOperationParameter | ||
#' } | ||
#' \item{\code{setMinimumOccurs(minimumOccurs)}}{ | ||
#' Sets the minimum occurs, object of class \code{integer} | ||
#' } | ||
#' } | ||
#' | ||
#' @references | ||
#' ISO 19136:2007 Geographic Information -- Geographic Markup Language. | ||
#' http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=32554 | ||
#' | ||
#' OGC Geography Markup Language. http://www.opengeospatial.org/standards/gml | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
GMLAbstractGeneralOperationParameter <- R6Class("GMLAbstractGeneralOperationParameter", | ||
inherit = GMLDefinition, | ||
private = list( | ||
xmlElement = "AbstractGeneralOperationParameter", | ||
xmlNamespacePrefix = "GML" | ||
), | ||
public = list( | ||
|
||
#+ minimumOccurs [0..1]: integer | ||
minimumOccurs = NULL, | ||
|
||
#setMinimumOccurs | ||
setMinimumOccurs = function(minimumOccurs){ | ||
if(!is(minimumOccurs, "integer")){ | ||
minimumOccurs <- as.integer(minimumOccurs) | ||
if(is.na(minimumOccurs)){ | ||
stop("The argument value should be an object of class 'integer'") | ||
} | ||
} | ||
self$minimumOccurs <- GMLElement$create("minimumOccurs", value = minimumOccurs) | ||
} | ||
|
||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
#' GMLOperationMethod | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO GML operation method | ||
#' @return Object of \code{\link{R6Class}} for modelling an GMLOperationMethod | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @field formulaCitation | ||
#' @field sourceDimensions | ||
#' @field targetDimensions | ||
#' | ||
#' @section Inherited methods from \code{GMLDefinition} | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml, defaults, id)}}{ | ||
#' This method is used to instantiate a GML OperationMethod | ||
#' } | ||
#' \item{\code{setFormulaCitation(citation)}}{ | ||
#' Sets the formula citation, object of class \code{ISOCitation} | ||
#' } | ||
#' \item{\code{setSourceDimensions(value)}}{ | ||
#' Sets the number of source dimensions, object of class \code{integer} | ||
#' } | ||
#' \item{\code{setTargetDimensions(value)}}{ | ||
#' Sets the number of target dimensions, object of class \code{integer} | ||
#' } | ||
#' \item{\code{addParameter(parameter)}}{ | ||
#' Adds a parameter or parameter group, object of class \code{GMLOperationParameter} | ||
#' or \code{GMLOperationParameterGroup} | ||
#' } | ||
#' \item{\code{delParameter(parameter)}}{ | ||
#' Deletes a parameter or parameter group, object of class \code{GMLOperationParameter} | ||
#' or \code{GMLOperationParameterGroupo} | ||
#' } | ||
#' } | ||
#' | ||
#' @references | ||
#' ISO 19136:2007 Geographic Information -- Geographic Markup Language. | ||
#' http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=32554 | ||
#' | ||
#' OGC Geography Markup Language. http://www.opengeospatial.org/standards/gml | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
GMLOperationMethod <- R6Class("GMLOperationMethod", | ||
inherit = GMLDefinition, | ||
private = list( | ||
xmlElement = "OperationMethod", | ||
xmlNamespacePrefix = "GML" | ||
), | ||
public = list( | ||
|
||
#+ formulaCitation [1..1]: ISOCitation | ||
formulaCitation = NA, | ||
#+ sourceDimensions [0..1]: integer | ||
sourceDimensions = NULL, | ||
#+ targetDimensions [0..1]: integer | ||
targetDimensions = NULL, | ||
#+ parameter [0..*]: GMLOperationParameter or GMLOperationParameterGroup | ||
parameter = list(), | ||
|
||
#setFormulaCitation | ||
setFormulaCitation = function(citation){ | ||
if(!is(citation, "ISOCitation")){ | ||
stop("The argument value should be an object of class 'ISOCitation'") | ||
} | ||
self$formulaCitation <- GMLElement$create("formulaCitation", value = citation) | ||
}, | ||
|
||
#setSourceDimensions | ||
setSourceDimensions = function(value){ | ||
if(!is(value, "integer")){ | ||
value <- as.integer(value) | ||
if(is.na(value)){ | ||
stop("The argument value should an object of class or coerceable to 'integer'") | ||
} | ||
} | ||
self$sourceDimensions <- GMLElement$create("sourceDimensions", value = value) | ||
}, | ||
|
||
#setTargetDimensions | ||
setTargetDimensions = function(value){ | ||
if(!is(value, "integer")){ | ||
value <- as.integer(value) | ||
if(is.na(value)){ | ||
stop("The argument value should an object of class or coerceable to 'integer'") | ||
} | ||
} | ||
self$targetDimensions <- GMLElement$create("targetDimensions", value = value) | ||
}, | ||
|
||
#addParameter | ||
addParameter = function(param){ | ||
if(!inherits(param, "GMLAbstractGeneralOperationParameter")){ | ||
stop("The argument value should be an object of class 'GMLOperationParameter' or 'GMLOperationParameterGroup'") | ||
} | ||
return(self$addListElement("parameter", GMLElement$create("parameter", value = param))) | ||
}, | ||
|
||
#delParameter | ||
delParameter = function(param){ | ||
if(!inherits(param, "GMLAbstractGeneralOperationParameter")){ | ||
stop("The argument value should be an object of class 'GMLOperationParameter' or 'GMLOperationParameterGroup'") | ||
} | ||
return(self$delListElement("parameter", GMLElement$create("parameter", value = param))) | ||
} | ||
|
||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#' GMLOperationParameter | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO GML operation parameter | ||
#' @return Object of \code{\link{R6Class}} for modelling an GMLOperationParameter | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @section Inherited methods from \code{GMLAbstractGeneralOperationParameter} | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml, defaults, id)}}{ | ||
#' This method is used to instantiate a GML OperationParameter | ||
#' } | ||
#' } | ||
#' | ||
#' @references | ||
#' ISO 19136:2007 Geographic Information -- Geographic Markup Language. | ||
#' http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=32554 | ||
#' | ||
#' OGC Geography Markup Language. http://www.opengeospatial.org/standards/gml | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
GMLOperationParameter <- R6Class("GMLOperationParameter", | ||
inherit = GMLAbstractGeneralOperationParameter, | ||
private = list( | ||
xmlElement = "OperationParameter", | ||
xmlNamespacePrefix = "GML" | ||
), | ||
public = list() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#' GMLOperationParameterGroup | ||
#' | ||
#' @docType class | ||
#' @importFrom R6 R6Class | ||
#' @export | ||
#' @keywords ISO GML operation parameter group | ||
#' @return Object of \code{\link{R6Class}} for modelling an GMLOperationParameterGroup | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @field maximumOccurs | ||
#' @field parameter | ||
#' | ||
#' @section Inherited methods from \code{GMLAbstractGeneralOperationParameter} | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(xml, defaults, id)}}{ | ||
#' This method is used to instantiate a GML OperationParameterGroup | ||
#' } | ||
#' \item{\code{setMaximumOccurs(maximumOccurs)}}{ | ||
#' Sets the maximum occurs, object of class \code{integer} | ||
#' } | ||
#' \item{\code{addParameter(parameter)}}{ | ||
#' Adds a parameter or parameter group, object of class \code{GMLOperationParameter} | ||
#' or \code{GMLOperationParameterGroup} | ||
#' } | ||
#' \item{\code{delParameter(parameter)}}{ | ||
#' Deletes a parameter or parameter group, object of class \code{GMLOperationParameter} | ||
#' or \code{GMLOperationParameterGroupo} | ||
#' } | ||
#' } | ||
#' | ||
#' @references | ||
#' ISO 19136:2007 Geographic Information -- Geographic Markup Language. | ||
#' http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=32554 | ||
#' | ||
#' OGC Geography Markup Language. http://www.opengeospatial.org/standards/gml | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
GMLOperationParameterGroup <- R6Class("GMLOperationParameterGroup", | ||
inherit = GMLAbstractGeneralOperationParameter, | ||
private = list( | ||
xmlElement = "OperationParameterGroup", | ||
xmlNamespacePrefix = "GML" | ||
), | ||
public = list( | ||
|
||
#+ maximumOccurs [0..1]: integer | ||
maximumOccurs = NULL, | ||
#+ parameter [2..*]: GMLOperationParameter / GMLOperationParameterGroup | ||
parameter = list(), | ||
|
||
#setMaximumOccurs | ||
setMaximumOccurs = function(maximumOccurs){ | ||
if(!is(maximumOccurs, "integer")){ | ||
maximumOccurs <- as.integer(maximumOccurs) | ||
if(is.na(maximumOccurs)){ | ||
stop("The argument value should be an object of class 'integer'") | ||
} | ||
} | ||
self$maximumOccurs <- GMLElement$create("maximumOccurs", value = maximumOccurs) | ||
}, | ||
|
||
#addParameter | ||
addParameter = function(param){ | ||
if(!inherits(param, "GMLAbstractGeneralOperationParameter")){ | ||
stop("The argument value should be an object of class 'GMLOperationParameter' or 'GMLOperationParameterGroup'") | ||
} | ||
return(self$addListElement("parameter", GMLElement$create("parameter", value = param))) | ||
}, | ||
|
||
#delParameter | ||
delParameter = function(param){ | ||
if(!inherits(param, "GMLAbstractGeneralOperationParameter")){ | ||
stop("The argument value should be an object of class 'GMLOperationParameter' or 'GMLOperationParameterGroup'") | ||
} | ||
return(self$delListElement("parameter", GMLElement$create("parameter", value = param))) | ||
} | ||
|
||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
% Generated by roxygen2 (4.1.1): do not edit by hand | ||
% Please edit documentation in R/GMLAbstractGeneralOperationParameter.R | ||
\docType{class} | ||
\name{GMLAbstractGeneralOperationParameter} | ||
\alias{GMLAbstractGeneralOperationParameter} | ||
\title{GMLAbstractGeneralOperationParameter} | ||
\format{\code{\link{R6Class}} object.} | ||
\usage{ | ||
GMLAbstractGeneralOperationParameter | ||
} | ||
\value{ | ||
Object of \code{\link{R6Class}} for modelling an GMLAbstractGeneralOperationParameter | ||
} | ||
\description{ | ||
GMLAbstractGeneralOperationParameter | ||
} | ||
\section{Fields}{ | ||
|
||
\describe{ | ||
\item{\code{minimumOccurs}}{} | ||
}} | ||
\section{Inherited methods from \code{GMLDefinition}}{ | ||
|
||
} | ||
|
||
\section{Methods}{ | ||
|
||
\describe{ | ||
\item{\code{new(xml, defaults, id)}}{ | ||
This method is used to instantiate a GML AbstractGeneralOperationParameter | ||
} | ||
\item{\code{setMinimumOccurs(minimumOccurs)}}{ | ||
Sets the minimum occurs, object of class \code{integer} | ||
} | ||
} | ||
} | ||
\author{ | ||
Emmanuel Blondel <emmanuel.blondel1@gmail.com> | ||
} | ||
\references{ | ||
ISO 19136:2007 Geographic Information -- Geographic Markup Language. | ||
http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=32554 | ||
|
||
OGC Geography Markup Language. http://www.opengeospatial.org/standards/gml | ||
} | ||
\keyword{GML} | ||
\keyword{ISO} | ||
\keyword{abstract} | ||
\keyword{general} | ||
\keyword{operation} | ||
\keyword{parameter} | ||
|
Oops, something went wrong.