diff --git a/NAMESPACE b/NAMESPACE index 99f8a5c..1e4dd81 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -52,16 +52,19 @@ export(WMSGetFeatureInfo) export(WMSLayer) export(WPSCapabilities) export(WPSClient) +export(WPSComplexData) export(WPSComplexInputDescription) export(WPSComplexOutputDescription) export(WPSDescribeProcess) export(WPSDescriptionParameter) export(WPSExecute) +export(WPSExecuteResponse) export(WPSFormat) export(WPSInput) export(WPSInputDescription) export(WPSLiteralData) export(WPSLiteralInputDescription) +export(WPSOutput) export(WPSOutputDescription) export(WPSParameter) export(WPSProcess) diff --git a/R/CSWCapabilities.R b/R/CSWCapabilities.R index 803900b..efe4318 100644 --- a/R/CSWCapabilities.R +++ b/R/CSWCapabilities.R @@ -15,8 +15,8 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(url, version, logger)}}{ -#' This method is used to instantiate a WFSGetCapabilities object +#' \item{\code{new(url, version, client logger)}}{ +#' This method is used to instantiate a \code{CSWCapabilities} object #' } #' } #' diff --git a/R/CSWClient.R b/R/CSWClient.R index a11ec5c..6d8d4d3 100644 --- a/R/CSWClient.R +++ b/R/CSWClient.R @@ -26,7 +26,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(url, serviceVersion, user, pwd, token, logger)}}{ +#' \item{\code{new(url, serviceVersion, user, pwd, token, headers, logger, ...)}}{ #' This method is used to instantiate a CSWClient with the \code{url} of the #' OGC service. Authentication is supported using basic auth (using \code{user}/\code{pwd} arguments), #' bearer token (using \code{token} argument), or custom (using \code{headers} argument). By default, the \code{logger} @@ -34,7 +34,7 @@ #' values: \code{INFO}: to print only \pkg{ows4R} logs, \code{DEBUG}: to print more verbose logs #' } #' \item{\code{getCapabilities()}}{ -#' Get service capabilities. Inherited from OWS Client +#' Get service capabilities. #' } #' \item{\code{reloadCapabilities()}}{ #' Reload service capabilities @@ -52,6 +52,39 @@ #' "full" corresponds to the full metadata sheet returned. "brief" and "summary" will contain only #' a subset of the metadata content. #' } +#' \item{\code{getRecords(query, maxRecords, maxRecordsPerRequest)}}{ +#' Get records based on a query, object of class \code{CSWQuery}. The maximum number of records can be +#' set either for the full query (\code{maxRecords}) or per request (\code{maxRecordsPerRequest}, default set to 10 records) +#' considering this operation is paginated. By default, the record will be returned following the CSW schema +#' (http://www.opengis.net/cat/csw/2.0.2). For other schemas, specify the \code{outputSchema} +#' required, e.g. http://www.isotc211.org/2005/gmd for ISO 19115/19139 records. +#' } +#' \item{\code{transaction(type, record, recordProperty, constraint)}}{ +#' Generic transaction method. Used for inserting, updating or deleting metadata using the transactional CSW service. +#' The \code{type} gives the type of transaction (Insert, Update, or Delete). The record +#' } +#' \item{\code{insertRecord(record, ...)}}{ +#' Inserts a new record +#' } +#' \item{\code{updateRecord(record, recordProperty, constraint, ...)}}{ +#' Updates an existing \code{record}. It can be a partial update by specifying a \code{recordProperty}. +#' A constraint (object of class \code{CSWConstraint}) can be specified. +#' } +#' \item{\code(deleteRecord(record, constraint, ...))}{ +#' Deletes an existing \code{record}. A constraint (object of class \code{CSWConstraint}) can be specified to limit +#' the deletion to some records. +#' } +#' \item{\code{deleteRecordById(record, ...)}}{ +#' Deletes an existing record by identifier (constraint used to identify the record based on its identifier). +#' } +#' \item{\code{harvestRecord(sourceUrl, resourceType)}}{ +#' Harvests a single record from a \code{sourceUrl}, given a \code{resourceType} (by default "http://www.isotc211.org/2005/gmd"). +#' } +#' \item{\code{harvestNode(url, query, resourceType, sourceBaseUrl)}}{ +#' Harvests a CSW node (having its endpoint defined by an \code{url}). A \code{query} (object of class \code{CSWQuery}) can be +#' specificed if needed to restrain the harvesting to a subset. The \code{resourceType} defines the type of resources to be harvested +#' (by default "http://www.isotc211.org/2005/gmd") +#' } #' } #' #' @author Emmanuel Blondel @@ -99,7 +132,7 @@ CSWClient <- R6Class("CSWClient", self$ERROR(errorMsg) stop(errorMsg) } - request <- CSWDescribeRecord$new(op, self$getUrl(), self$getVersion(), + request <- CSWDescribeRecord$new(self$capabilities, op, self$getUrl(), self$getVersion(), user = self$getUser(), pwd = self$getPwd(), token = self$getToken(), headers = self$getHeaders(), namespace = namespace, logger = self$loggerType, ...) return(request$getResponse()) @@ -117,7 +150,7 @@ CSWClient <- R6Class("CSWClient", self$ERROR(errorMsg) stop(errorMsg) } - request <- CSWGetRecordById$new(op, self$getUrl(), self$getVersion(), + request <- CSWGetRecordById$new(self$capabilities, op, self$getUrl(), self$getVersion(), user = self$getUser(), pwd = self$getPwd(), token = self$getToken(), headers = self$getHeaders(), id = id, elementSetName = elementSetName, logger = self$loggerType, ...) @@ -141,7 +174,7 @@ CSWClient <- R6Class("CSWClient", hasMaxRecords <- !is.null(maxRecords) if(hasMaxRecords) if(maxRecords < maxRecordsPerRequest) maxRecordsPerRequest <- maxRecords - firstRequest <- CSWGetRecords$new(op, self$getUrl(), self$getVersion(), + firstRequest <- CSWGetRecords$new(self$capabilities, op, self$getUrl(), self$getVersion(), user = self$getUser(), pwd = self$getPwd(), token = self$getToken(), headers = self$getHeaders(), query = query, logger = self$loggerType, maxRecords = maxRecordsPerRequest, ...) @@ -168,7 +201,7 @@ CSWClient <- R6Class("CSWClient", maxRecordsPerRequest <- numberOfRecordsMatched - length(records) } } - nextRequest <- CSWGetRecords$new(op, self$getUrl(), self$getVersion(), + nextRequest <- CSWGetRecords$new(self$capabilities, op, self$getUrl(), self$getVersion(), user = self$getUser(), pwd = self$getPwd(), token = self$getToken(), headers = self$getHeaders(), query = query, logger = self$loggerType, startPosition = nextRecord, @@ -203,7 +236,7 @@ CSWClient <- R6Class("CSWClient", } } #transation - transaction <- CSWTransaction$new(op, cswt_url, self$getVersion(), type = type, + transaction <- CSWTransaction$new(self$capabilities, op, cswt_url, self$getVersion(), type = type, user = self$getUser(), pwd = self$getPwd(), token = self$getToken(), headers = self$getHeaders(), record = record, recordProperty = recordProperty, constraint = constraint, logger = self$loggerType, ...) @@ -275,7 +308,7 @@ CSWClient <- R6Class("CSWClient", stop(errorMsg) } self$INFO(sprintf("Harvesting '%s' ...", sourceUrl)) - harvest <- CSWHarvest$new(op, self$getUrl(), self$getVersion(), + harvest <- CSWHarvest$new(self$capabilities, op, self$getUrl(), self$getVersion(), source = sourceUrl, resourceType = resourceType, resourceFormat = "application/xml", logger = self$loggerType) diff --git a/R/CSWDescribeRecord.R b/R/CSWDescribeRecord.R index f919a7f..e115bf7 100644 --- a/R/CSWDescribeRecord.R +++ b/R/CSWDescribeRecord.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(url, version, namespace, ...)}}{ +#' \item{\code{new(capabilities, op, url, version, namespace, logger, ...)}}{ #' This method is used to instantiate a CSWDescribeRecord object #' } #' } @@ -24,7 +24,7 @@ CSWDescribeRecord <- R6Class("CSWDescribeRecord", defaultNamespace = "csw:http://www.opengis.net/cat/csw/2.0.2" ), public = list( - initialize = function(op, url, version, namespace = NULL, logger = NULL, ...) { + initialize = function(capabilities, op, url, version, namespace = NULL, logger = NULL, ...) { namedParams <- list(service = "CSW", version = version) #default output schema diff --git a/R/CSWGetRecordById.R b/R/CSWGetRecordById.R index d90d2ea..a19fd9e 100644 --- a/R/CSWGetRecordById.R +++ b/R/CSWGetRecordById.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, serviceVersion, user, pwd, token, id, elementSetName, logger, ...)}}{ +#' \item{\code{new(capabilities, op, url, serviceVersion, user, pwd, token, headers, id, elementSetName, logger, ...)}}{ #' This method is used to instantiate a CSWGetRecordById object #' } #' } @@ -31,8 +31,8 @@ CSWGetRecordById <- R6Class("CSWGetRecordById", public = list( Id = NA, ElementSetName = "full", - initialize = function(op, url, serviceVersion = "2.0.2", - user = NULL, pwd = NULL, token = NULL, + initialize = function(capabilities, op, url, serviceVersion = "2.0.2", + user = NULL, pwd = NULL, token = NULL, headers = headers, id, elementSetName = "full", logger = NULL, ...) { self$Id = id allowedElementSetNames <- c("full", "brief", "summary") @@ -42,7 +42,7 @@ CSWGetRecordById <- R6Class("CSWGetRecordById", } self$ElementSetName = elementSetName super$initialize(op, "POST", url, request = private$xmlElement, - user = user, pwd = pwd, token = token, + user = user, pwd = pwd, token = token, headers = headers, contentType = "text/xml", mimeType = "text/xml", logger = logger, ...) diff --git a/R/CSWGetRecords.R b/R/CSWGetRecords.R index cf2a3ae..8729e76 100644 --- a/R/CSWGetRecords.R +++ b/R/CSWGetRecords.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, serviceVersion, user, pwd, token, query, logger, ...)}}{ +#' \item{\code{new(capabilities, op, url, serviceVersion, user, pwd, token, headers, query, logger, ...)}}{ #' This method is used to instantiate a CSWGetRecords object #' } #' } @@ -34,11 +34,11 @@ CSWGetRecords <- R6Class("CSWGetRecords", ), public = list( Query = NULL, - initialize = function(op, url, serviceVersion = "2.0.2", - user = NULL, pwd = NULL, token = NULL, + initialize = function(capabilities, op, url, serviceVersion = "2.0.2", + user = NULL, pwd = NULL, token = NULL, headers = list(), query = NULL, logger = NULL, ...) { super$initialize(op, "POST", url, request = private$xmlElement, - user = user, pwd = pwd, token = token, + user = user, pwd = pwd, token = token, headers = headers, contentType = "text/xml", mimeType = "text/xml", logger = logger, ...) nsVersion <- ifelse(serviceVersion=="3.0.0", "3.0", serviceVersion) diff --git a/R/CSWHarvest.R b/R/CSWHarvest.R index ff5e2ae..28add43 100644 --- a/R/CSWHarvest.R +++ b/R/CSWHarvest.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, serviceVersion, user, pwd, source, resourceType, resourceFormat, logger, ...)}}{ +#' \item{\code{new(capabilities, op, url, serviceVersion, user, pwd, source, resourceType, resourceFormat, logger, ...)}}{ #' This method is used to instantiate a CSWHarvest object #' } #' } @@ -31,14 +31,14 @@ CSWHarvest <- R6Class("CSWHarvest", Source = NULL, ResourceType = "http://www.isotc211.org/2005/gmd", ResourceFormat = "application/xml", - initialize = function(op, url, serviceVersion = "2.0.2", - user = NULL, pwd = NULL, token = NULL, + initialize = function(capabilities, op, url, serviceVersion = "2.0.2", + user = NULL, pwd = NULL, token = NULL, headers = list(), source = NULL, resourceType = "http://www.isotc211.org/schemas/2005/gmd/", resourceFormat = "application/xml", logger = NULL, ...) { super$initialize(op, "POST", url, request = private$xmlElement, - user = user, pwd = pwd, token = token, + user = user, pwd = pwd, token = token, headers = headers, contentType = "text/xml", mimeType = "text/xml", logger = logger, ...) nsVersion <- ifelse(serviceVersion=="3.0.0", "3.0", serviceVersion) diff --git a/R/CSWQuery.R b/R/CSWQuery.R index f121f18..4aa0b10 100644 --- a/R/CSWQuery.R +++ b/R/CSWQuery.R @@ -6,8 +6,11 @@ #' @format \code{\link{R6Class}} object. #' @section Methods: #' \describe{ -#' \item{\code{new(filter, serviceVersion)}}{ -#' This method is used to instantiate an CSWQUery object. +#' \item{\code{new(elementSetName, constraint, typeNames, serviceVersion)}}{ +#' This method is used to instantiate an CSWQUery object. The \code{elementSetName} can be +#' either "full" (default), "brief" or "summary". A constraint \code{CSWConstraint} can be +#' defined for the query. The \code{typeNames} indicates to query (default "csw:Record"). +#' The \code{serviceVersion} gives the CSW service version (default "2.0.2") #' } #' } #' diff --git a/R/CSWRecordProperty.R b/R/CSWRecordProperty.R index c281506..5d3e053 100644 --- a/R/CSWRecordProperty.R +++ b/R/CSWRecordProperty.R @@ -6,7 +6,7 @@ #' @format \code{\link{R6Class}} object. #' @section Methods: #' \describe{ -#' \item{\code{new(name, value)}}{ +#' \item{\code{new(name, value, cswVersion)}}{ #' This method is used to instantiate an CSWRecordProperty object. #' } #' } diff --git a/R/CSWTransaction.R b/R/CSWTransaction.R index 557d84f..9a57773 100644 --- a/R/CSWTransaction.R +++ b/R/CSWTransaction.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, serviceVersion, type, user, pwd, token, headers, +#' \item{\code{new(capabilities, op, url, serviceVersion, type, user, pwd, token, headers, #' record, recordProperty, constraint, logger, ...)}}{ #' This method is used to instantiate a CSWTransaction object #' } @@ -26,7 +26,7 @@ CSWTransaction <- R6Class("CSWTransaction", xmlNamespace = c(csw = "http://www.opengis.net/cat/csw") ), public = list( - initialize = function(op, url, serviceVersion, type, + initialize = function(capabilities, op, url, serviceVersion, type, user = NULL, pwd = NULL, token = NULL, headers = list(), record = NULL, recordProperty = NULL, constraint = NULL, logger = NULL, ...) { diff --git a/R/OGCAbstractObject.R b/R/OGCAbstractObject.R index 3e3ace2..829983e 100644 --- a/R/OGCAbstractObject.R +++ b/R/OGCAbstractObject.R @@ -6,9 +6,18 @@ #' @format \code{\link{R6Class}} object. #' @section Methods: #' \describe{ -#' \item{\code{new()}}{ +#' \item{\code{new(attrs, defaults = list(), wrap, logger)}}{ #' This method is used to instantiate an OGCAbstractObject #' } +#' \item{\code{getClassName()}}{ +#' Get class name +#' } +#' \item{\code{getClass()}}{ +#' Get class +#' } +#' \item{\code{encode(addNS, geometa_validate, geometa_inspire)}}{ +#' Encode as XML +#' } #' } #' @note abstract class used by \pkg{ows4R} #' diff --git a/R/OGCExpression.R b/R/OGCExpression.R index 0c1b78b..eaf7610 100644 --- a/R/OGCExpression.R +++ b/R/OGCExpression.R @@ -6,8 +6,14 @@ #' @format \code{\link{R6Class}} object. #' @section Methods: #' \describe{ -#' \item{\code{new()}}{ -#' This method is used to instantiate an OGCExpression object +#' \item{\code{new(attrs, defaults, exprVersion)}}{ +#' This method is used to instantiate an \code{OGCExpression} object +#' } +#' \item{\code{setExprVersion(exprVersion)}}{ +#' Set expression version +#' } +#' \item{\code{getExprVersion()}}{ +#' Get expression version #' } #' } #' diff --git a/R/OGCFilter.R b/R/OGCFilter.R index c94dcf4..c005145 100644 --- a/R/OGCFilter.R +++ b/R/OGCFilter.R @@ -6,10 +6,13 @@ #' @format \code{\link{R6Class}} object. #' @section Methods: #' \describe{ -#' \item{\code{new(expr)}}{ +#' \item{\code{new(exprn filterVersion)}}{ #' This method is used to instantiate an OGCFilter object. The unique #' argument should be an object of class \code{\link{OGCExpression}} #' } +#' \item{\code{setFilterVersion(filterVersion)}}{ +#' Set filter version +#' } #' } #' #' @examples diff --git a/R/OWSCapabilities.R b/R/OWSCapabilities.R index 43d33ab..ff00878 100644 --- a/R/OWSCapabilities.R +++ b/R/OWSCapabilities.R @@ -64,8 +64,7 @@ OWSCapabilities <- R6Class("OWSCapabilities", private$owsVersion <- owsVersion private$serviceVersion <- serviceVersion namedParams <- list(service = service, version = serviceVersion) - private$request <- OWSGetCapabilities$new(op = NULL, url, service, serviceVersion, - logger = logger, ...) + private$request <- OWSGetCapabilities$new(url, service, serviceVersion, logger = logger, ...) xmlObj <- private$request$getResponse() private$serviceIdentification <- OWSServiceIdentification$new(xmlObj, owsVersion, serviceVersion) private$serviceProvider <- OWSServiceProvider$new(xmlObj, owsVersion, serviceVersion) diff --git a/R/OWSGetCapabilities.R b/R/OWSGetCapabilities.R index e6be91a..26f9759 100644 --- a/R/OWSGetCapabilities.R +++ b/R/OWSGetCapabilities.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, service, version, ...)}}{ +#' \item{\code{new(capabilities, op, url, service, version, ...)}}{ #' This method is used to instantiate a OWSGetCapabilities object #' } #' } @@ -23,9 +23,9 @@ OWSGetCapabilities <- R6Class("OWSGetCapabilities", name = "GetCapabilities" ), public = list( - initialize = function(op, url, service, version, ...) { + initialize = function(url, service, version, ...) { namedParams <- list(service = service, version = version) - super$initialize(op, "GET", url, request = private$name, + super$initialize(capabilities = NULL, op = NULL, "GET", url, request = private$name, namedParams = namedParams, mimeType = "text/xml", ...) self$execute() } diff --git a/R/OWSHttpRequest.R b/R/OWSHttpRequest.R index e054a3e..72ce0c0 100644 --- a/R/OWSHttpRequest.R +++ b/R/OWSHttpRequest.R @@ -8,9 +8,12 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, type, url, request, user, pwd, namedParams, attrs, +#' \item{\code{new(capabilities, op, type, url, request, user, pwd, namedParams, attrs, #' contentType, mimeType, logger)}}{ -#' This method is used to instantiate a object for doing an OWS request +#' This method is used to instantiate a object for doing an OWS HTTP request +#' } +#' \item{\code{getCapabilities()}}{ +#' Get the capabilities #' } #' \item{\code{getRequest()}}{ #' Get the request payload @@ -42,6 +45,7 @@ OWSHttpRequest <- R6Class("OWSHttpRequest", private = list( xmlElement = NULL, xmlNamespace = c(ows = "http://www.opengis.net/ows"), + capabilities = NULL, url = NA, type = NA, request = NA, @@ -114,11 +118,11 @@ OWSHttpRequest <- R6Class("OWSHttpRequest", ) #headers - headers <- list("Accept" = "application/xml", "Content-Type" = contentType, unlist(private$headers)) + headers <- c(private$headers, "Accept" = "application/xml", "Content-Type" = contentType) if(!is.null(private$token)){ headers <- c(headers, "Authorization" = paste(private$auth_scheme, private$token)) } - + print(headers) #send request if(self$verbose.debug){ r <- with_verbose(httr::POST( @@ -154,12 +158,13 @@ OWSHttpRequest <- R6Class("OWSHttpRequest", #public methods public = list( #initialize - initialize = function(op, type, url, request, + initialize = function(capabilities, op, type, url, request, user = NULL, pwd = NULL, token = NULL, headers = c(), namedParams = NULL, attrs = NULL, contentType = "text/xml", mimeType = "text/xml", logger = NULL, ...) { super$initialize(logger = logger) + private$capabilities = capabilities private$type = type private$url = url private$request = request @@ -237,6 +242,11 @@ OWSHttpRequest <- R6Class("OWSHttpRequest", } }, + #getCapabilities + getCapabilities = function(){ + return(private$capabilities) + }, + #getRequest getRequest = function(){ return(private$request) diff --git a/R/WFSCapabilities.R b/R/WFSCapabilities.R index 0bd23f7..5b56c0b 100644 --- a/R/WFSCapabilities.R +++ b/R/WFSCapabilities.R @@ -15,7 +15,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(url, version)}}{ +#' \item{\code{new(url, version, logger)}}{ #' This method is used to instantiate a WFSGetCapabilities object #' } #' \item{\code{getFeatureTypes(pretty)}}{ diff --git a/R/WFSDescribeFeatureType.R b/R/WFSDescribeFeatureType.R index 22516b4..b8b5b7d 100644 --- a/R/WFSDescribeFeatureType.R +++ b/R/WFSDescribeFeatureType.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, version, typeName, logger, ...)}}{ +#' \item{\code{new(capabilities, op, url, version, typeName, logger, ...)}}{ #' This method is used to instantiate a WFSDescribeFeatureType object #' } #' } @@ -23,7 +23,7 @@ WFSDescribeFeatureType <- R6Class("WFSDescribeFeatureType", name = "DescribeFeatureType" ), public = list( - initialize = function(op, url, version, typeName, logger = NULL, ...) { + initialize = function(capabilities, op, url, version, typeName, logger = NULL, ...) { namedParams <- list(service = "WFS", version = version, typeName = typeName) super$initialize(op, "GET", url, request = private$name, namedParams = namedParams, mimeType = "text/xml", logger = logger, diff --git a/R/WFSFeatureType.R b/R/WFSFeatureType.R index 96d758b..ac42a97 100644 --- a/R/WFSFeatureType.R +++ b/R/WFSFeatureType.R @@ -203,7 +203,7 @@ WFSFeatureType <- R6Class("WFSFeatureType", } } client = private$capabilities$getClient() - ftDescription <- WFSDescribeFeatureType$new(op = op, private$url, private$version, private$name, + ftDescription <- WFSDescribeFeatureType$new(private$capabilities, op = op, private$url, private$version, private$name, user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(), logger = self$loggerType) xmlObj <- ftDescription$getResponse() @@ -285,7 +285,7 @@ WFSFeatureType <- R6Class("WFSFeatureType", } } client = private$capabilities$getClient() - ftFeatures <- WFSGetFeature$new(op = op, private$url, private$version, private$name, outputFormat = outputFormat, + ftFeatures <- WFSGetFeature$new(private$capabilities, op = op, private$url, private$version, private$name, outputFormat = outputFormat, user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(), logger = self$loggerType, ...) obj <- ftFeatures$getResponse() diff --git a/R/WFSGetFeature.R b/R/WFSGetFeature.R index 2e19b6d..19496f7 100644 --- a/R/WFSGetFeature.R +++ b/R/WFSGetFeature.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, version, typeName, outputFormat, logger, ...)}}{ +#' \item{\code{new(capabilities, op, url, version, typeName, outputFormat, logger, ...)}}{ #' This method is used to instantiate a WFSGetFeature object #' } #' } @@ -23,7 +23,7 @@ WFSGetFeature <- R6Class("WFSGetFeature", name = "GetFeature" ), public = list( - initialize = function(op, url, version, typeName, outputFormat = NULL, logger = NULL, ...) { + initialize = function(capabilities, op, url, version, typeName, outputFormat = NULL, logger = NULL, ...) { if(is.null(outputFormat)){ mimeType <- "text/xml" diff --git a/R/WMSGetFeatureInfo.R b/R/WMSGetFeatureInfo.R index 45b4c31..b9ec87d 100644 --- a/R/WMSGetFeatureInfo.R +++ b/R/WMSGetFeatureInfo.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, version, layers, srs, styles, feature_count, +#' \item{\code{new(capabilities, op, url, version, layers, srs, styles, feature_count, #' x, y, width, height, bbox, info_format, logger, ...)}}{ #' This method is used to instantiate a WMSGetFeatureInfo object #' } @@ -24,7 +24,7 @@ WMSGetFeatureInfo <- R6Class("WMSGetFeatureInfo", name = "GetFeatureInfo" ), public = list( - initialize = function(op, url, version, layers, srs, styles, feature_count = 1, + initialize = function(capabilities, op, url, version, layers, srs, styles, feature_count = 1, x, y, width, height, bbox, info_format = "text/xml", logger = NULL, ...) { diff --git a/R/WMSLayer.R b/R/WMSLayer.R index 966675a..e81385a 100644 --- a/R/WMSLayer.R +++ b/R/WMSLayer.R @@ -277,6 +277,7 @@ WMSLayer <- R6Class("WMSLayer", client = private$capabilities$getClient() ftFeatures <- WMSGetFeatureInfo$new( + private$capabilities, op = op, url = private$url, version = private$version, layers = private$name, srs = srs, styles = styles, feature_count = feature_count, diff --git a/R/WPSClient.R b/R/WPSClient.R index 72eac38..462ffc9 100644 --- a/R/WPSClient.R +++ b/R/WPSClient.R @@ -97,7 +97,7 @@ WPSClient <- R6Class("WPSClient", }, #execute - execute = function(identifier, request, dataInputs, responseForm, language){ + execute = function(identifier, dataInputs = list(), responseForm = NULL, language = NULL){ processes <- self$getProcesses() processes <- processes[sapply(processes, function(process){process$getIdentifier() == identifier})] if(length(processes)==0){ @@ -106,7 +106,7 @@ WPSClient <- R6Class("WPSClient", stop(errMsg) } process <- processes[[1]] - return(process$execute(dataInputs, request, responseForm, language)) + return(process$execute(dataInputs, responseForm, language = language)) } ) diff --git a/R/WPSComplexData.R b/R/WPSComplexData.R new file mode 100644 index 0000000..1f308ab --- /dev/null +++ b/R/WPSComplexData.R @@ -0,0 +1,61 @@ +#' WPSComplexData +#' +#' @docType class +#' @export +#' @keywords OGC WPS ComplexData +#' @return Object of \code{\link{R6Class}} for modelling a WPS Complex Data +#' @format \code{\link{R6Class}} object. +#' +#' @section Methods: +#' \describe{ +#' \item{\code{new(xmlObj, value, schema, mimeType)}}{ +#' This method is used to instantiate a \code{WPSComplexData} object +#' } +#' \item{\code{decode(xmlObj)}}{ +#' Decodes from XML +#' } +#' \item{\code{getFeatures()}}{ +#' Returns features associates with output, if the output si made of a GML feature collection +#' } +#' } +#' +#' +#' @author Emmanuel Blondel +#' +WPSComplexData <- R6Class("WPSComplexData", + inherit = OGCAbstractObject, + private = list( + xmlElement = "ComplexData", + xmlNamespace = c(wps = "http://www.opengis.net/wps"), + features = NULL + ), + public = list( + value = NULL, + wrap = TRUE, + initialize = function(xmlObj = NULL, value = NULL, schema = NULL, mimeType = NULL) { + if(is.null(xmlObj)){ + self$value <- value + self$attrs$schema <- schema + self$attrs$mimeType <- mimeType + }else{ + self$decode(xmlObj) + } + }, + #decode + decode = function(xmlObj){ + self$value <- as(xmlChildren(xmlObj)[[1]], "character") + self$attrs <- as.list(xmlAttrs(xmlObj)) + if(!is.null(self$attrs$mimeType)) if(regexpr("gml", self$attrs$mimeType)>0){ + tmp <- tempfile(fileext = "gml") + write(self$value, file = tmp) + private$features = sf::st_read(tmp, quiet = TRUE) + unlink(tmp) + } + }, + + #getFeatures + getFeatures = function(){ + return(private$features) + } + ) +) \ No newline at end of file diff --git a/R/WPSDescribeProcess.R b/R/WPSDescribeProcess.R index 00e1221..37a25be 100644 --- a/R/WPSDescribeProcess.R +++ b/R/WPSDescribeProcess.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, version, identifier, logger, ...)}}{ +#' \item{\code{new(capabilities, op, url, version, identifier, logger, ...)}}{ #' This method is used to instantiate a WPSDescribeProcess object #' } #' } @@ -23,9 +23,9 @@ WPSDescribeProcess <- R6Class("WPSDescribeProcess", name = "DescribeProcess" ), public = list( - initialize = function(op, url, version, identifier, logger = NULL, ...) { + initialize = function(capabilities, op, url, version, identifier, logger = NULL, ...) { namedParams <- list(service = "WPS", version = version, identifier = identifier) - super$initialize(op, "GET", url, request = private$name, + super$initialize(capabilities, op, "GET", url, request = private$name, namedParams = namedParams, mimeType = "text/xml", logger = logger, ...) self$execute() diff --git a/R/WPSExecute.R b/R/WPSExecute.R index bd87c92..90e6c75 100644 --- a/R/WPSExecute.R +++ b/R/WPSExecute.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(op, url, serviceVersion, identifier, logger, ...)}}{ +#' \item{\code{new(capabilities, op, url, serviceVersion, identifier, logger, ...)}}{ #' This method is used to instantiate a WPSExecute object #' } #' } @@ -26,21 +26,22 @@ WPSExecute <- R6Class("WPSExecute", public = list( Identifier = "", DataInputs = list(), - initialize = function(op, url, serviceVersion, identifier, + initialize = function(capabilities, 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 <- list(service = "WPS", version = serviceVersion) + super$initialize(capabilities, op, "POST", sprintf("%s?service=WPS", url), request = private$name, namedParams = namedParams, mimeType = "text/xml", logger = logger, ...) + self$attrs <- namedParams 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() + self$execute() } ) ) \ No newline at end of file diff --git a/R/WPSExecuteResponse.R b/R/WPSExecuteResponse.R new file mode 100644 index 0000000..13bc254 --- /dev/null +++ b/R/WPSExecuteResponse.R @@ -0,0 +1,74 @@ +#' WPSExecuteResponse +#' +#' @docType class +#' @export +#' @keywords OGC WPS ExecuteResponse +#' @return Object of \code{\link{R6Class}} for modelling a WPS Execute response +#' @format \code{\link{R6Class}} object. +#' +#' @section Methods: +#' \describe{ +#' \item{\code{new(xmlObj)}}{ +#' This method is used to instantiate a WPSExecuteResponse object +#' } +#' \item{\code{getProcess()}}{ +#' Get the process +#' } +#' \item{\code{getStatus()}}{ +#' Get the status +#' } +#' \item{\code{getProcessOutputs()}}{ +#' Get the process output(s) +#' } +#' } +#' +#' +#' @author Emmanuel Blondel +#' +WPSExecuteResponse <- R6Class("WPSExecuteResponse", + inherit = OGCAbstractObject, + private = list( + xmlElement = "ExecuteResponse", + xmlNamespace = c(wps = "http://www.opengis.net/wps"), + xmlObj = NULL + ), + public = list( + process = NULL, + status = NULL, + processOutputs = list(), + initialize = function(xmlObj, capabilities, logger = NULL) { + private$xmlObj = xmlObj + self$decode(xmlObj, capabilities = capabilities, logger = logger) + }, + + getProcess = function(){ + return(self$process) + }, + + getStatus = function(){ + return(self$status) + }, + + getProcessOutputs = function(){ + return(self$processOutputs) + }, + + #decode + decode = function(xmlObj, capabilities, logger){ + children <- xmlChildren(xmlChildren(xmlObj)[[1]]) + self$process <- WPSProcess$new(xmlObj = children$Process, capabilities = capabilities, version = xmlGetAttr(xmlChildren(xmlObj)[[1]], "version"), logger = logger) + #self$status <- WPSStatus$new(xmlObj = children$Status) + if("ProcessOutputs" %in% names(children)){ + children <- xmlChildren(children$ProcessOutputs) + outputsXML <- children[names(children) == "Output"] + self$processOutputs <- lapply(outputsXML, function(x){WPSOutput$new(xmlObj = x)}) + names(self$processOutputs) <- NULL + } + }, + + # + xml = function(){ + return(private$xmlObj) + } + ) +) \ No newline at end of file diff --git a/R/WPSLiteralData.R b/R/WPSLiteralData.R index 1877419..c817dff 100644 --- a/R/WPSLiteralData.R +++ b/R/WPSLiteralData.R @@ -8,7 +8,7 @@ #' #' @section Methods: #' \describe{ -#' \item{\code{new(identifier, data)}}{ +#' \item{\code{new(xmlObj, value)}}{ #' This method is used to instantiate a WPSLiteralData object #' } #' } @@ -25,8 +25,34 @@ WPSLiteralData <- R6Class("WPSLiteralData", public = list( value = NULL, wrap = TRUE, - initialize = function(value) { - self$value <- value + initialize = function(xmlObj = NULL, value = NULL) { + if(is.null(xmlObj)){ + self$attrs$dataType <- switch(class(value), + "character" = "xs:string", + "numeric" = "xs:double", + "integer" = "xs:integer", + "logical" = "xs:boolean", + "xs:string" + ) + self$value <- value + if(is.logical(value)) self$value <- tolower(as.character(value)) + }else{ + self$decode(xmlObj) + } + }, + + #decode + decode = function(xmlObj){ + dataType <- xmlGetAttr(xmlObj, "dataType") + self$attrs$dataType <- dataType + value <- xmlValue(Obj) + self$value <- switch(dataType, + "xs:string" = value, + "xs:numeric" = as.numeric(value), + "xs:integer" = as.integer(value), + "xs:boolean" = as.logical(value), + value + ) } ) ) \ No newline at end of file diff --git a/R/WPSLiteralInputDescription.R b/R/WPSLiteralInputDescription.R index 88e4dc0..71bf59c 100644 --- a/R/WPSLiteralInputDescription.R +++ b/R/WPSLiteralInputDescription.R @@ -43,7 +43,7 @@ WPSLiteralInputDescription <- R6Class("WPSLiteralInputDescription", literalInput <- list( dataType = xmlGetAttr(children$DataType, "ows:reference"), defaultValue = xmlValue(children$DefaultValue), - allowedValues = sapply(xmlChildren(children$AllowedValues), xmlValue) + allowedValues = if("AllowedValues" %in% names(children)) sapply(xmlChildren(children$AllowedValues), xmlValue) else NA ) return(literalInput) diff --git a/R/WPSOutput.R b/R/WPSOutput.R new file mode 100644 index 0000000..b3f0903 --- /dev/null +++ b/R/WPSOutput.R @@ -0,0 +1,63 @@ +#' WPSOutput +#' +#' @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 WPSOutput object +#' } +#' } +#' +#' +#' @author Emmanuel Blondel +#' +WPSOutput <- R6Class("WPSOutput", + inherit = OGCAbstractObject, + private = list( + xmlElement = "Output", + xmlNamespace = c(wps = "http://www.opengis.net/wps") + ), + public = list( + Identifier = NULL, + Title = NULL, + Data = NULL, + initialize = function(xmlObj = NULL, identifier = NULL, title = NULL, data = NULL) { + if(is.null(xmlObj)){ + if(is(identifier, "character")){ + identifier <- OWSCodeType$new(value = identifier) + } + self$Identifier <- identifier + if(is(title, "character")){ + title <- OWSCodeType$new(value = title) + } + self$Title <- title + self$Data <- data + }else{ + self$decode(xmlObj) + } + }, + + #decode + decode = function(xmlObj){ + children <- xmlChildren(xmlObj) + self$Identifier <- if(!is.null(children$Identifier)) xmlValue(children$Identifier) else NA + self$Title <- if(!is.null(children$Title)) xmlValue(children$Title) else NA + if(!is.null(children$Data)){ + data_children <- xmlChildren(children$Data) + if(length(data_children)>0){ + data_xml <- data_children[[1]] + self$Data <- switch(xmlName(data_xml), + "LiteralData" = WPSLiteralData$new(xmlObj = data_xml), + "ComplexData" = WPSComplexData$new(xmlObj = data_xml), + NULL + ) + } + } + } + ) +) \ No newline at end of file diff --git a/R/WPSProcess.R b/R/WPSProcess.R index b2402e9..256553d 100644 --- a/R/WPSProcess.R +++ b/R/WPSProcess.R @@ -66,7 +66,7 @@ WPSProcess <- R6Class("WPSProcess", ), public = list( - initialize = function(xmlObj, capabilities, version, logger = NULL, ...){ + initialize = function(xmlObj, capabilities = NULL, version, logger = NULL, ...){ super$initialize(logger = logger) private$capabilities = capabilities @@ -107,7 +107,7 @@ WPSProcess <- R6Class("WPSProcess", } } client = private$capabilities$getClient() - processDescription <- WPSDescribeProcess$new(op = op, private$url, private$version, private$identifier, + processDescription <- WPSDescribeProcess$new(capabilities = private$capabilities, op = op, private$url, private$version, private$identifier, user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(), logger = self$loggerType) xmlObj <- processDescription$getResponse() @@ -117,7 +117,7 @@ WPSProcess <- R6Class("WPSProcess", }, #execute - execute = function(dataInputs, responseForm, language){ + execute = function(dataInputs = list(), responseForm = NULL, language = NULL){ op <- NULL operations <- private$capabilities$getOperationsMetadata()$getOperations() if(length(operations)>0){ @@ -130,12 +130,14 @@ WPSProcess <- R6Class("WPSProcess", } client = private$capabilities$getClient() - processExecute <- WPSExecute$new(op = op, private$url, private$version, private$identifier, + print(client$getHeaders()) + processExecute <- WPSExecute$new(capabilities = private$capabilities, op = op, private$url, private$version, private$identifier, dataInputs = dataInputs, responseForm = responseForm, language = language, user = client$getUser(), pwd = client$getPwd(), token = client$getToken(), headers = client$getHeaders(), logger = self$loggerType) xmlObj <- processExecute$getResponse() - return(xmlObj) + resp <- WPSExecuteResponse$new(xmlObj = xmlObj, capabilities = private$capabilities, logger = self$loggerType) + return(resp) } ) ) \ No newline at end of file diff --git a/R/ows4R.R b/R/ows4R.R index a6427b2..688ba4e 100644 --- a/R/ows4R.R +++ b/R/ows4R.R @@ -16,7 +16,7 @@ #' Type: \tab Package\cr #' Version #' : \tab 0.2\cr -#' Date: \tab 2021-06-30\cr +#' Date: \tab 2021-07-090\cr #' License: \tab MIT\cr #' LazyLoad: \tab yes\cr #' } diff --git a/man/CSWCapabilities.Rd b/man/CSWCapabilities.Rd index 8e3ad13..e72b11d 100644 --- a/man/CSWCapabilities.Rd +++ b/man/CSWCapabilities.Rd @@ -21,8 +21,8 @@ recommended instead to benefit from the full set of capabilities associated to a \section{Methods}{ \describe{ - \item{\code{new(url, version, logger)}}{ - This method is used to instantiate a WFSGetCapabilities object + \item{\code{new(url, version, client logger)}}{ + This method is used to instantiate a \code{CSWCapabilities} object } } } diff --git a/man/CSWClient.Rd b/man/CSWClient.Rd index 75ab7ca..ea2bff8 100644 --- a/man/CSWClient.Rd +++ b/man/CSWClient.Rd @@ -17,7 +17,7 @@ CSWClient \section{Methods}{ \describe{ - \item{\code{new(url, serviceVersion, user, pwd, token, logger)}}{ + \item{\code{new(url, serviceVersion, user, pwd, token, headers, logger, ...)}}{ This method is used to instantiate a CSWClient with the \code{url} of the OGC service. Authentication is supported using basic auth (using \code{user}/\code{pwd} arguments), bearer token (using \code{token} argument), or custom (using \code{headers} argument). By default, the \code{logger} @@ -25,7 +25,7 @@ CSWClient values: \code{INFO}: to print only \pkg{ows4R} logs, \code{DEBUG}: to print more verbose logs } \item{\code{getCapabilities()}}{ - Get service capabilities. Inherited from OWS Client + Get service capabilities. } \item{\code{reloadCapabilities()}}{ Reload service capabilities @@ -43,6 +43,39 @@ CSWClient "full" corresponds to the full metadata sheet returned. "brief" and "summary" will contain only a subset of the metadata content. } + \item{\code{getRecords(query, maxRecords, maxRecordsPerRequest)}}{ + Get records based on a query, object of class \code{CSWQuery}. The maximum number of records can be + set either for the full query (\code{maxRecords}) or per request (\code{maxRecordsPerRequest}, default set to 10 records) + considering this operation is paginated. By default, the record will be returned following the CSW schema + (http://www.opengis.net/cat/csw/2.0.2). For other schemas, specify the \code{outputSchema} + required, e.g. http://www.isotc211.org/2005/gmd for ISO 19115/19139 records. + } + \item{\code{transaction(type, record, recordProperty, constraint)}}{ + Generic transaction method. Used for inserting, updating or deleting metadata using the transactional CSW service. + The \code{type} gives the type of transaction (Insert, Update, or Delete). The record + } + \item{\code{insertRecord(record, ...)}}{ + Inserts a new record + } + \item{\code{updateRecord(record, recordProperty, constraint, ...)}}{ + Updates an existing \code{record}. It can be a partial update by specifying a \code{recordProperty}. + A constraint (object of class \code{CSWConstraint}) can be specified. + } + \item{\code(deleteRecord(record, constraint, ...))}{ + Deletes an existing \code{record}. A constraint (object of class \code{CSWConstraint}) can be specified to limit + the deletion to some records. + } + \item{\code{deleteRecordById(record, ...)}}{ + Deletes an existing record by identifier (constraint used to identify the record based on its identifier). + } + \item{\code{harvestRecord(sourceUrl, resourceType)}}{ + Harvests a single record from a \code{sourceUrl}, given a \code{resourceType} (by default "http://www.isotc211.org/2005/gmd"). + } + \item{\code{harvestNode(url, query, resourceType, sourceBaseUrl)}}{ + Harvests a CSW node (having its endpoint defined by an \code{url}). A \code{query} (object of class \code{CSWQuery}) can be + specificed if needed to restrain the harvesting to a subset. The \code{resourceType} defines the type of resources to be harvested + (by default "http://www.isotc211.org/2005/gmd") + } } } diff --git a/man/CSWDescribeRecord.Rd b/man/CSWDescribeRecord.Rd index 854f422..0e335fa 100644 --- a/man/CSWDescribeRecord.Rd +++ b/man/CSWDescribeRecord.Rd @@ -19,7 +19,7 @@ Class used internally by \pkg{ows4R} to trigger a CSW DescribeRecord request \section{Methods}{ \describe{ - \item{\code{new(url, version, namespace, ...)}}{ + \item{\code{new(capabilities, op, url, version, namespace, logger, ...)}}{ This method is used to instantiate a CSWDescribeRecord object } } diff --git a/man/CSWGetRecordById.Rd b/man/CSWGetRecordById.Rd index 89be8a6..718912e 100644 --- a/man/CSWGetRecordById.Rd +++ b/man/CSWGetRecordById.Rd @@ -19,7 +19,7 @@ Class used internally by \pkg{ows4R} to trigger a CSW GetRecordById request \section{Methods}{ \describe{ - \item{\code{new(op, url, serviceVersion, user, pwd, token, id, elementSetName, logger, ...)}}{ + \item{\code{new(capabilities, op, url, serviceVersion, user, pwd, token, headers, id, elementSetName, logger, ...)}}{ This method is used to instantiate a CSWGetRecordById object } } diff --git a/man/CSWGetRecords.Rd b/man/CSWGetRecords.Rd index b370a98..26d9b6e 100644 --- a/man/CSWGetRecords.Rd +++ b/man/CSWGetRecords.Rd @@ -19,7 +19,7 @@ Class used internally by \pkg{ows4R} to trigger a CSW GetRecords request \section{Methods}{ \describe{ - \item{\code{new(op, url, serviceVersion, user, pwd, token, query, logger, ...)}}{ + \item{\code{new(capabilities, op, url, serviceVersion, user, pwd, token, headers, query, logger, ...)}}{ This method is used to instantiate a CSWGetRecords object } } diff --git a/man/CSWHarvest.Rd b/man/CSWHarvest.Rd index e92833d..ec685fc 100644 --- a/man/CSWHarvest.Rd +++ b/man/CSWHarvest.Rd @@ -19,7 +19,7 @@ Class used internally by \pkg{ows4R} to trigger a CSW Harvest request \section{Methods}{ \describe{ - \item{\code{new(op, url, serviceVersion, user, pwd, source, resourceType, resourceFormat, logger, ...)}}{ + \item{\code{new(capabilities, op, url, serviceVersion, user, pwd, source, resourceType, resourceFormat, logger, ...)}}{ This method is used to instantiate a CSWHarvest object } } diff --git a/man/CSWQuery.Rd b/man/CSWQuery.Rd index caa52df..e543406 100644 --- a/man/CSWQuery.Rd +++ b/man/CSWQuery.Rd @@ -16,8 +16,11 @@ CSWQuery \section{Methods}{ \describe{ - \item{\code{new(filter, serviceVersion)}}{ - This method is used to instantiate an CSWQUery object. + \item{\code{new(elementSetName, constraint, typeNames, serviceVersion)}}{ + This method is used to instantiate an CSWQUery object. The \code{elementSetName} can be + either "full" (default), "brief" or "summary". A constraint \code{CSWConstraint} can be + defined for the query. The \code{typeNames} indicates to query (default "csw:Record"). + The \code{serviceVersion} gives the CSW service version (default "2.0.2") } } } diff --git a/man/CSWRecordProperty.Rd b/man/CSWRecordProperty.Rd index 3ed86e0..7a83726 100644 --- a/man/CSWRecordProperty.Rd +++ b/man/CSWRecordProperty.Rd @@ -16,7 +16,7 @@ CSWRecordProperty \section{Methods}{ \describe{ - \item{\code{new(name, value)}}{ + \item{\code{new(name, value, cswVersion)}}{ This method is used to instantiate an CSWRecordProperty object. } } diff --git a/man/CSWTransaction.Rd b/man/CSWTransaction.Rd index edc3ee1..3ec951d 100644 --- a/man/CSWTransaction.Rd +++ b/man/CSWTransaction.Rd @@ -19,7 +19,7 @@ Class used internally by \pkg{ows4R} to trigger a CSW Transaction request \section{Methods}{ \describe{ - \item{\code{new(op, url, serviceVersion, type, user, pwd, token, headers, + \item{\code{new(capabilities, op, url, serviceVersion, type, user, pwd, token, headers, record, recordProperty, constraint, logger, ...)}}{ This method is used to instantiate a CSWTransaction object } diff --git a/man/OGCAbstractObject.Rd b/man/OGCAbstractObject.Rd index df11ca0..c798066 100644 --- a/man/OGCAbstractObject.Rd +++ b/man/OGCAbstractObject.Rd @@ -19,9 +19,18 @@ abstract class used by \pkg{ows4R} \section{Methods}{ \describe{ - \item{\code{new()}}{ + \item{\code{new(attrs, defaults = list(), wrap, logger)}}{ This method is used to instantiate an OGCAbstractObject } + \item{\code{getClassName()}}{ + Get class name + } + \item{\code{getClass()}}{ + Get class + } + \item{\code{encode(addNS, geometa_validate, geometa_inspire)}}{ + Encode as XML + } } } diff --git a/man/OGCExpression.Rd b/man/OGCExpression.Rd index 62c3d81..57fcfd0 100644 --- a/man/OGCExpression.Rd +++ b/man/OGCExpression.Rd @@ -19,8 +19,14 @@ abstract class \section{Methods}{ \describe{ - \item{\code{new()}}{ - This method is used to instantiate an OGCExpression object + \item{\code{new(attrs, defaults, exprVersion)}}{ + This method is used to instantiate an \code{OGCExpression} object + } + \item{\code{setExprVersion(exprVersion)}}{ + Set expression version + } + \item{\code{getExprVersion()}}{ + Get expression version } } } diff --git a/man/OGCFilter.Rd b/man/OGCFilter.Rd index 6c4ada1..9526089 100644 --- a/man/OGCFilter.Rd +++ b/man/OGCFilter.Rd @@ -16,10 +16,13 @@ OGCFilter \section{Methods}{ \describe{ - \item{\code{new(expr)}}{ + \item{\code{new(exprn filterVersion)}}{ This method is used to instantiate an OGCFilter object. The unique argument should be an object of class \code{\link{OGCExpression}} } + \item{\code{setFilterVersion(filterVersion)}}{ + Set filter version + } } } diff --git a/man/OWSGetCapabilities.Rd b/man/OWSGetCapabilities.Rd index dc62872..943539a 100644 --- a/man/OWSGetCapabilities.Rd +++ b/man/OWSGetCapabilities.Rd @@ -19,7 +19,7 @@ Abstract class used internally by \pkg{ows4R} \section{Methods}{ \describe{ - \item{\code{new(op, url, service, version, ...)}}{ + \item{\code{new(capabilities, op, url, service, version, ...)}}{ This method is used to instantiate a OWSGetCapabilities object } } diff --git a/man/OWSHttpRequest.Rd b/man/OWSHttpRequest.Rd index c25fa90..5263e84 100644 --- a/man/OWSHttpRequest.Rd +++ b/man/OWSHttpRequest.Rd @@ -19,9 +19,12 @@ Abstract class used internally by \pkg{ows4R} \section{Methods}{ \describe{ - \item{\code{new(op, type, url, request, user, pwd, namedParams, attrs, + \item{\code{new(capabilities, op, type, url, request, user, pwd, namedParams, attrs, contentType, mimeType, logger)}}{ - This method is used to instantiate a object for doing an OWS request + This method is used to instantiate a object for doing an OWS HTTP request + } + \item{\code{getCapabilities()}}{ + Get the capabilities } \item{\code{getRequest()}}{ Get the request payload diff --git a/man/WFSCapabilities.Rd b/man/WFSCapabilities.Rd index 418ab15..e547b07 100644 --- a/man/WFSCapabilities.Rd +++ b/man/WFSCapabilities.Rd @@ -21,7 +21,7 @@ recommended instead to benefit from the full set of capabilities associated to a \section{Methods}{ \describe{ - \item{\code{new(url, version)}}{ + \item{\code{new(url, version, logger)}}{ This method is used to instantiate a WFSGetCapabilities object } \item{\code{getFeatureTypes(pretty)}}{ diff --git a/man/WFSDescribeFeatureType.Rd b/man/WFSDescribeFeatureType.Rd index c02a5e1..55bb643 100644 --- a/man/WFSDescribeFeatureType.Rd +++ b/man/WFSDescribeFeatureType.Rd @@ -19,7 +19,7 @@ Abstract class used by \pkg{ows4R} to trigger a WFS DescribeFeatureType request \section{Methods}{ \describe{ - \item{\code{new(op, url, version, typeName, logger, ...)}}{ + \item{\code{new(capabilities, op, url, version, typeName, logger, ...)}}{ This method is used to instantiate a WFSDescribeFeatureType object } } diff --git a/man/WFSGetFeature.Rd b/man/WFSGetFeature.Rd index cc0282f..0d67d02 100644 --- a/man/WFSGetFeature.Rd +++ b/man/WFSGetFeature.Rd @@ -19,7 +19,7 @@ Abstract class used by \pkg{ows4R} to trigger a WFS DescribeFeatureType request \section{Methods}{ \describe{ - \item{\code{new(op, url, version, typeName, outputFormat, logger, ...)}}{ + \item{\code{new(capabilities, op, url, version, typeName, outputFormat, logger, ...)}}{ This method is used to instantiate a WFSGetFeature object } } diff --git a/man/WMSGetFeatureInfo.Rd b/man/WMSGetFeatureInfo.Rd index faf11b6..832f561 100644 --- a/man/WMSGetFeatureInfo.Rd +++ b/man/WMSGetFeatureInfo.Rd @@ -19,7 +19,7 @@ Abstract class used by \pkg{ows4R} to trigger a WMS GetFeatureInfo request \section{Methods}{ \describe{ - \item{\code{new(op, url, version, layers, srs, styles, feature_count, + \item{\code{new(capabilities, op, url, version, layers, srs, styles, feature_count, x, y, width, height, bbox, info_format, logger, ...)}}{ This method is used to instantiate a WMSGetFeatureInfo object } diff --git a/man/WPSComplexData.Rd b/man/WPSComplexData.Rd new file mode 100644 index 0000000..6363707 --- /dev/null +++ b/man/WPSComplexData.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/WPSComplexData.R +\docType{class} +\name{WPSComplexData} +\alias{WPSComplexData} +\title{WPSComplexData} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling a WPS Complex Data +} +\description{ +WPSComplexData +} +\section{Methods}{ + +\describe{ + \item{\code{new(xmlObj, value, schema, mimeType)}}{ + This method is used to instantiate a \code{WPSComplexData} object + } + \item{\code{decode(xmlObj)}}{ + Decodes from XML + } + \item{\code{getFeatures()}}{ + Returns features associates with output, if the output si made of a GML feature collection + } +} +} + +\author{ +Emmanuel Blondel +} +\keyword{ComplexData} +\keyword{OGC} +\keyword{WPS} diff --git a/man/WPSDescribeProcess.Rd b/man/WPSDescribeProcess.Rd index 83f2940..c50892f 100644 --- a/man/WPSDescribeProcess.Rd +++ b/man/WPSDescribeProcess.Rd @@ -19,7 +19,7 @@ Abstract class used by \pkg{ows4R} to trigger a WPS DescribeProcess request \section{Methods}{ \describe{ - \item{\code{new(op, url, version, identifier, logger, ...)}}{ + \item{\code{new(capabilities, op, url, version, identifier, logger, ...)}}{ This method is used to instantiate a WPSDescribeProcess object } } diff --git a/man/WPSExecute.Rd b/man/WPSExecute.Rd index eb770de..893ebc5 100644 --- a/man/WPSExecute.Rd +++ b/man/WPSExecute.Rd @@ -19,7 +19,7 @@ Abstract class used by \pkg{ows4R} to trigger a WPS Execute request \section{Methods}{ \describe{ - \item{\code{new(op, url, serviceVersion, identifier, logger, ...)}}{ + \item{\code{new(capabilities, op, url, serviceVersion, identifier, logger, ...)}}{ This method is used to instantiate a WPSExecute object } } diff --git a/man/WPSExecuteResponse.Rd b/man/WPSExecuteResponse.Rd new file mode 100644 index 0000000..442631a --- /dev/null +++ b/man/WPSExecuteResponse.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/WPSExecuteResponse.R +\docType{class} +\name{WPSExecuteResponse} +\alias{WPSExecuteResponse} +\title{WPSExecuteResponse} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling a WPS Execute response +} +\description{ +WPSExecuteResponse +} +\section{Methods}{ + +\describe{ + \item{\code{new(xmlObj)}}{ + This method is used to instantiate a WPSExecuteResponse object + } + \item{\code{getProcess()}}{ + Get the process + } + \item{\code{getStatus()}}{ + Get the status + } + \item{\code{getProcessOutputs()}}{ + Get the process output(s) + } +} +} + +\author{ +Emmanuel Blondel +} +\keyword{ExecuteResponse} +\keyword{OGC} +\keyword{WPS} diff --git a/man/WPSLiteralData.Rd b/man/WPSLiteralData.Rd index a385efd..6929692 100644 --- a/man/WPSLiteralData.Rd +++ b/man/WPSLiteralData.Rd @@ -16,7 +16,7 @@ WPSLiteralData \section{Methods}{ \describe{ - \item{\code{new(identifier, data)}}{ + \item{\code{new(xmlObj, value)}}{ This method is used to instantiate a WPSLiteralData object } } diff --git a/man/WPSOutput.Rd b/man/WPSOutput.Rd new file mode 100644 index 0000000..126d692 --- /dev/null +++ b/man/WPSOutput.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/WPSOutput.R +\docType{class} +\name{WPSOutput} +\alias{WPSOutput} +\title{WPSOutput} +\format{ +\code{\link{R6Class}} object. +} +\value{ +Object of \code{\link{R6Class}} for modelling a WPS Input +} +\description{ +WPSOutput +} +\section{Methods}{ + +\describe{ + \item{\code{new(identifier, data)}}{ + This method is used to instantiate a WPSOutput object + } +} +} + +\author{ +Emmanuel Blondel +} +\keyword{Input} +\keyword{OGC} +\keyword{WPS} diff --git a/man/ows4R.Rd b/man/ows4R.Rd index 4bda1b2..22f0eb2 100644 --- a/man/ows4R.Rd +++ b/man/ows4R.Rd @@ -17,7 +17,7 @@ additional OGC service standards such as Web Coverage Service (WCS), Web Coverag Type: \tab Package\cr Version : \tab 0.2\cr - Date: \tab 2021-06-30\cr + Date: \tab 2021-07-090\cr License: \tab MIT\cr LazyLoad: \tab yes\cr }