| Title: | Interface to 'GeoNode' REST API |
|---|---|
| Description: | Provides an interface to the 'GeoNode' API, allowing to upload and publish metadata and data in 'GeoNode'. For more information about the 'GeoNode' API, see <https://geonode.org/>. |
| Authors: | Emmanuel Blondel [aut, cre] (ORCID: <https://orcid.org/0000-0002-5870-5762>) |
| Maintainer: | Emmanuel Blondel <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1-2 |
| Built: | 2026-05-13 09:44:22 UTC |
| Source: | https://github.com/eblondel/geonode4r |
GeoNode REST API Manager
GeoNode REST API Manager
R6Class object.
Object of R6Class with methods for communication with
the REST API of a GeoNode instance.
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
logger()
Prints a log message
GeoNodeManager$logger(type, text)
typetype of log, "INFO", "WARN", "ERROR"
texttext
INFO()
Prints an INFO log message
GeoNodeManager$INFO(text)
texttext
WARN()
Prints an WARN log message
GeoNodeManager$WARN(text)
texttext
ERROR()
Prints an ERROR log message
GeoNodeManager$ERROR(text)
texttext
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').
GeoNodeManager$new(url, user, pwd, logger = NULL, keyring_backend = "env")
urlurl
useruser
pwdpwd
loggerlogger
keyring_backendkeyring backend. Default is 'env'
getUrl()
Get URL
GeoNodeManager$getUrl()
the Geoserver URL
connect()
Connects to geoServer
GeoNodeManager$connect()
TRUE if connected, raises an error otherwise
getExecutionStatus()
Get execution status
GeoNodeManager$getExecutionStatus(execution_id)
execution_idthe execution id
the status of execution
getCategories()
Get categories
GeoNodeManager$getCategories(raw = FALSE)
rawControls the output. Default will return an object of class data.frame.
an object of class list
getCategory()
Get category
GeoNodeManager$getCategory(id, raw = FALSE)
idcategory id
rawControls the output. Default will return an object of class data.frame.
an object of class list
getResourceByUUID()
Get resource by UUID
GeoNodeManager$getResourceByUUID(uuid)
uuidresource uuid (or semantic id if used in place of uuid)
an object of class list
getResourceByAlternate()
Get resource by Alternate
GeoNodeManager$getResourceByAlternate(alternate)
alternateresource alternate
an object of class list
getResource()
Get resource
GeoNodeManager$getResource(id)
idresource id
an object of class list
deleteResource()
Deletes a resource
GeoNodeManager$deleteResource(id)
idresource (either a dataset or document) id
TRUE if deleted, FALSE otherwise
upload()
Uploads resource files
GeoNodeManager$upload(files)
filesfiles
an object of class list giving the upload status
uploadMetadata()
Uploads ISO 19115 dataset metadata
GeoNodeManager$uploadMetadata(id, file)
iddataset id
filea metadata XML file following ISO 19115 specification
an object
getDataset()
Get dataset standardized metadata
GeoNodeManager$getDataset(id)
iddataset id
an object of class list
clone()
The objects of this class are cloneable with this method.
GeoNodeManager$clone(deep = FALSE)
deepWhether to make a deep clone.
Emmanuel Blondel <[email protected]>
## Not run: GeoNodeManager$new("http://localhost:8080", "user", "password") ## End(Not run)## Not run: GeoNodeManager$new("http://localhost:8080", "user", "password") ## End(Not run)
GeoNode REST API Manager Utils
GeoNode REST API Manager Utils
R6Class object.
Object of R6Class with static util methods for communication
with the REST API of a GeoNode instance.
getUserAgent()This method is used to get the user agent for performing GeoNode API requests. Here the user agent will be compound by geonode4R package name and version.
getUserToken(user, pwd)This method is used to get the user authentication token for performing GeoNode API requests. Token is given a Base64 encoded string.
GET(url, user, pwd, path, verbose)This method performs a GET request for a given path to GeoNode REST API
PUT(url, user, pwd, path, filename, contentType, verbose)This method performs a PUT request for a given path to GeoNode REST API,
to upload a file of name filename with given contentType
POST(url, user, pwd, path, content, contentType, verbose)This method performs a POST request for a given path to GeoNode REST API,
to post content of given contentType
DELETE(url, user, pwd, path, verbose)This method performs a DELETE request for a given GeoServer resource identified
by a path in GeoNode REST API
clone()
The objects of this class are cloneable with this method.
GeoNodeUtils$clone(deep = FALSE)
deepWhether to make a deep clone.
Emmanuel Blondel <[email protected]>
This class allows to grab the GeoNode version.
R6Class object.
GeoNode REST API - GeoNode Version
Object of R6Class for modelling a GeoNode version
versionversion
valuevalue
new()
Initializes an object of class GeoNodeVersion
GeoNodeVersion$new(url, user, pwd)
urlurl
useruser
pwdpwd
lowerThan()
Compares to a version and returns TRUE if it is lower, FALSE otherwise
GeoNodeVersion$lowerThan(version)
versionversion
TRUE if lower, FALSE otherwise
greaterThan()
Compares to a version and returns TRUE if it is greater, FALSE otherwise
GeoNodeVersion$greaterThan(version)
versionversion
TRUE if greater, FALSE otherwise
equalTo()
Compares to a version and returns TRUE if it is equal, FALSE otherwise
GeoNodeVersion$equalTo(version)
versionversion
TRUE if equal, FALSE otherwise
clone()
The objects of this class are cloneable with this method.
GeoNodeVersion$clone(deep = FALSE)
deepWhether to make a deep clone.
Emmanuel Blondel <[email protected]>
## Not run: version <- GeoNodeVersion$new( url = "http://localhost:8080/GeoNode", user = "admin", pwd = "GeoNode" ) ## End(Not run)## Not run: version <- GeoNodeVersion$new( url = "http://localhost:8080/GeoNode", user = "admin", pwd = "GeoNode" ) ## End(Not run)