[Geoserver-devel] [JIRA] (GEOS-7087) App-schema mapping file upload via REST

Stefano Costa created an issue

GeoServer / ImprovementGEOS-7087

App-schema mapping file upload via REST

Issue Type:

ImprovementImprovement

Assignee:

Unassigned

Components:

Application schema, REST

Created:

24/Jun/15 1:42 PM

Priority:

MediumMedium

Reporter:

Stefano Costa

The current REST API already allows for the creation of an app-schema datastore: what is missing is the possibility to upload an app-schema mapping file to an already created app-schema datastore, or create a new datastore based on the uploaded mapping file.

There is already a REST endpoint to upload files to a datastore:
/workspaces/<ws>/datastores/<ds>/[file|url|external][.<extension>]

The supported extensions so far are shape, properties, h2 and spatialite.
I’m proposing to add a new extension, appschema, which will trigger the creation / update of an app-schema datastore.

For example:

curl -X PUT -d @LandCoverVector.xml -H "Content-Type: text/xml" -u admin:geoserver http://localhost:8080/geoserver/rest/workspaces/lcv/datastores/LandCoverVector/file.appschema?configure=all

where LandCoverVector.xml is an app-schema mapping file containing the mappings for two feature types, LandCoverDataset and LandCoverUnit, will result in the creation of a new app-schema datastore called LandCoverVector (the feature types in it will be automatically configured, thanks to the configure=all parameter).

In case the store already existed, the same request would have replaced the current mapping file with the uploaded file. However, the configure parameter should be set to none, to avoid configuring the same feature types twice.

Related discussion on the developer ML:
http://sourceforge.net/p/geoserver/mailman/message/34194007/

Proposed implementation is here:
https://github.com/geoserver/geoserver/pull/1106

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.5-OD-07-005#65007-sha1:7561251)

Atlassian logo