GeoNode REST API Manager
GeoNode REST API Manager
Object of R6Class with methods for communication with
the REST API of a GeoNode instance.
R6Class object.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
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.
if (FALSE) {
GeoNodeManager$new("http://localhost:8080", "user", "password")
}
Run the code above in your browser using DataLab