CSW_GetData: Retrieve data from CSW server

Description Usage Arguments Value Remarks Examples

Description

This function is the only function of the CSW package that actually retrieves data from the CSW Server. Most often this function will not be used directly by the user. For the various CSW operations dedicated functions are provided that generate a string with parameters that is passed to CSW_GetData. With the parameter verbose one can indicate that this generated string is printed in the console log. These parameters can then specified for this function (e.g. when an option would be needed that is not provided for by the dedicated functions). See example.

Usage

1
2
3
4
CSW_GetData(request = c("GetCapabilities", "GetRecords",
  "DescribeRecord", "GetDomain", "GetRecordById", "Transaction",
  "Harvest"), version = CSW_get_version(), baseurl = CSW_get_url(),
  verbose = c("N", "F", "Y"), ...)

Arguments

request

Character vector indicating the CSW operation that has to be performed. One of GetCapabilities, GetRecords, DescribeRecord, GetDomain, GetRecordById, Transaction, Harvest. Default GetCapabilities.

version

Character vector with CSW version. Default is 2.0.2 but this can be changed for the remainder of the session with CSW_set_version .

baseurl

Character vector with base url of the CSW server. Default is http://nationaalgeoregister.nl/geonetwork/srv/dut/csw? but this can be changed for the remainder of the session with CSW_set_url .

verbose

Character N, F or Y. When F the full generated and encoded url will be displayed, when Y the variable part of the url (without baseurl, service indication CSW and version) will be displayed in decoded form and when N (default) nothing of the generated url will be displayed.

...

Optionally one or more name=value arguments. See example exp2.

Value

An xml document with the requested information.

Remarks

CSW_GetData always returns an xml document where other functions sometimes try to reformat the information when requested. Using this function can help with debugging when there is a problem (e.g. with this formatting).

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# exp1 and exp2 request the same information from the server:
exp1 = CSW_DescribeRecord(typeName = 'gmd:MD_Metadata',
	namespace = 'gmd:http://www.isotc211.org/2005/gmd',verbose='N')
exp2 = CSW_GetData(request='DescribeRecord',
	namespace ='gmd:http://www.isotc211.org/2005/gmd',
	typeName ='gmd:MD_Metadata',verbose='N')

## End(Not run)

HanOostdijk/CSW documentation built on May 29, 2019, 1:39 p.m.