geosapi (version 0.1-0)

GSManager: Geoserver REST API Manager

Description

Geoserver REST API Manager

Usage

GSManager

Arguments

Value

Object of R6Class with methods for communication with the REST API of a GeoServer instance.

Format

R6Class object.

Fields

loggerType

the type of logger

verbose.info

if geosapi logs have to be printed

verbose.debug

if curl logs have to be printed

url

the Base url of GeoServer

version

the version of Geoserver. Handled as GSVersion 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

logger(type, text)

Basic logger to report geosapi logs. Used internally

INFO(text)

Logger to report information. Used internally

WARN(text)

Logger to report warnings. Used internally

ERROR(text)

Logger to report errors. Used internally

getUrl()

Get the authentication URL

connect()

This methods attempts a connection to GeoServer REST API. User internally during initialization of GSManager.

reload()

Reloads the GeoServer catalog.

getClassName()

Retrieves the name of the class instance

getWorkspaceManager()

Retrieves an instance of workspace manager

getNamespaceManager()

Retrieves an instance of namespace manager

getDataStoreManager()

Retrieves an instance of datastore manager

Examples

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

Run the code above in your browser using DataCamp Workspace