geosapi (version 0.1-0)

GSDataStoreManager: Geoserver REST API DataStore Manager

Description

Geoserver REST API DataStore Manager

Usage

GSDataStoreManager

Arguments

Value

Object of R6Class with methods for managing GeoServer DataStores (i.e. stores of vector data)

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

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

Examples

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

Run the code above in your browser using DataLab