DBSchemaToDatastoreConf
1. General Information
First of all, please make sure to read the chapter on General Information for all deegreeTools.
2. Description
This program creates a deegree WFS datastore configuration file for one or more database tables or an ESRI shapefile. As can been seen from the WFS documentation, a deegree datastore configuration is nothing more than an annotated GML application schema. DBSchemaToDatastoreConf will read metainformation from database tables or shapefiles to create a matching GML application schema and the annotations required by deegree. Most of the annotations are used to map tables and table columns onto feature types and properties. For details please have look at the WFS documentation. The following backends are supported:
- shape files (use -driver SHAPE) and something like -url /path/to/shapefilename_with_no_extension)
oracle database (use -driver oracle.jdbc.OracleDriver and something like -url jdbc:oracle:thin:@your_host:1521 )
- postgis database (use -driver org.postgresql.Driver and something like -url jdbc:postgresql://your_host:5432 )
- other (generic) databases like
- hsql (-driver org.hsqldb.jdbcDriver -url jdbc:hsqldb:/path/to/hsqldb_file)
- ingres (-driver ? -url ? )
3. Library Dependancies
general libs
deegree2.jar jaxen-1.1-beta-8.jar log4j-1.2.9.jar log4j-1.2.9.jar commons-logging.jar commons-httpclient-2.0.2-deegreeversion.jar
database specific libs
PostgreSQL with Postgis extension
postgresql-8.0-311.jdbc3.jar postgis100.jar;
Oracle Spatial
ojdbc14_10g.jar
hsql
hsqldb.jar
ingres
...to do...
4. Usage
The program will be invoked as follows:
java -classpath .;lib\deegree2.jar org.deegree.tools.datastore.DBSchemaToDatastoreConf
There are no mandatory command line parameters. For any required information the program will prompt a request for input on the console. But if you prefer to use command line parameters instead this is also possible. Following parameters are understood:
-tables
- a quoted list of tables (separated with ',' '|' or ';' ) or path to shapefile (without extension) to create the featuretypes from.
-driver
- one of the drivers mentioned above.
-url
- an url to your database or /path/to/shapefilename_with_no_extension (see your database manual for the exact jdbc phrase)
-output
- a filename to which the featuretype description will be saved.
-user
- to be used to connect to the database
-password
- (optional) to be used to connect to the database, if not given, the password will be the empty string
-srs
- SRS/CRS name to be used as native CRS of the data
-h -? -help
- print this message.
5. Examples
java -classpath .;lib\deegree2.jar org.deegree.tools.datastore.DBSchemaToDatastoreConf -output e:/temp/schema.xsd -driver org.postgresql.Driver -url jdbc:postgresql://localhost:5432/myDB -user postgres -password postgres -tables aTable -srs EPSG:4326
look for other deegreeTools