GDAS User Guide GDAS 0.9.1 User Guide GDAS 0.9.1 Configuration JDBC Configuration Programmer's Manual

GDAS Configuration

GDAS is configured using three XML documents:

  • web.xml - configures parameters for the GDAS servlet application
  • GetCapabilities.xml - the document returned from the GDAS GetCapabilities request as defined in the GDAS 0.9.1 Specification section 7.1.
  • dataHandlerConfig.xml - configures the application with data source connection details such as database urls, passwords etc.

GDAS advertises the information it has available by returning a GetCapabilities.xml file in response to the GDAS GetCapabilities request (GDAS 0.9.1 specification section 7.1). Each deployment of GDAS will have a unique GetCapabilities.xml document describing the data sets it has available.

In order to respond to the GDAS GetData request, each GDAS deployment must retrieve data advertised in the GetCapabilities.xml by using information in the dataHandlerConfig.xml.


web.xml

File Naming and Location

Once GDAS is deployed on the J2EE server (we are using Tomcat) the web.xml file can be found at:

TOMCAT_HOME/webapps/gdas091/WEB-INF/web.xml

TOMCAT_HOME is the directory where tomcat is installed.

The name of the file returned by a GetCapabilities request, the name of the DataHandlerConfig file and the directory in which they are located are defined in the web.xml file. These values are already configured and do not have to be changed.

If you do wish to change the names of one of these files or change the directory they are stored in, you must edit the following web.xml elements:

  • <init-param>
        <param-name>getCapabilitesFileName</param-name>
  • <init-param>
        <param-name>dataHandlerConfigFileName</param-name>
  • <init-param>
        <param-name>AbsolutePathToConfigDirectory</param-name>

GetCapabilities.xml

The GetCapabilities template file is found in the distribution:

GDAS_Distribution/src/GDAS_091/configFiles/ GetCapabilities091Template.xml

Using the following instructions as a supplement to the GDAS 0.9.1 Specification to make entries in this template file.


  1. Save the GetCapabilities091Template.xml as GetCapabilities091.xml in the configuration directory defined in the gdas091 web.xml file.

  2. Open GetCapabilities091.xml in an XML editor(if you don't have an XML editor a plain text editor will do).

  3. Using the GetCapabilities.xml example in the GDAS 0.9.1 Specification Annex B section B.3, enter values for the GDAS_Capabilities / Service, GDAS_Capabilities / Capability / Request and Exception elements.

  4. Fill in the values of the GDAS_Capability / Capability / Framework element as described in Section 7.1.4.1 - 7.1.4.1.9 of the GDAS Specification and Framework's child element <Dataset> as described in Section 7.1.4.1.10 - 7.1.4.1.10.10.8 of the GDAS Specification..

  5. All the required fields should now be filled in. Using your XML editor, validate your document. If you don't have an XML editor go to http://www.w3schools.com/dom/dom_validate.asp and follow the validation instructions. (Notice the schema location to validate this document against is defined in the top element, <GDAS_Capabilities>.)

  6. Additional <Framework> and <Dataset> elements can be added as needed.


DataHandlerConfig.xml

A dataHandlerConfig.xml template file is located at:

GDAS_Distribution/src/gdas091/configFiles/ dataHandlerConfig091Template.xml

Each <Dataset> element in the GetCapabilities.xml represents a specific set of data stored in a database, databasefile (.dbf) or some other kind of data storage implementation.

The DataHandlerConfig.xml configures GDAS to locate and query the requested dataset's storage in order to reply to a GDAS GetData request.

The DataHandlerConfig.xml's schema is included in the GDAS_091 distribution as:

dataHandlerConfig091.xsd.

The dataHandelerConfig.xsd schema was created for this implementation of GDAS and is not part of the GDAS 0.9.1 specification.

Complete the dataHandlerConfig.xml file

  1. Save the gdas091/WEB_INF/dataHandlerConfig091Template.xml as dataHandlerConfig091.xml in the configuration directory defined in the web.xml.

  2. Open dataHandlerConfig091.xml in an XML editor (use a plain text editor if you don't have an XML editor).

  3. Follow the instructions in the dataHandlerConfig.xml template to change the attribute values for the <framework_config> and <dataset_config> elements.

  4. Special element: <parameter>

    The <parameter> element(s) nested in the <dataset_config> is where the datastore's connection details are defined. The values here depend on the type of datastore you are connecting to. Find your type of datastore in the list below and follow the configuration instructions. If your datastore is not listed below, GDAS 0.9.1 can be customized to connect to other datastores. See the GDAS 0.9.1 Programmers Manual

  • JDBC - includes Oracle, Databasefiles (.dbf)
GDAS User Guide GDAS 0.9.1 User Guide GDAS 0.9.1 Configuration JDBC Configuration Programmer's Manual