Create a new app-schema store and update the feature type mappings of an existing app-schema store by uploading a mapping configuration file

Note

The following request uploads an app-schema mapping file called LandCoverVector.xml to a data store called LandCoverVector. If no LandCoverVector data store existed in workspace lcv prior to the request, it would be created.

This time the configure parameter is set to none, because we don’t want to configure again the feature types, just replace their mapping configuration.

Note

If the set of feature types mapped in the new configuration file differs from the set of feature types mapped in the old one (either some are missing, or some are new, or both), the best way to proceed is to delete the data store and create it anew issuing another PUT request, as shown above.

Create a new app-schema data store based on a complex mapping configuration split into multiple files, and show how to upload application schemas (i.e. XSD files) along with the mapping configuration.

Note

In the previous example, we have seen how to create a new app-schema data store by uploading a mapping configuration stored in a single file; this time, things are more complicated, since the mappings have been spread over two configuration files: the main configuration file is called geosciml.appschema and contains the mappings for three feature types: GeologicUnit, MappedFeature and GeologicEvent; the second file is called cgi_termvalue.xml and contains the mappings for a single non-feature type, CGI_TermValue.

We also want to upload to GeoServer the schemas required to define the mapping, instead of having GeoServer retrieve them from the internet (which is especially useful in case our server doesn’t have access to the web). The main schema is called geosciml.xsd and is referred to in geosciml.appschema as such:

They don’t need to be listed in the targetTypes section of the mapping configuration, but they must be included in the ZIP archive that will be uploaded.

Note

The GeoSciML schemas listed above, as pretty much any application schema out there, reference the base GML schemas (notably, http://schemas.opengis.net/gml/3.1.1/base/gml.xsd) and a few other remotely hosted schemas (e.g. http://www.geosciml.org/cgiutilities/1.0/xsd/cgiUtilities.xsd).
For the example to work in a completely offline environment, one would have to either replace all remote references with local ones, or pre-populate the app-schema cache with a copy of the remote schemas. GeoServer’s user manual contains more information on the app-schema cache.

To summarize, we’ll upload to GeoServer a ZIP archive with the following contents: