Skip to content

Commit

Permalink
version 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel authored and cran-robot committed Jun 27, 2024
1 parent d2ae501 commit 335374e
Show file tree
Hide file tree
Showing 181 changed files with 1,523 additions and 870 deletions.
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: ows4R
Version: 0.3-6
Date: 2023-09-01
Version: 0.4
Date: 2024-06-26
Title: Interface to OGC Web-Services (OWS)
Authors@R: c(person("Emmanuel", "Blondel", role = c("aut", "cre"), email = "emmanuel.blondel1@gmail.com", comment = c(ORCID = "0000-0002-5870-5762")),
person("Alexandre", "Bennici", role = c("ctb"), comment = c(ORCID = "0000-0003-2160-3487")),
person("Norbert", "Billet", role = c("ctb")))
Maintainer: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
Depends: R (>= 3.3.0)
Imports: methods, R6, httr, openssl, keyring, XML (>= 3.96-1.1),
geometa (>= 0.7-1), sf, terra, parallel
geometa (>= 0.7-1), sf, terra, parallel, crayon
Suggests: testthat, knitr, markdown
Description: Provides an Interface to Web-Services defined as standards by the Open Geospatial Consortium (OGC), including Web Feature Service
(WFS) for vector data, Web Coverage Service (WCS), Catalogue Service (CSW) for ISO/OGC metadata, Web Processing Service (WPS) for data processes,
Expand All @@ -21,12 +21,12 @@ URL: https://github.com/eblondel/ows4R,
https://www.ogc.org/standards/
BugReports: https://github.com/eblondel/ows4R/issues
LazyLoad: yes
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2023-09-01 09:41:28 UTC; emman
Packaged: 2024-06-26 08:52:28 UTC; emman
Author: Emmanuel Blondel [aut, cre] (<https://orcid.org/0000-0002-5870-5762>),
Alexandre Bennici [ctb] (<https://orcid.org/0000-0003-2160-3487>),
Norbert Billet [ctb]
Repository: CRAN
Date/Publication: 2023-09-01 10:10:02 UTC
Date/Publication: 2024-06-26 09:50:02 UTC
358 changes: 180 additions & 178 deletions MD5

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export(OWSBoundingBox)
export(OWSCapabilities)
export(OWSClient)
export(OWSCodeType)
export(OWSException)
export(OWSGetCapabilities)
export(OWSHttpRequest)
export(OWSNamespace)
Expand Down Expand Up @@ -95,6 +96,7 @@ export(getOWSNamespaces)
export(registerOWSNamespace)
export(setOWSNamespaces)
import(XML)
import(crayon)
import(geometa)
import(httr)
import(keyring)
Expand Down
26 changes: 24 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
## [ows4R 0.3-6](https://github.com/eblondel/ows4R) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://github.com/eblondel/ows4R)
## [ows4R 0.4](https://github.com/eblondel/ows4R) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://github.com/eblondel/ows4R)

**Corrections**

- [#111](https://github.com/eblondel/ows4R/pull/111) WCSCoverageSummary - Fix download failure due to min/max handling
- [#112](https://github.com/eblondel/ows4R/issues/112) OWSHttpRequest GET doesn't detect existing params and make GetCapabilities fail
- [#113](https://github.com/eblondel/ows4R/issues/113) WCSGetCoverage- Fix vendor params handling
- [#119](https://github.com/eblondel/ows4R/issues/119) WCS Coverage descriptions - patch to rewrite CRS online resources to https
- [#120](https://github.com/eblondel/ows4R/issues/120) Service requests under CAS do not work anymore

**New features**

- [#116](https://github.com/eblondel/ows4R/issues/116) Support Service exceptions handling
- [#117](https://github.com/eblondel/ows4R/issues/117) Support pretty print of R6 objects

**Enhancements**

- [#122](https://github.com/eblondel/ows4R/issues/122) Service exceptions are not always handled in status code 400
- [#123](https://github.com/eblondel/ows4R/issues/123) Missing axis labels handling for WCS coverage envelope
- [#124](https://github.com/eblondel/ows4R/issues/124) Optimize WFS getFeatures depending on the outputFormat
- [#126](https://github.com/eblondel/ows4R/issues/126) Add skipXmlComments as internal arg for OWS http XML requests
- [#128](https://github.com/eblondel/ows4R/issues/128) Make feature validation as arg, and default to TRUE for backward compatibility

## [ows4R 0.3-6](https://github.com/eblondel/ows4R) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://github.com/eblondel/ows4R)

**Corrections**

Expand All @@ -9,7 +31,7 @@

- [#109](https://github.com/eblondel/ows4R/issues/109) Improve CSV support for WFS

## [ows4R 0.3-5](https://github.com/eblondel/ows4R) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://github.com/eblondel/ows4R)
## [ows4R 0.3-5](https://cran.r-project.org/src/contrib/Archive/ows4R/ows4R_0.3-5.tar.gz) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://cran.r-project.org/src/contrib/Archive/ows4R/ows4R_0.3-5.tar.gz)

**Enhancements**

Expand Down
4 changes: 2 additions & 2 deletions R/CASClient.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#' @docType class
#' @export
#' @keywords CAS Central Authentication Service
#' @return Object of \code{\link{R6Class}} with methods for interfacing a Central Authentication Service (CAS).
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} with methods for interfacing a Central Authentication Service (CAS).
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @note Class used internally by \pkg{ows4R}
#'
Expand Down
4 changes: 2 additions & 2 deletions R/CSWCapabilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#' @docType class
#' @export
#' @keywords OGC CSW Capabilities
#' @return Object of \code{\link{R6Class}} with methods for interfacing an OGC
#' @return Object of \code{\link[R6]{R6Class}} with methods for interfacing an OGC
#' Catalogue Service for the Web (CSW) Get Capabilities document.
#' @format \code{\link{R6Class}} object.
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @note Class used to read a \code{CSWCapabilities} document. The use of \code{CSWClient} is
#' recommended instead to benefit from the full set of capabilities associated to a CSW server.
Expand Down
41 changes: 39 additions & 2 deletions R/CSWClient.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#' @docType class
#' @export
#' @keywords OGC CSW catalogue service web
#' @return Object of \code{\link{R6Class}} with methods for interfacing an OGC
#' @return Object of \code{\link[R6]{R6Class}} with methods for interfacing an OGC
#' Catalogue Service for the Web.
#' @format \code{\link{R6Class}} object.
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -96,6 +96,12 @@ CSWClient <- R6Class("CSWClient",
user = self$getUser(), pwd = self$getPwd(), token = self$getToken(),
headers = self$getHeaders(), config = self$getConfig(),
namespace = namespace, logger = self$loggerType, ...)
#exception handling
if(request$hasException()){
return(request$getException())
}

#response handling
return(request$getResponse())
},

Expand Down Expand Up @@ -125,6 +131,12 @@ CSWClient <- R6Class("CSWClient",
headers = self$getHeaders(), config = self$getConfig(),
id = id, elementSetName = elementSetName,
logger = self$loggerType, ...)
#exception handling
if(request$hasException()){
return(request$getException())
}

#response handling
return(request$getResponse())
},

Expand Down Expand Up @@ -161,6 +173,12 @@ CSWClient <- R6Class("CSWClient",
headers = self$getHeaders(), config = self$getConfig(),
query = query, logger = self$loggerType,
maxRecords = maxRecordsPerRequest, ...)
#exception handling
if(firstRequest$hasException()){
return(firstRequest$getException())
}

#response handling
records <- firstRequest$getResponse()

numberOfRecordsMatched <- attr(records, "numberOfRecordsMatched")
Expand Down Expand Up @@ -190,6 +208,13 @@ CSWClient <- R6Class("CSWClient",
query = query, logger = self$loggerType,
startPosition = nextRecord,
maxRecords = maxRecordsPerRequest, ...)

#exception handling
if(nextRequest$hasException()){
return(nextRequest$getException())
}

#response handling
nextRecords <- nextRequest$getResponse()
records <- c(records, nextRecords)
if(length(records) == numberOfRecordsMatched) break
Expand Down Expand Up @@ -233,6 +258,12 @@ CSWClient <- R6Class("CSWClient",
record = record, recordProperty = recordProperty, constraint = constraint,
logger = self$loggerType, ...)

#exception handling
if(transaction$hasException()){
return(transaction$getException())
}

#response handling
summaryKey <- switch(type,
"Insert" = "Inserted",
"Update" = "Updated",
Expand Down Expand Up @@ -324,6 +355,12 @@ CSWClient <- R6Class("CSWClient",
source = sourceUrl, resourceType = resourceType, resourceFormat = "application/xml",
logger = self$loggerType)

#exception handling
if(harvest$hasException()){
return(harvest$getException())
}

#response handling
harvest$setResult(FALSE)
if(is.null(xmlNamespaces(harvest$getResponse())$csw)){
return(harvest)
Expand Down
4 changes: 2 additions & 2 deletions R/CSWConstraint.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#' @docType class
#' @export
#' @keywords OGC Filter
#' @return Object of \code{\link{R6Class}} for modelling an CSW Constraint
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling an CSW Constraint
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @examples
#' filter <- OGCFilter$new( PropertyIsEqualTo$new("apiso:Identifier", "12345") )
Expand Down
4 changes: 2 additions & 2 deletions R/CSWDescribeRecord.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#' @docType class
#' @export
#' @keywords OGC CSW DescribeRecord
#' @return Object of \code{\link{R6Class}} for modelling a CSW DescribeRecord request
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling a CSW DescribeRecord request
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @note Class used internally by \pkg{ows4R} to trigger a CSW DescribeRecord request
#'
Expand Down
4 changes: 2 additions & 2 deletions R/CSWGetRecordById.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#' @docType class
#' @export
#' @keywords OGC CSW GetRecordById
#' @return Object of \code{\link{R6Class}} for modelling a CSW GetRecordById request
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling a CSW GetRecordById request
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @note Class used internally by \pkg{ows4R} to trigger a CSW GetRecordById request
#'
Expand Down
4 changes: 2 additions & 2 deletions R/CSWGetRecords.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#' @docType class
#' @export
#' @keywords OGC CSW GetRecords
#' @return Object of \code{\link{R6Class}} for modelling a CSW GetRecords request
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling a CSW GetRecords request
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @note Class used internally by \pkg{ows4R} to trigger a CSW GetRecords request
#'
Expand Down
4 changes: 2 additions & 2 deletions R/CSWHarvest.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#' @docType class
#' @export
#' @keywords OGC CSW Harvest
#' @return Object of \code{\link{R6Class}} for modelling a CSW Harvest request
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling a CSW Harvest request
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @note Class used internally by \pkg{ows4R} to trigger a CSW Harvest request
#'
Expand Down
4 changes: 2 additions & 2 deletions R/CSWQuery.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#' @docType class
#' @export
#' @keywords OGC Query
#' @return Object of \code{\link{R6Class}} for modelling an CSW Query
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling an CSW Query
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @examples
#' #CSWQuery - elementSetName
Expand Down
4 changes: 2 additions & 2 deletions R/CSWRecordProperty.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#' @docType class
#' @export
#' @keywords CSW RecordProperty
#' @return Object of \code{\link{R6Class}} for modelling an CSW RecordProperty
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling an CSW RecordProperty
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @examples
#' rp <- CSWRecordProperty$new(name = "NAME", value = "VALUE")
Expand Down
4 changes: 2 additions & 2 deletions R/CSWTransaction.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#' @docType class
#' @export
#' @keywords OGC CSW Transaction
#' @return Object of \code{\link{R6Class}} for modelling a CSW Transaction request
#' @format \code{\link{R6Class}} object.
#' @return Object of \code{\link[R6]{R6Class}} for modelling a CSW Transaction request
#' @format \code{\link[R6]{R6Class}} object.
#'
#' @note Class used internally by \pkg{ows4R} to trigger a CSW Transaction request
#'
Expand Down
Loading

0 comments on commit 335374e

Please sign in to comment.