GSStyleManager | R Documentation |
Geoserver REST API Style Manager
Geoserver REST API Style Manager
R6Class
object.
Object of R6Class
with methods for managing the styles
of a GeoServer instance.
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()
getStyleNames()
getStyle(style)
createStyle(file, sldBody, name, raw, ws)
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.
geosapi::GSManager
-> GSStyleManager
geosapi::GSManager$ERROR()
geosapi::GSManager$INFO()
geosapi::GSManager$WARN()
geosapi::GSManager$connect()
geosapi::GSManager$getClassName()
geosapi::GSManager$getCoverageStoreManager()
geosapi::GSManager$getDataStoreManager()
geosapi::GSManager$getNamespaceManager()
geosapi::GSManager$getServiceManager()
geosapi::GSManager$getStyleManager()
geosapi::GSManager$getSystemStatus()
geosapi::GSManager$getUrl()
geosapi::GSManager$getWorkspaceManager()
geosapi::GSManager$initialize()
geosapi::GSManager$logger()
geosapi::GSManager$monitor()
geosapi::GSManager$reload()
getStyles()
Get the list of available styles.
GSStyleManager$getStyles(ws = NULL)
ws
an optional workspace name
an object of class list
containing items of class GSStyle
getStyleNames()
Get the list of available style names
GSStyleManager$getStyleNames(ws = NULL)
ws
an optional workspace name
a vector of class character
getStyle()
Get a GSStyle
object given a style name.
GSStyleManager$getStyle(style, ws = NULL)
style
style name
ws
workspace name. Optional
object of class GSStyle
createStyle()
Creates a GeoServer style given a name.
GSStyleManager$createStyle(file, sldBody = NULL, name, raw = FALSE, ws = NULL)
file
file
sldBody
SLD body
name
name
raw
raw
ws
workspace name
TRUE
if the style has been successfully created, FALSE
otherwise
updateStyle()
Updates a GeoServer style given a name.
GSStyleManager$updateStyle(file, sldBody = NULL, name, raw = FALSE, ws = NULL)
file
file
sldBody
SLD body
name
name
raw
raw
ws
workspace name
TRUE
if the style has been successfully updated, FALSE
otherwise
deleteStyle()
Deletes a style given a name.
By defaut, the option recurse
is set to FALSE, ie datastore layers are not removed.
To remove all coverage store layers, set this option to TRUE. The purge
parameter is used
to customize the delete of files on disk (in case the underlying reader implements a delete method).
GSStyleManager$deleteStyle(name, recurse = FALSE, purge = FALSE, ws = NULL)
name
name
recurse
recurse
purge
purge
ws
workspace name
TRUE
if the style has been successfully deleted, FALSE
otherwise
getSLDVersion()
Get SLD version
GSStyleManager$getSLDVersion(sldBody)
sldBody
SLD body
getSLDBody()
Get SLD body
GSStyleManager$getSLDBody(style, ws = NULL)
style
style name
ws
workspace name
an object of class XMLInternalNode-class
clone()
The objects of this class are cloneable with this method.
GSStyleManager$clone(deep = FALSE)
deep
Whether to make a deep clone.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
## Not run:
GSStyleManager$new("http://localhost:8080/geoserver", "admin", "geoserver")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.