geosapi (version 0.1-0)

GSStyleManager: Geoserver REST API Style Manager

Description

Geoserver REST API Style Manager

Usage

GSStyleManager

Arguments

Value

Object of R6Class with methods for managing the styles 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

getStyles()

Get the list of available styles. Returns an object of class list containing items of class GSStyle

getStyleNames()

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

getStyle(style)

Get a GSStyle object given a style name.

createStyle(file, sldBody, name, raw, ws)

Creates a GeoServer style given a name. Returns TRUE if the style has been successfully created, FALSE otherwise

updateStyle(file, sldBody, name, raw, ws)

Updates a GeoServer style. Returns TRUE if the style has been successfully updated, FALSE otherwise

deleteStyle(style, recurse, purge, ws)

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

getSLDVersion(sldBody)

Get the SLD version from the XML object (of class XMLInternalDocument)

getSLDBody(style, ws = NULL)

Get the SLD Body given a style name. This method is only supported for Geoserver >= 2.2.

Examples

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

Run the code above in your browser using DataLab