| GNAbstractManager {geonapi} | R Documentation |
GNAbstractManager
Description
GNAbstractManager
GNAbstractManager
Format
R6Class object.
Value
Object of R6Class with methods for communication with
the REST API of a GeoNetwork instance.
Public fields
verbose.infoIf package info log messages have to be printed out
verbose.debugIf curl debug log messages have to be printed out
loggerTypethe type of logger
urlthe Base url of GeoNetwork
versionthe version of GeoNetwork. Handled as
GNVersionobjectlangthe language for Geonetwork service. Default is
engbasicAuthif basic auth is performed
Methods
Public methods
Method logger()
Provides log messages
Usage
GNAbstractManager$logger(type, text)
Arguments
typetype of log ("INFO", "WARN", "ERROR")
textthe log message text
Method INFO()
Provides INFO log messages
Usage
GNAbstractManager$INFO(text)
Arguments
textthe log message text
Method WARN()
Provides WARN log messages
Usage
GNAbstractManager$WARN(text)
Arguments
textthe log message text
Method ERROR()
Provides ERROR log messages
Usage
GNAbstractManager$ERROR(text)
Arguments
textthe log message text
Method new()
This method is used to instantiate a GNAbstractManager with the url of the
GeoNetwork and credentials to authenticate (user/pwd). By default,
the logger argument will be set to NULL (no logger).
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
GNAbstractManager$new( url, user = NULL, pwd = NULL, version, logger = NULL, keyring_backend = "env" )
Arguments
urlurl
useruser
pwdpwd
versionversion
loggerlogger
keyring_backendkeyring backend. Default is 'env'
Method getUrl()
Get URL
Usage
GNAbstractManager$getUrl()
Returns
an object of class character
Method getLang()
Get service language
Usage
GNAbstractManager$getLang()
Returns
an object of class character
Method login()
Log-ins. This methods (here abstract) attempts a connection to GeoNetwork API. Used internally by subclasses of GNAbstractManager to login Geonetwork.
Usage
GNAbstractManager$login(user, pwd)
Arguments
useruser
pwdpwd
Method getClassName()
Get class name
Usage
GNAbstractManager$getClassName()
Returns
an object of class character
Method clone()
The objects of this class are cloneable with this method.
Usage
GNAbstractManager$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
Emmanuel Blondel <emmanuel.blondel1@gmail.com>