-
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
25 changed files
with
341 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: ows4R | ||
Version: 0.3-7 | ||
Date: 2023-11-04 | ||
Version: 0.4 | ||
Date: 2024-01-23 | ||
Title: Interface to OGC Web-Services (OWS) | ||
Authors@R: c(person("Emmanuel", "Blondel", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-5870-5762")), | ||
person("Alexandre", "Bennici", role = c("ctb"), comment = c(ORCID = "0000-0003-2160-3487")), | ||
|
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
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,62 @@ | ||
#' OWSException | ||
#' | ||
#' @docType class | ||
#' @export | ||
#' @keywords OGC exception | ||
#' @return Object of \code{\link{R6Class}} modelling a OWS Service exception | ||
#' @format \code{\link{R6Class}} object. | ||
#' | ||
#' @note Abstract class used by \pkg{ows4R} | ||
#' | ||
#' @author Emmanuel Blondel <emmanuel.blondel1@@gmail.com> | ||
#' | ||
OWSException <- R6Class("OWSException", | ||
inherit = OGCAbstractObject, | ||
private = list( | ||
capabilities = NULL, | ||
url = NA, | ||
version = NA, | ||
|
||
#fetchException | ||
fetchException = function(xmlObj, version){ | ||
children = xmlChildren(xmlObj) | ||
text = sapply(children[names(children)=="ExceptionText"], xmlValue)[[1]] | ||
exception = list(locator = xmlGetAttr(xmlObj, "locator"), code = xmlGetAttr(xmlObj, "exceptionCode"), text = text) | ||
return(exception) | ||
} | ||
|
||
), | ||
public = list( | ||
|
||
#'@field ExceptionText exception text | ||
ExceptionText = NULL, | ||
|
||
#'@description Initializes an object of class \link{OWSException} | ||
#'@param xmlObj object of class \link{XMLInternalNode-class} from \pkg{XML} | ||
#'@param logger logger | ||
initialize = function(xmlObj, logger = NULL){ | ||
super$initialize(logger = logger) | ||
exception = private$fetchException(xmlObj = xmlObj, version = version) | ||
self$ExceptionText = exception$text | ||
self$attrs = list(exceptionCode = exception$code, locator = exception$locator) | ||
}, | ||
|
||
#'@description Get exception locator | ||
#'@return the exception locator, object of class \code{character} | ||
getLocator = function(){ | ||
return(self$attrs$locator) | ||
}, | ||
|
||
#'@description Get exception code | ||
#'@return the exception code, object of class \code{character} | ||
getCode = function(){ | ||
return(self$attrs$code) | ||
}, | ||
|
||
#'@description Get exception text explanation | ||
#'@return the exception text, object of class \code{character} | ||
getText = function(){ | ||
return(self$ExceptionText) | ||
} | ||
) | ||
) |
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
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
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.