Skip to contents

Geoserver REST API Layer Manager

Geoserver REST API Layer Manager

Format

R6Class object.

Value

Object of R6Class with methods for managing GeoServer Layers as results of published feature types or coverages

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Super class

geosapi::GSManager -> GSLayerManager

Methods

Inherited methods


Method getLayers()

Get the list of layers.

Usage

GSLayerManager$getLayers()

Returns

an object of class list giving items of class GSLayer


Method getLayerNames()

Get the list of layer names.

Usage

GSLayerManager$getLayerNames()

Returns

a vector of class character


Method getLayer()

Get layer by name

Usage

GSLayerManager$getLayer(lyr)

Arguments

lyr

layer name

Returns

an object of class GSLayer


Method createLayer()

Creates a new layer given an object of class GSLayer

Usage

GSLayerManager$createLayer(layer)

Arguments

layer

object of class GSLayer

Returns

TRUE if created, FALSE otherwise


Method updateLayer()

Updates a layer given an object of class GSLayer

Usage

GSLayerManager$updateLayer(layer)

Arguments

layer

object of class GSLayer

Returns

TRUE if updated, FALSE otherwise


Method deleteLayer()

Deletes layer given an object of class GSLayer

Usage

GSLayerManager$deleteLayer(lyr)

Arguments

lyr

layer name

Returns

TRUE if deleted, FALSE otherwise


Method getLayerGroups()

Get layer groups

Usage

GSLayerManager$getLayerGroups(ws = NULL)

Arguments

ws

workspace name. Optional

Returns

a list of objects of class GSLayerGroup


Method getLayerGroupNames()

Get layer group names

Usage

GSLayerManager$getLayerGroupNames(ws = NULL)

Arguments

ws

workspace name

Returns

a list of layer group names, as vector of class character


Method getLayerGroup()

Get layer group

Usage

GSLayerManager$getLayerGroup(lyr, ws = NULL)

Arguments

lyr

lyr

ws

workspace name

Returns

an object of class GSLayerGroup


Method createLayerGroup()

Creates a layer group

Usage

GSLayerManager$createLayerGroup(layerGroup, ws = NULL)

Arguments

layerGroup

object of class GSLayerGroup

ws

workspace name. Optional

Returns

TRUE if created, FALSE otherwise


Method updateLayerGroup()

Updates a layer group

Usage

GSLayerManager$updateLayerGroup(layerGroup, ws = NULL)

Arguments

layerGroup

object of class GSLayerGroup

ws

workspace name. Optional

Returns

TRUE if updated, FALSE otherwise


Method deleteLayerGroup()

Deletes a layer group

Usage

GSLayerManager$deleteLayerGroup(lyr, ws = NULL)

Arguments

lyr

layer group name

ws

workspace name. Optional

Returns

TRUE if deleted, FALSE otherwise


Method clone()

The objects of this class are cloneable with this method.

Usage

GSLayerManager$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# \dontrun{
   GSLayerManager$new("http://localhost:8080/geoserver", "admin", "geoserver")
#> Error in curl::curl_fetch_memory(url, handle = handle): Failed to connect to localhost port 8080 after 0 ms: Connection refused
 # }