Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download NVCLConfig.zip.
  2. Extract it into %GEOSERVER_INSTANCE_HOME%/data/workspaces .

  3. Create the file %GEOSERVER_INSTANCE_HOME%/WEB-INF/classes/app-schema.properties and insert the following text replacing %PLACEHOLDERS%with appropriate values:

    Code Block
    languagebash
    # Oracle connection parameters
    borehole.dbtype = oracle
    borehole.jndi = jdbc/borehole
    nvcl.dbtype = oracle
    nvcl.jndi = jdbc/nvcl
    # The codeSpace URL used for gml:name
    borehole.codespace1 = http://www.ietf.org/rfc/rfc2616
    borehole.codespace2 = %CLIENT_HOME_URL%
    # eg. http://www.csiro.au
    # Client's Borehole url
    borehole.uri = http://%SERVER_HOST_NAME%/resource/feature/%CUSTODIAN_SHORT_NAME%/borehole/
    # eg http://geossdi.dmp.wa.gov.au/resource/feature/GSWA/borehole/
    # Client's O&M url
    om.uri = http://%SERVER_HOST_NAME%/resource/feature/%CUSTODIAN_SHORT_NAME%/samplingfeaturecollection/
    # eg http://www.mrt.tas.gov.au/resource/feature/MRT/samplingfeaturecollection/
    # Core Custodian 
    borehole.custodian = %CUSTODIAN_LONG_NAME%
    # eg Mineral Resources Tasmania
    # Metadata URI 
    gsmlp.metadata.uri = http://researchdata.ands.org.au/%BOREHOLE_SERVICE%


  4. Replace all %PLACEHOLDERS% with appropriate values and insert the following <resource> elements into the geoserver <context> element of the file %TOMCAT_HOME%/conf/server.xml:

    Code Block
    languagexml
    <Resource
            name="jdbc/borehole"
            auth="Container"
            type="javax.sql.DataSource"
            url="jdbc:oracle:thin:@%DB_HOSTNAME%:1521:%BOREHOLE_DB_NAME%"
            driverClassName="oracle.jdbc.OracleDriver"
            username="%DB_USERNAME%"
            password="%DB_PASSWORD%"
            maxTotal="2000"
            maxIdle="10"
            minIdle="2"
            maxWaitMillis="10000"
            minEvictableIdleTimeMillis="300000"
            timeBetweenEvictionRunsMillis="300000"
            numTestsPerEvictionRun="20"
            poolPreparedStatements="true"
            maxOpenPreparedStatements="100"
            testOnBorrow="true"
            validationQuery="SELECT 1 FROM DUAL" />
    <Resource
            name="jdbc/nvcl"
            auth="Container"
            type="javax.sql.DataSource"
            url="jdbc:oracle:thin:@%DB_HOSTNAME%:1521:%NVCL_DB_NAME%"
            driverClassName="oracle.jdbc.OracleDriver"
            username="%DB_USERNAME%"
            password="%DB_PASSWORD%"
            maxTotal="2000"
            maxIdle="10"
            minIdle="2"
            maxWaitMillis="10000"
            minEvictableIdleTimeMillis="300000"
            timeBetweenEvictionRunsMillis="300000"
            numTestsPerEvictionRun="20"
            poolPreparedStatements="true"
            maxOpenPreparedStatements="100"
            testOnBorrow="true"
            validationQuery="SELECT 1 FROM DUAL" />
        
  5. Replace all %PLACEHOLDERS%with appropriate values and add the following inside the <IfModule mod_rewrite.c> tag of your http Server configuration file:

    Code Block
    languagebash
    RewriteRule ^/resource/feature/%CUSTODIAN_NAME%/borehole/(.*) http://%SERVER_HOST_NAME%/%GEOSERVER_INSTANCE_NAME%/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=gsml:Borehole&featureid=gsml.borehole.$1 [NC,R=303,L]
    RewriteRule ^/resource/feature/%CUSTODIAN_NAME%/samplingfeaturecollection/(.*)  http://%SERVER_HOST_NAME%/%GEOSERVER_INSTANCE_NAME%/wfs?service=WFS&version=1.1.0&request=GetFeature&typeName=sa:SamplingFeatureCollection&featureid=sa.samplingfeaturecollection.$1 [NC,R=303,L]


  6. Edit %GEOSERVER_DATA_DIR%/workspaces/gsmlp/BoreholeView/BoreholeView/featuretype.xml and replace the 2 %PLACEHOLDERS%with appropriate values :

    Code Block
    languagexml
    <title>Borehole Portrayal View</title>
    <abstract>GeoSciML Portrayal Borehole View for NVCL Borehole</abstract>
    <keywords>
      <string>association:http://%SERVER_HOST_NAME%/resource/feature/%CUSTODIAN_SHORT_NAME%/gsmlp/borehole/</string>
    </keywords>


...