| GeoNodeManager {geonode4R} | R Documentation |
GeoNode REST API Manager
Description
GeoNode REST API Manager
GeoNode REST API Manager
Format
R6Class object.
Value
Object of R6Class with methods for communication with
the REST API of a GeoNode instance.
Public fields
verbose.infoif geonode4R logs have to be printed
verbose.debugif curl logs have to be printed
loggerTypethe type of logger
urlthe Base url of GeoNode
Methods
Public methods
Method logger()
Prints a log message
Usage
GeoNodeManager$logger(type, text)
Arguments
typetype of log, "INFO", "WARN", "ERROR"
texttext
Method INFO()
Prints an INFO log message
Usage
GeoNodeManager$INFO(text)
Arguments
texttext
Method WARN()
Prints an WARN log message
Usage
GeoNodeManager$WARN(text)
Arguments
texttext
Method ERROR()
Prints an ERROR log message
Usage
GeoNodeManager$ERROR(text)
Arguments
texttext
Method new()
This method is used to instantiate a GeoNodeManager with the url of the
GeoNode and credentials to authenticate (user/pwd).
By default, the logger argument will be set to NULL (no logger).
This argument accepts two possible values: INFO: to print only geosapi logs,
DEBUG: to print geosapi and CURL logs.
The keyring_backend can be set to use a different backend for storing
the GeoNode user password with keyring (Default value is 'env').
Usage
GeoNodeManager$new(url, user, pwd, logger = NULL, keyring_backend = "env")
Arguments
urlurl
useruser
pwdpwd
loggerlogger
keyring_backendkeyring backend. Default is 'env'
Method getUrl()
Get URL
Usage
GeoNodeManager$getUrl()
Returns
the Geoserver URL
Method connect()
Connects to geoServer
Usage
GeoNodeManager$connect()
Returns
TRUE if connected, raises an error otherwise
Method getExecutionStatus()
Get execution status
Usage
GeoNodeManager$getExecutionStatus(execution_id)
Arguments
execution_idthe execution id
Returns
the status of execution
Method getCategories()
Get categories
Usage
GeoNodeManager$getCategories(raw = FALSE)
Arguments
rawControls the output. Default will return an object of class data.frame.
Returns
an object of class list
Method getCategory()
Get category
Usage
GeoNodeManager$getCategory(id, raw = FALSE)
Arguments
idcategory id
rawControls the output. Default will return an object of class data.frame.
Returns
an object of class list
Method getResourceByUUID()
Get resource by UUID
Usage
GeoNodeManager$getResourceByUUID(uuid)
Arguments
uuidresource uuid (or semantic id if used in place of uuid)
Returns
an object of class list
Method getResourceByAlternate()
Get resource by Alternate
Usage
GeoNodeManager$getResourceByAlternate(alternate)
Arguments
alternateresource alternate
Returns
an object of class list
Method getResource()
Get resource
Usage
GeoNodeManager$getResource(id)
Arguments
idresource id
Returns
an object of class list
Method deleteResource()
Deletes a resource
Usage
GeoNodeManager$deleteResource(id)
Arguments
idresource (either a dataset or document) id
Returns
TRUE if deleted, FALSE otherwise
Method upload()
Uploads resource files
Usage
GeoNodeManager$upload(files)
Arguments
filesfiles
Returns
an object of class list giving the upload status
Method uploadMetadata()
Uploads ISO 19115 dataset metadata
Usage
GeoNodeManager$uploadMetadata(id, file)
Arguments
iddataset id
filea metadata XML file following ISO 19115 specification
Returns
an object
Method getDataset()
Get dataset standardized metadata
Usage
GeoNodeManager$getDataset(id)
Arguments
iddataset id
Returns
an object of class list
Method clone()
The objects of this class are cloneable with this method.
Usage
GeoNodeManager$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
Examples
## Not run:
GeoNodeManager$new("http://localhost:8080", "user", "password")
## End(Not run)