| GSDataStoreManager {geosapi} | R Documentation |
Geoserver REST API DataStore Manager
Description
Geoserver REST API DataStore Manager
Geoserver REST API DataStore Manager
Format
R6Class object.
Value
Object of R6Class with methods for managing GeoServer
DataStores (i.e. stores of vector data)
Super class
geosapi::GSManager -> GSDataStoreManager
Methods
Public methods
Inherited methods
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()
Method getDataStores()
Get the list of available dataStores.
Usage
GSDataStoreManager$getDataStores(ws)
Arguments
wsworkspace name
Returns
an object of class list giving items of class GSAbstractDataStore
Method getDataStoreNames()
Get the list of available dataStore names.
Usage
GSDataStoreManager$getDataStoreNames(ws)
Arguments
wsworkspace name
Returns
a vector of class character
Method getDataStore()
Get an object of class GSAbstractDataStore given a workspace and datastore names.
Usage
GSDataStoreManager$getDataStore(ws, ds)
Arguments
wsworkspace name
dsdatastore name
Returns
the datastore
Method createDataStore()
Creates a datastore given a workspace and an object of class GSAbstractDataStore.
Usage
GSDataStoreManager$createDataStore(ws, dataStore)
Arguments
wsworkspace name
dataStoredatastore object of class GSAbstractDataStore
Returns
TRUE if created, FALSE otherwise
Method updateDataStore()
Updates a datastore given a workspace and an object of class GSAbstractDataStore.
Usage
GSDataStoreManager$updateDataStore(ws, dataStore)
Arguments
wsworkspace name
dataStoredatastore object of class GSAbstractDataStore
Returns
TRUE if updated, FALSE otherwise
Method deleteDataStore()
Deletes a datastore given workspace and datastore names.
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.
Usage
GSDataStoreManager$deleteDataStore(ws, ds, recurse = FALSE)
Arguments
wsworkspace name
dsdatastore name
recurserecurse
Returns
TRUE if deleted, FALSE otherwise
Method getFeatureTypes()
Get the list of available feature types for given workspace and datastore.
Usage
GSDataStoreManager$getFeatureTypes(ws, ds, list = "configured")
Arguments
wsworkspace name
dsdatastore name
listlist type value, among "configured", "available", "available_with_geom", "all"
Returns
an object of class list giving items of class GSFeatureType
Method getFeatureTypeNames()
Get the list of available feature type names for given workspace and datastore.
Usage
GSDataStoreManager$getFeatureTypeNames(ws, ds)
Arguments
wsworkspace name
dsdatastore name
Returns
a vector of classcharacter
Method getFeatureType()
Get an object of class GSFeatureType given a workspace, datastore and feature type names.
Usage
GSDataStoreManager$getFeatureType(ws, ds, ft)
Arguments
wsworkspace name
dsdatastore name
ftfeature type name
Returns
an object of class GSFeatureType
Method createFeatureType()
Creates a new featureType given a workspace, datastore names and an object of class GSFeatureType
Usage
GSDataStoreManager$createFeatureType(ws, ds, featureType)
Arguments
wsworkspace name
dsdatastore name
featureTypefeature type
Returns
TRUE if created, FALSE otherwise
Method updateFeatureType()
Updates a featureType given a workspace, datastore names and an object of class GSFeatureType
Usage
GSDataStoreManager$updateFeatureType(ws, ds, featureType)
Arguments
wsworkspace name
dsdatastore name
featureTypefeature type
Returns
TRUE if updated, FALSE otherwise
Method deleteFeatureType()
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.
Usage
GSDataStoreManager$deleteFeatureType(ws, ds, ft, recurse = FALSE)
Arguments
wsworkspace name
dsdatastore name
ftfeature type name
recurserecurse
Returns
TRUE if deleted, FALSE otherwise
Method publishLayer()
Publish a feature type/layer pair given a workspace and datastore. The name 'layer' here encompasses both GSFeatureType and GSLayer resources.
Usage
GSDataStoreManager$publishLayer(ws, ds, featureType, layer)
Arguments
wsworkspace name
dsdatastore name
featureTypeobject of class GSFeatureType
layerobject of class GSLayer
Returns
TRUE if published, FALSE otherwise
Method unpublishLayer()
Unpublish a feature type/layer pair given a workspace and datastore. The name 'layer' here encompasses both GSFeatureType and GSLayer resources.
Usage
GSDataStoreManager$unpublishLayer(ws, ds, lyr)
Arguments
wsworkspace name
dsdatastore name
lyrlayer name
Returns
TRUE if published, FALSE otherwise
Method uploadData()
Uploads features data. The extension corresponds to the format/type of features to be uploaded among "shp", "spatialite", "h2", "gpkg".
The endpoint takes a value among "file" (default), "url" or "external". The filename is the name
of the coverage file to upload and set for the newly created datastore. The configure parameter can take a value among values
"none" (indicates to configure only the datastore but no layer configuration) or "first" (configure
both datastore and layer). The update defines the strategy for the upload: "append" (default value) for
the first upload, "overwrite" in case the file should be overwriten.
Usage
GSDataStoreManager$uploadData( ws, ds, endpoint = "file", extension, configure = "first", update = "append", filename, charset, contentType )
Arguments
wsworkspace name
dsdatastore name
endpointendpoint
extensionextension
configureconfigure strategy among values: "first" or "none"
updateupdate strategy, among values: "append", "overwrite"
filenamefile name of the resource to upload
charsetcharset
contentTypecontent type
Returns
TRUE if uploaded, FALSE otherwise
Method uploadShapefile()
Uploads zipped shapefile.
The endpoint takes a value among "file" (default), "url" or "external". The filename is the name
of the coverage file to upload and set for the newly created datastore. The configure parameter can take a value among values
"none" (indicates to configure only the datastore but no layer configuration) or "first" (configure
both datastore and layer). The update defines the strategy for the upload: "append" (default value) for
the first upload, "overwrite" in case the file should be overwriten.
Usage
GSDataStoreManager$uploadShapefile( ws, ds, endpoint = "file", configure = "first", update = "append", filename, charset = "UTF-8" )
Arguments
wsworkspace name
dsdatastore name
endpointendpoint
configureconfigure strategy among values: "first" or "none"
updateupdate strategy, among values: "append", "overwrite"
filenamefile name of the resource to upload
charsetcharset
Returns
TRUE if uploaded, FALSE otherwise
Method uploadProperties()
Uploads properties.
The endpoint takes a value among "file" (default), "url" or "external". The filename is the name
of the coverage file to upload and set for the newly created datastore. The configure parameter can take a value among values
"none" (indicates to configure only the datastore but no layer configuration) or "first" (configure
both datastore and layer). The update defines the strategy for the upload: "append" (default value) for
the first upload, "overwrite" in case the file should be overwriten.
Usage
GSDataStoreManager$uploadProperties( ws, ds, endpoint = "file", configure = "first", update = "append", filename, charset = "UTF-8" )
Arguments
wsworkspace name
dsdatastore name
endpointendpoint
configureconfigure strategy among values: "first" or "none"
updateupdate strategy, among values: "append", "overwrite"
filenamefile name of the resource to upload
charsetcharset
Returns
TRUE if uploaded, FALSE otherwise
Method uploadH2()
Uploads H2 database.
The endpoint takes a value among "file" (default), "url" or "external". The filename is the name
of the coverage file to upload and set for the newly created datastore. The configure parameter can take a value among values
"none" (indicates to configure only the datastore but no layer configuration) or "first" (configure
both datastore and layer). The update defines the strategy for the upload: "append" (default value) for
the first upload, "overwrite" in case the file should be overwriten.
Usage
GSDataStoreManager$uploadH2( ws, ds, endpoint = "file", configure = "first", update = "append", filename, charset = "UTF-8" )
Arguments
wsworkspace name
dsdatastore name
endpointendpoint
configureconfigure strategy among values: "first" or "none"
updateupdate strategy, among values: "append", "overwrite"
filenamefile name of the resource to upload
charsetcharset
Returns
TRUE if uploaded, FALSE otherwise
Method uploadSpatialite()
Uploads spatialite file.
The endpoint takes a value among "file" (default), "url" or "external". The filename is the name
of the coverage file to upload and set for the newly created datastore. The configure parameter can take a value among values
"none" (indicates to configure only the datastore but no layer configuration) or "first" (configure
both datastore and layer). The update defines the strategy for the upload: "append" (default value) for
the first upload, "overwrite" in case the file should be overwriten.
Usage
GSDataStoreManager$uploadSpatialite( ws, ds, endpoint = "file", configure = "first", update = "append", filename, charset = "UTF-8" )
Arguments
wsworkspace name
dsdatastore name
endpointendpoint
configureconfigure strategy among values: "first" or "none"
updateupdate strategy, among values: "append", "overwrite"
filenamefile name of the resource to upload
charsetcharset
Returns
TRUE if uploaded, FALSE otherwise
Method uploadAppschema()
Uploads App schema.
The endpoint takes a value among "file" (default), "url" or "external". The filename is the name
of the coverage file to upload and set for the newly created datastore. The configure parameter can take a value among values
"none" (indicates to configure only the datastore but no layer configuration) or "first" (configure
both datastore and layer). The update defines the strategy for the upload: "append" (default value) for
the first upload, "overwrite" in case the file should be overwriten.
Usage
GSDataStoreManager$uploadAppschema( ws, ds, endpoint = "file", configure = "first", update = "append", filename, charset = "UTF-8" )
Arguments
wsworkspace name
dsdatastore name
endpointendpoint
configureconfigure strategy among values: "first" or "none"
updateupdate strategy, among values: "append", "overwrite"
filenamefile name of the resource to upload
charsetcharset
Returns
TRUE if uploaded, FALSE otherwise
Method uploadGeoPackage()
Uploads GeoPackage.
The endpoint takes a value among "file" (default), "url" or "external". The filename is the name
of the coverage file to upload and set for the newly created datastore. The configure parameter can take a value among values
"none" (indicates to configure only the datastore but no layer configuration) or "first" (configure
both datastore and layer). The update defines the strategy for the upload: "append" (default value) for
the first upload, "overwrite" in case the file should be overwriten.
Usage
GSDataStoreManager$uploadGeoPackage( ws, ds, endpoint = "file", configure = "first", update = "append", filename, charset = "UTF-8" )
Arguments
wsworkspace name
dsdatastore name
endpointendpoint
configureconfigure strategy among values: "first" or "none"
updateupdate strategy, among values: "append", "overwrite"
filenamefile name of the resource to upload
charsetcharset
Returns
TRUE if uploaded, FALSE otherwise
Method clone()
The objects of this class are cloneable with this method.
Usage
GSDataStoreManager$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
Examples
## Not run:
GSDataStoreManager$new("http://localhost:8080/geoserver", "admin", "geoserver")
## End(Not run)