Learn R Programming

ows4R (version 0.1-1)

CSWClient: CSWClient

Description

CSWClient

Usage

CSWClient

Arguments

Value

Object of R6Class with methods for interfacing an OGC Catalogue Service for the Web.

Format

R6Class object.

Methods

new(url, serviceVersion, user, pwd, logger)

This method is used to instantiate a CSWClient with the url of the OGC service. Authentication (user/pwd) is not yet supported and will be added with the support of service transactional modes. By default, the logger argument will be set to NULL (no logger). This argument accepts two possible values: INFO: to print only ows4R logs, DEBUG: to print more verbose logs

getCapabilities()

Get service capabilities. Inherited from OWS Client

reloadCapabilities()

Reload service capabilities

describeRecord(namespace, ...)

Describe records. Retrieves the XML schema for CSW records. By default, returns the XML schema for the CSW records (http://www.opengis.net/cat/csw/2.0.2). For other schemas, specify the outputSchema required, e.g. http://www.isotc211.org/2005/gmd for ISO 19115/19139 schema

getRecordById(id, elementSetName, ...)

Get a record by Id. 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 outputSchema required, e.g. http://www.isotc211.org/2005/gmd for ISO 19115/19139 records. The parameter elementSetName should among values "full", "brief", "summary". The default "full" corresponds to the full metadata sheet returned. "brief" and "summary" will contain only a subset of the metadata content.

Examples

Run this code
# NOT RUN {
   #example based on CSW endpoint responding at http://localhost:8000/csw
   csw <- CSWClient$new("http://localhost:8000/csw", serviceVersion = "2.0.2")
   
   #get capabilities
   caps <- csw$getCapabilities()
   
   #get records
   records <- csw$getRecords()
   
   #get record by id
   record <- csw$getRecordById("my-metadata-id")
   
   #Advanced examples at https://github.com/eblondel/ows4R/wiki#csw
 
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab