AQUARIUS Timeseries
This is an import that makes use of the custom import mechanism described in Custom import formats. The AQUARIUS server import offers two ServerParsers (AquariusTimeSeriesSoapServerParser.java and AquariusTimeSeriesRestServerParser.java), and a few parsers to parse the Aquarius response formats:
- Aquarius GetDataSetsList response: CsvDataSetParser.java
- Aquarius GetTimeSeriesData response: CsvTimeSeriesDataParser.java
The server parser interacts with an ADCON programming interface as described their AQUARIUS Publish Web Service API document. This document is also available online; http://nrdata.nps.gov/Programs/Water/Aquarius/AQUARIUS%203.8%20Publish%20Service%20API%20Manual.pdf.
For accessing the AQUARIUS server it is necessary to provide login credentials. These credentials are used to obtain an Aquarius authentication token. This token needs to be set as a request property for each data request.
FEWS configuration
In order to activate the AQUARIUS Server import as a FEWS import, it is required to setup a TimeSeriesImportRun module configuration file and an accompanying IdMap file. Also the bin directory containing all AQUARIUS resources must be placed in a location that can be accessed by FEWS.
Example Import configuration file for the REST service:
<?xml version= "1.0" encoding= "UTF-8" ?> <timeSeriesImportRun xmlns= "http://www.wldelft.nl/fews" xsi:schemaLocation= "http://www.wldelft.nl/fews file:/d:/FEWS-code/trunk/xml-schemas/timeSeriesImportRun.xsd" > <!-- This is an example import configuration file for importing Observations and Measurements data from a service --> < import > <general> <parserClassName>nl.wldelft.aquarius.timeseriesparsers.AquariusTimeSeriesRestServerParser</parserClassName> <binDir>%REGION_HOME%/Modules/aquarius-bin</binDir> <user>user</user> <password>password</password> <relativeViewPeriod unit= "hour" start= "-5" end= "0" startOverrulable= "true" endOverrulable= "true" /> <idMapId>IdImportAquarius</idMapId> <importTimeZone> <timeZoneOffset>- 06 : 00 </timeZoneOffset> </importTimeZone> </general> <properties> <!-- Optional: This option allows the import to control how timeseries are to be imported. If this option is this option is set to 'true' then the import will loop over the available list of locations and import all timeseries belonging to a location in a single call. <bool key= "LoopOverLocations" value= "false" /> <!-- Optional: Filter option provided by the AQUARIUS server. The AQUARIUS server can provide some different views from which to retrieve data. If the PublishView is not know then omit this value. --> <!-- <string key= "PublishView" value= "test" /> --> <!-- Optional: With this option it is possible to skip the 'GetDataSetList' call to the AQUARIUS server. What this call does is retrieve all the timeseries ids available for one or more requested location ids. If the import IdMap has already mapped the FEWS parameter and location ids to AQUARIUS timeseries ids then the 'SkipDataSetList' value must be set to 'true'. --> <bool key= "SkipDataSetList" value= "false" /> </properties> <timeSeriesSet> <moduleInstanceId>ImportAquarius</moduleInstanceId> <valueType>scalar</valueType> <parameterId>MyPar</parameterId> <locationSetId>MyLocSet</locationSetId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit= "nonequidistant" /> <readWriteMode>add originals</readWriteMode> <synchLevel> 1 </synchLevel> </timeSeriesSet> </ import > </timeSeriesImportRun> |
Example IdMap file:
<?xml version=
"1.0"
encoding=
"UTF-8"
?>
<idMap version=
"1.1"
xmlns=
"http://www.wldelft.nl/fews"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/idMap.xsd"
>
<!--
OPTION1: map internal timeseries directly to external timeseries
Using
this
configuration the Adcon parser queries each timeseries separately.
-->
<map internalLocation=
"MyLoc1"
internalParameter=
"MyPar1"
externalLocation=
"adconNodeIdOfTimeseries"
externalParameter=
"none"
/>
<!--
OPTION2: map internal timeseries to groep of external timeseries
Using
this
configuration the Adcon parser queries the whole group is a single request and then
extract the timeseries data from the response. The response contains all available timeseries
and not only the requested ones. -->
<map internalLocation=
"MyLoc1"
internalParameter=
"MyPar1"
externalLocation=
"adconNodeIdOfGroup"
externalParameter=
"adconNodeIdOfTimeSeries1"
/>
<map internalLocation=
"MyLoc1"
internalParameter=
"MyPar2"
externalLocation=
"adconNodeIdOfGroup"
externalParameter=
"adconNodeIdOfTimeSeries2"
/>
<map internalLocation=
"MyLoc1"
internalParameter=
"MyPar3"
externalLocation=
"adconNodeIdOfGroup"
externalParameter=
"adconNodeIdOfTimeSeries3"
/>
<map internalLocation=
"MyLoc1"
internalParameter=
"MyPar4"
externalLocation=
"adconNodeIdOfGroup"
externalParameter=
"adconNodeIdOfTimeSeries4"
/>
</idMap>