Geoserver REST API DataStore Manager
GSDataStoreManager
Object of R6Class
with methods for managing GeoServer
DataStores (i.e. stores of vector data)
R6Class
object.
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
getDataStores(ws)
Get the list of available dataStores. Returns an object of class list
giving items of class GSDataStore
getDataStoreNames(ws)
Get the list of available dataStore names. Returns an vector of class character
getDataStore(ws, ds)
Get an object of class GSDataStore
given a workspace and datastore
names.
createDataStore(ws, dataStore)
Creates a new datastore given a workspace and an object of class GSDataStore
updateDataStore(ws, dataStore)
Updates an existing dataStore given a workspace and an object of class GSDataStore
deleteDataStore(ws, ds, recurse)
Deletes a datastore given a workspace and an object of class GSDataStore
.
By defaut, the option recurse
is set to FALSE, ie datastore layers are not removed.
To remove all datastore layers, set this option to TRUE.
getFeatureTypes(ws, ds)
Get the list of available feature types for given workspace and datastore.
Returns an object of class list
giving items of class GSFeatureType
getFeatureTypeNames(ws, ds)
Get the list of available feature type names for given workspace and datastore.
Returns an vector of classcharacter
getFeatureType(ws, ds, ft)
Get an object of class GSFeatureType
given a workspace, datastore
and feature type names.
createFeatureType(ws, ds, featureType)
Creates a new featureType given a workspace, datastore names and an object of
class GSFeatureType
updateFeatureType(ws, ds, FeatureType)
Updates a new featureType given a workspace, datastore names and an object of
class GSFeatureType
deleteFeatureType(ws, ds, featureType, recurse)
Deletes a featureType given a workspace, datastore names, and an object of
class GSFeatureType
. By defaut, the option recurse
is
set to FALSE, ie datastore layers are not removed.
uploadData(ws, ds, endpoint, extension,
configure, update, filename, charset, contentType)
Uploads data to a target dataStore
uploadShapefile(ws, ds, endpoint,
configure, update, filename, charset)
Uploads a zipped ESRIshapefile to a target dataStore
uploadProperties(ws, ds, endpoint,
configure, update, filename, charset)
Uploads a properties file to a target dataStore
uploadH2(ws, ds, endpoint,
configure, update, filename, charset)
Uploads a H2 database to a target dataStore
uploadSpatialite(ws, ds, endpoint,
configure, update, filename, charset)
Uploads a Spatialite database to a target dataStore
uploadAppschema(ws, ds, endpoint,
configure, update, filename, charset)
Uploads a appschema file to a target dataStore
# NOT RUN {
GSDataStoreManager$new("http://localhost:8080/geoserver", "admin", "geoserver")
# }
Run the code above in your browser using DataLab