-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
332 additions
and
12 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
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,33 @@ | ||
#' OWSCodeType | ||
#' @docType class | ||
#' @export | ||
#' @keywords OWS CodeType | ||
#' @return Object of \code{\link{R6Class}} for modelling an OWS CodeType | ||
#' @format \code{\link{R6Class}} object. | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(expr)}}{ | ||
#' This method is used to instantiate an OWSCodeType object. The unique | ||
#' argument should be an object of class \code{character} | ||
#' } | ||
#' } | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
OWSCodeType <- R6Class("OWSCodeType", | ||
inherit = OGCAbstractObject, | ||
private = list( | ||
xmlElement = "Identifier", | ||
xmlNamespace = c(ows = "http://www.opengis.net/ows") | ||
), | ||
public = list( | ||
value = NULL, | ||
initialize = function(xml = NULL, serviceVersion = "1.1", value){ | ||
private$xmlNamespace <- paste0(private$xmlNamespace, "/", serviceVersion) | ||
names(private$xmlNamespace) <- "ows" | ||
if(is.null(xml)){ | ||
self$value <- value | ||
} | ||
} | ||
) | ||
) |
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,46 @@ | ||
#' WPSExecute | ||
#' | ||
#' @docType class | ||
#' @export | ||
#' @keywords OGC WPS Execute | ||
#' @return Object of \code{\link{R6Class}} for modelling a WPS Execute request | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(op, url, serviceVersion, identifier, logger, ...)}}{ | ||
#' This method is used to instantiate a WPSExecute object | ||
#' } | ||
#' } | ||
#' | ||
#' @note Abstract class used by \pkg{ows4R} to trigger a WPS Execute request | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
WPSExecute <- R6Class("WPSExecute", | ||
inherit = OWSHttpRequest, | ||
private = list( | ||
xmlElement = "Execute", | ||
xmlNamespace = c(wps = "http://www.opengis.net/wps") | ||
), | ||
public = list( | ||
Identifier = "", | ||
DataInputs = list(), | ||
initialize = function(op, url, serviceVersion, identifier, | ||
dataInputs = list(), logger = NULL, ...) { | ||
private$xmlNamespace = paste(private$xmlNamespace, serviceVersion, sep="/") | ||
names(private$xmlNamespace) <- "wps" | ||
namedParams <- list(service = "WPS", version = version, identifier = identifier) | ||
super$initialize(op, "POST", url, request = private$name, | ||
namedParams = namedParams, mimeType = "text/xml", logger = logger, | ||
...) | ||
self$Identifier <- OWSCodeType$new(value = identifier) | ||
dataInputNames <- names(dataInputs) | ||
self$DataInputs <- lapply(dataInputNames, function(dataInputName){ | ||
dataInput <- dataInputs[[dataInputName]] | ||
WPSInput$new(identifier = dataInputName, data = dataInput) | ||
}) | ||
#self$execute() | ||
} | ||
) | ||
) |
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,36 @@ | ||
#' WPSInput | ||
#' | ||
#' @docType class | ||
#' @export | ||
#' @keywords OGC WPS Input | ||
#' @return Object of \code{\link{R6Class}} for modelling a WPS Input | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(identifier, data)}}{ | ||
#' This method is used to instantiate a WPSInput object | ||
#' } | ||
#' } | ||
#' | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
WPSInput <- R6Class("WPSInput", | ||
inherit = OGCAbstractObject, | ||
private = list( | ||
xmlElement = "Input", | ||
xmlNamespace = c(wps = "http://www.opengis.net/wps") | ||
), | ||
public = list( | ||
Identifier = NULL, | ||
Data = NULL, | ||
initialize = function(identifier, data) { | ||
if(is(identifier, "character")){ | ||
identifier <- OWSCodeType$new(value = identifier) | ||
} | ||
self$Identifier <- identifier | ||
self$Data <- data | ||
} | ||
) | ||
) |
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,32 @@ | ||
#' WPSLiteralData | ||
#' | ||
#' @docType class | ||
#' @export | ||
#' @keywords OGC WPS LiteralData | ||
#' @return Object of \code{\link{R6Class}} for modelling a WPS Literal Data | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @section Methods: | ||
#' \describe{ | ||
#' \item{\code{new(identifier, data)}}{ | ||
#' This method is used to instantiate a WPSLiteralData object | ||
#' } | ||
#' } | ||
#' | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
WPSLiteralData <- R6Class("WPSLiteralData", | ||
inherit = OGCAbstractObject, | ||
private = list( | ||
xmlElement = "LiteralData", | ||
xmlNamespace = c(wps = "http://www.opengis.net/wps") | ||
), | ||
public = list( | ||
value = NULL, | ||
wrap = TRUE, | ||
initialize = function(value) { | ||
self$value <- value | ||
} | ||
) | ||
) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.