Web Coverage Service | ||
WFSRI Template | ||
The Web Feature Service Reference Implementation (WFSRI) is a complex and extensive collection of code and resources, access to which is essential for Producers and those who intend to run Web Feature Servers. On the other hand, end-users of the WFSRI need only interact with a small subset of the WFSRI's bulk.
To help such end-users identify the basic components of the WFSRI and ease them into interacting with it, the NNEW team has developed the WFSRI Template. The example code within the Template demonstrates how the Reference Implementation may be used from start to finish: setting up a database sandbox, inserting and retrieving data, and tearing the sandbox back down.
It is recommended that you download the template and test its embedded examples before customizing it for your own purposes.
Unlike the other releases available on the NNEW Wiki, the WFSRI Template must be downloaded from the wxForge SVN and built in Apache Maven. Thus, you must have development access to the wxForge repository and have rights to the wfsri-template
project. For full details on how to get access to wxForge, see the Accessing wxForge article.
Once you have access to the wfsri-template
project on wxForge, follow the instructions below to install and configure the WFSRI Template:
wfsri-template
project from wxForge by entering the following command in your Linux terminal. Note that the environment variable $WFSRI_TEMPLATE
should be set on your system to point to whichever directory you would like to install the Template to.$WFSRI_TEMPLATE/src/main/resources
directory. Modify these files as follows:setup.installPath
and setup.srcPath
are relative paths that allow the template to locate critical SQL scripts; unless you have changed the location of their respective directories (sql/install
and sql/main
), they may be left at their default values. The setup.sqlPath
property, however, must be set to your sqlplus
executable.wfs.tablespace
and wfs.tempTablespace
properties to whatever you would like – this simply gives them unique names to identify them amongst other tablespaces.The WFSRI Template contains two ready-made example integration tests:
If both tests succeed, your copy of the WFSRI Template is properly configured, and you can move on to customization. If either test fails, review the WFSRI 2.0 Troubleshooting documentation.
The two integration tests in the Template are intended as a jumping-off point for WFSRI users, and may be modified to suit the users' needs. Make a copy of the appropriate integration test (with or without subscription as befits your needs), then copy the $WFSRI_TEMPLATE/src/test/resources/xml/integration/lightning.properties
file, replacing the parameter values with your own data as follows:
For more information and examples of how to create the various files for your Feature Type, refer to the WFSRI 2.0 User Guide.
Once you have updated your version of the lightning.properties
file, change the value of the PROPERTIES_FILE
variable in your copy of the integration test to point to it. You may then run the new test in the same manner as was done for the included examples.
While the Template's code merely builds a sandbox and tests insertion and retrieval before tearing it back down, it is likely you will want to modify the code to suit your own purposes. The various files in the edu.mit.ll.wfsri.mock
package should provide you with whatever functionality you require.