CSW_GetHits: Get the number of records that match a constraint

Description Usage Arguments Value Examples

View source: R/get_cat_data.R

Description

CSW_GetHits returns the number of records that satisfy a constraint. The default constraint language and its version are CQL_TEXT and 1.1.0 but can be overwritten by arguments of this function.

Usage

1
2
3
CSW_GetHits(constraint = "", constraintLanguage = "CQL_TEXT",
  constraint_language_version = "1.1.0", version = CSW_get_version(),
  baseurl = CSW_get_url(), verbose = c("N", "F", "Y"))

Arguments

constraint

Character vector with a constraint written with “ and constraint_language_version==1.1.0.

constraintLanguage

Character vector indicating in which language the constraint is written. Default CQL_TEXT.

constraint_language_version

Character vector indicating the version of the constraint language. Default 1.1.0.

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.

Value

An integer with the number of records that satisfy the constraint or an xml_document with the exception in case of an error

Examples

1
2
3
4
5
6
7
## Not run: 
# total number of records in collection :
  exp1 = CSW_GetHits()
# total number of records related to 'duin*' (dune*)
  exp2 = CSW_GetHits(constraint="AnyText LIKE 'duin%'" )

## End(Not run)

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