new(url, serviceVersion, user, pwd, token, headers, logger, ...)
This method is used to instantiate a CSWClient with the url
of the
OGC service. Authentication is supported using basic auth (using user
/pwd
arguments),
bearer token (using token
argument), or custom (using headers
argument). 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.
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.
getRecords(query, maxRecords, maxRecordsPerRequest)
Get records based on a query, object of class CSWQuery
. The maximum number of records can be
set either for the full query (maxRecords
) or per request (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 outputSchema
required, e.g. http://www.isotc211.org/2005/gmd for ISO 19115/19139 records.
transaction(type, record, recordProperty, constraint)
Generic transaction method. Used for inserting, updating or deleting metadata using the transactional CSW service.
The type
gives the type of transaction (Insert, Update, or Delete). The record
insertRecord(record, ...)
Inserts a new record
updateRecord(record, recordProperty, constraint, ...)
Updates an existing record
. It can be a partial update by specifying a recordProperty
.
A constraint (object of class CSWConstraint
) can be specified.
deleteRecord(record, constraint, ...)
Deletes an existing record
. A constraint (object of class CSWConstraint
) can be specified to limit
the deletion to some records.
deleteRecordById(record, ...)
Deletes an existing record by identifier (constraint used to identify the record based on its identifier).
harvestRecord(sourceUrl, resourceType)
Harvests a single record from a sourceUrl
, given a resourceType
(by default "http://www.isotc211.org/2005/gmd").
harvestNode(url, query, resourceType, sourceBaseUrl)
Harvests a CSW node (having its endpoint defined by an url
). A query
(object of class CSWQuery
) can be
specificed if needed to restrain the harvesting to a subset. The resourceType
defines the type of resources to be harvested
(by default "http://www.isotc211.org/2005/gmd")