| GNLegacyAPIManager | R Documentation |
GNLegacyAPIManager
GNLegacyAPIManager
R6Class object.
Object of R6Class with methods for communication with
the REST API of a GeoNetwork instance using the legacy API.
geonapi::GNAbstractManager -> GNLegacyAPIManager
new()This method is used to instantiate a GNLegacyAPIManager 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)
GNLegacyAPIManager$new( url, user = NULL, pwd = NULL, version, logger = NULL, keyring_backend = "env" )
urlurl
useruser
pwdpwd
versionversion
loggerlogger
keyring_backendkeyring backend. Default is 'env'
login()#' This methods attempts a connection to GeoNetwork REST API. User internally
during initialization of GNLegacyAPIManager.
GNLegacyAPIManager$login(user, pwd)
useruser
pwdpwd
getGroups()Retrieves the list of user groups available in Geonetwork
GNLegacyAPIManager$getGroups()
an object of class data.frame
getCategories()Retrieves the list of categories available in Geonetwork
GNLegacyAPIManager$getCategories()
an object of class data.frame
insertMetadata()Inserts a metadata by file, XML object or geometa object of class
ISOMetadata or ISOFeatureCatalogue. If successful, returns the Geonetwork
metadata internal identifier (integer). Extra parameters geometa_validate (TRUE
by default) and geometa_inspire (FALSE by default) can be used with geometa objects
for perform ISO and INSPIRE validation respectively. In that case on object of class
geometa::INSPIREMetadataValidator, with a proper user API key, should be specified as
geometa_inspireValidator argument.
GNLegacyAPIManager$insertMetadata( xml = NULL, file = NULL, geometa = NULL, group, category = NULL, stylesheet = NULL, validate = FALSE, geometa_validate = TRUE, geometa_inspire = FALSE, geometa_inspireValidator = NULL )
xmlxml object of class XMLInternalNode-class
filefile
geometageometa, object of class ISOMetadata or ISOFeatureCatalogue
groupgroup
categorycategory
stylesheetstylesheet
validatevalidate
geometa_validatevalidate geometa object
geometa_inspirevalidate geometa object vs. INSPIRE
geometa_inspireValidatorgeometa INSPIRE validator to use
setPrivConfiguration()Set the privilege configuration for a metadata. 'id' is the metadata integer id. 'config' is an object of class "GNPrivConfiguration".
GNLegacyAPIManager$setPrivConfiguration(id, config)
idid
configconfig
get()Generic getter for metadata. Possible values for by are 'id', 'uuid'. Used internally only. The 'output' argument gives the type of output to return, with possible values "id", "metadata", "info".
GNLegacyAPIManager$get(id, by, output)
idid
byby
outputoutput
getMetadataByID()Get a metadata by Id
GNLegacyAPIManager$getMetadataByID(id)
idid
an object of class ISOMetadata (ISO 19115) or ISOFeatureCatalogue
(ISO 19110) (from geometa package)
getMetadataByUUID()Get a metadata by UUID
GNLegacyAPIManager$getMetadataByUUID(uuid)
uuiduuid
an object of class ISOMetadata (ISO 19115) or ISOFeatureCatalogue
(ISO 19110) (from geometa package)
getInfoByID()Get a metadata Info by Id.
GNLegacyAPIManager$getInfoByID(id)
idid
an XML document object
getInfoByUUID()Get a metadata Info by UUID
GNLegacyAPIManager$getInfoByUUID(uuid)
uuiduuid
an XML document object
updateMetadata()Updates a metadata by file, XML object or geometa object of class
'ISOMetadata' or 'ISOFeatureCatalogue'. Extra parameters geometa_validate (TRUE
by default) and geometa_inspire (FALSE by default) can be used with geometa objects
for perform ISO and INSPIRE validation respectively. In that case on object of class
geometa::INSPIREMetadataValidator, with a proper user API key, should be specified as
geometa_inspireValidator argument.
GNLegacyAPIManager$updateMetadata( id, xml = NULL, file = NULL, geometa = NULL, geometa_validate = TRUE, geometa_inspire = FALSE, geometa_inspireValidator = NULL )
idmetadata id
xmlxml object of class XMLInternalNode-class
filefile
geometageometa, object of class ISOMetadata or ISOFeatureCatalogue
geometa_validatevalidate geometa object
geometa_inspirevalidate geometa object vs. INSPIRE
geometa_inspireValidatorgeometa INSPIRE validator to use
deleteMetadata()Deletes metadata by Id.
GNLegacyAPIManager$deleteMetadata(id)
idid
the id of the record deleted, NULL otherwise
deleteMetadataAll()Deletes all metadata
GNLegacyAPIManager$deleteMetadataAll()
clone()The objects of this class are cloneable with this method.
GNLegacyAPIManager$clone(deep = FALSE)
deepWhether to make a deep clone.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
## Not run:
GNLegacyAPIManager$new("http://localhost:8080/geonetwork", "admin", "geonetwork", "3.0.0")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.