GNOpenAPIManager
GNOpenAPIManager
Format
R6Class object.
Value
Object of R6Class with methods for communication with
the REST API of a GeoNetwork instance using the legacy API.
Note
From 2025-05-02, the INSPIRE metadata validation does not require anymore an API Key. Therefore, it is not
required to specify an geometa_inspireValidator. To send your metadata to INSPIRE, just set geometa_inspire
to TRUE.
From 2025-05-02, the INSPIRE metadata validation does not require anymore an API Key. Therefore, it is not
required to specify an geometa_inspireValidator. To send your metadata to INSPIRE, just set geometa_inspire
to TRUE.
From 2025-05-02, the INSPIRE metadata validation does not require anymore an API Key. Therefore, it is not
required to specify an geometa_inspireValidator. To send your metadata to INSPIRE, just set geometa_inspire
to TRUE.
Super class
geonapi::GNAbstractManager -> GNOpenAPIManager
Methods
Method new()
This method is used to instantiate a GNOpenAPIManager with the url of the
GeoNetwork and credentials to authenticate (user/pwd).
The keyring_backend can be set to use a different backend for storing
the Geonetwork password/token with keyring (Default value is 'env').
The logger can be either NULL, "INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs)
Usage
GNOpenAPIManager$new(
url,
user = NULL,
pwd = NULL,
version,
logger = NULL,
keyring_backend = "env"
)Method login()
This methods attempts a connection to GeoNetwork REST API. User internally
during initialization of GNLegacyAPIManager.
Method downloadMetadataByUUID()
Download a metadata by UUID.
Method getMetadataByUUID()
Get a metadata by UUID.
Usage
GNOpenAPIManager$getMetadataByUUID(
uuid,
addSchemaLocation = TRUE,
increasePopularity = TRUE,
approved = TRUE
)Method insertRecord()
Inserts a record by file, XML object or geometa object of class ISOMetadata or ISOFeatureCatalogue.
Extra parameters related to geometa objects: geometa_validate (TRUE by default) and geometa_inspire
(FALSE by default) can be used to perform ISO and INSPIRE validation respectively.
argument.
Usage
GNOpenAPIManager$insertRecord(
xml = NULL,
file = NULL,
geometa = NULL,
metadataType = "METADATA",
uuidProcessing = "NOTHING",
group,
category = NULL,
rejectIfInvalid = FALSE,
publishToAll = TRUE,
transformWith = "_none_",
schema = NULL,
extra = NULL,
geometa_validate = TRUE,
geometa_inspire = FALSE,
geometa_inspireValidator = NULL
)Arguments
xmlobject of class XMLInternalNode-class
filefile
geometageometa object of class ISOMetadata or ISOFeatureCatalogue
metadataTypemetadata type. By default
METADATAuuidProcessingUUID processing. By default
NOTHING. Other possible value:OVERWRITEgroupgroup
categorycategory
rejectIfInvalidreject if invalid. Default
FALSEpublishToAllpublish to all. Default
TRUEtransformWithtransform with. Default is
_none_schemaschema
extraextra
geometa_validatevalidate geometa object
geometa_inspirevalidate geometa object vs. INSPIRE
geometa_inspireValidatorgeometa INSPIRE validator to use. Deprecated, see below note.
Method insertMetadata()
Inserts a metadata by file, XML object or geometa object of class ISOMetadata or ISOFeatureCatalogue.
Extra parameters related to geometa objects: geometa_validate (TRUE by default) and geometa_inspire
(FALSE by default) can be used to perform ISO and INSPIRE validation respectively.
Usage
GNOpenAPIManager$insertMetadata(
xml = NULL,
file = NULL,
geometa = NULL,
metadataType = "METADATA",
uuidProcessing = "NOTHING",
group,
category = NULL,
rejectIfInvalid = FALSE,
publishToAll = TRUE,
transformWith = "_none_",
schema = NULL,
extra = NULL,
geometa_validate = TRUE,
geometa_inspire = FALSE,
geometa_inspireValidator = NULL
)Arguments
xmlobject of class XMLInternalNode-class
filefile
geometageometa object of class ISOMetadata or ISOFeatureCatalogue
metadataTypemetadata type. By default
METADATAuuidProcessingUUID processing. By default
NOTHING. Other possible value:OVERWRITEgroupgroup
categorycategory
rejectIfInvalidreject if invalid. Default
FALSEpublishToAllpublish to all. Default
TRUEtransformWithtransform with. Default is
_none_schemaschema
extraextra
geometa_validatevalidate geometa object
geometa_inspirevalidate geometa object vs. INSPIRE
geometa_inspireValidatorgeometa INSPIRE validator to use. Deprecated, see below note.
Method updateMetadata()
Inserts a metadata by file, XML object or geometa object of class ISOMetadata or ISOFeatureCatalogue.
Extra parameters related to geometa objects: geometa_validate (TRUE by default) and geometa_inspire
(FALSE by default) can be used to perform ISO and INSPIRE validation respectively.
Usage
GNOpenAPIManager$updateMetadata(
xml = NULL,
file = NULL,
geometa = NULL,
metadataType = "METADATA",
group,
category = NULL,
rejectIfInvalid = FALSE,
publishToAll = TRUE,
transformWith = "_none_",
schema = NULL,
extra = NULL,
geometa_validate = TRUE,
geometa_inspire = FALSE,
geometa_inspireValidator = NULL
)Arguments
xmlobject of class XMLInternalNode-class
filefile
geometageometa object of class ISOMetadata or ISOFeatureCatalogue
metadataTypemetadata type. By default
METADATAgroupgroup
categorycategory
rejectIfInvalidreject if invalid. Default
FALSEpublishToAllpublish to all. Default
TRUEtransformWithtransform with. Default is
_none_schemaschema
extraextra
geometa_validatevalidate geometa object
geometa_inspirevalidate geometa object vs. INSPIRE
geometa_inspireValidatorgeometa INSPIRE validator to use. Deprecated, see below note.
Method uploadAttachment()
Uploads attachment
Method deleteDOI()
Remove a DOI (this is not recommended, DOI are supposed to be persistent once created. This is mainly here for testing).