geosapi (version 0.1-0)

GSNamespaceManager: Geoserver REST API Namespace Manager

Description

Geoserver REST API Namespace Manager

Usage

GSNamespaceManager

Arguments

Value

Object of R6Class with methods for managing the namespaces of a GeoServer instance.

Format

R6Class object.

Methods

new(url, user, pwd, logger)

This method is used to instantiate a GSManager with the url of the GeoServer 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

getNamespaces()

Get the list of available namespace. Returns an object of class list containing items of class GSNamespace

getNamespaceNames()

Get the list of available namespace names. Returns an vector of class character

getNamespace(ns)

Get a GSNamespace object given a namespace name.

createNamespace(prefix, uri)

Creates a GeoServer namespace given a prefix, and an optional URI. Returns TRUE if the namespace has been successfully created, FALSE otherwise

updateNamespace(ns, uri)

Updates a GeoServer namespace given a name, and an optional URI. Returns TRUE if the namespace has been successfully updated, FALSE otherwise

deleteNamespace(ns)

Deletes a GeoServer namespace given a name. Returns TRUE if the namespace has been successfully deleted, FALSE otherwise

Examples

Run this code
# NOT RUN {
   GSNamespaceManager$new("http://localhost:8080/geoserver", "admin", "geoserver")
# }

Run the code above in your browser using DataLab