SchemaAnnotator
The SchemaAnnotator is a tool for adding datastore annotations to GML application schemas. These annotations define the mapping of features and their properties to database tables and columns and are required so a schema can be used as a datastore configuration file in the WFS. The DDLGenerator can then be used to generate the necessary tables in an SQL database for storing features.
If you want the WFS to serve the feature types defined in a GML application schema file named country.xsd, you would perform the following steps:
Use country.xsd as input to the SchemaAnnotator. Output is country_mapped.xsd.
Use DDLGenerator to generate a CREATE script create.sql from country_mapped.xsd.
- Run the create.sql script against your database to set up the needed tables.
- Put country_mapped.xsd into the featuretypes folder of your WFS.
PLEASE NOTE: This tool is currently not usable out-of-the box. It has only been used internally at lat/lon for mapping schemas in customer projects and needs a hand-crafted XSL file (annotator.xsl) for adding the annotations. If you're interested in using this (or better: making this work for the community), please contact us using the deegree mailing lists.
Example for performing step 1:
java -classpath ... org.deegree.tools.datastore.SchemaAnnotator country.xsd country_mapped.xsd
General syntax:
Usage: SchemaAnnotator <input.xsd> <output.xsd> [tableName.properties] [columnName.properties]