Versions Compared

Key

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

Overview

The Aqualarm import function (<importType>Aqualarm</importType>) imports data from the aqualarm services that return XML content (since 2015.02).

The service can be found at www.aqualarm.nl

Configuring the Import

To make the importer known to FEWS, the import module has to be declared in the moduleInstanceDescriptors.xml in the RegionConfigFiles directory of the FEWS configuration:

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<moduleInstanceDescriptors 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/moduleInstanceDescriptors.xsd" version="1.0">
...
	<moduleInstanceDescriptor id="ImportAqualarm">
		<moduleId>TimeSeriesImportRun</moduleId>
	</moduleInstanceDescriptor>
...
</moduleInstanceDescriptors>

 

An example of the Aqualarm import configuration will be given here. The importType is named Aqualarm which should be configured in the general section of the import. De URL to the service should be configured here as well. The actual data to be retrieved can be tuned by setting the relativeViewPeriod and the timeSeries to specify the locations and parameters. N.B.: the used parameters and locations have to be mapped with an idMap (IdAqualarm in this example).
TimeZone is assumed to be configured in the general section, otherwise GMT is assumed.

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun 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/timeSeriesImportRun.xsd">
	<import>
		<general>
			<importType>Aqualarm</importType>
			<serverUrl>http://www.aqualarm.nl</serverUrl>
			<connectionTimeOutMillis>20000</connectionTimeOutMillis>
			<relativeViewPeriod unit="day" start="-10" end="0" startOverrulable="true" endOverrulable="true"/>
			<idMapId>IdAqualarm</idMapId>
			<importTimeZone>
				<timeZoneName>GMT+2</timeZoneName>
			</importTimeZone>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>ImportAqualarm</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>H.observed</parameterId>
			<locationId>Lobith</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>ImportAqualarm</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>H.observed</parameterId>
			<locationId>Eijsden</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

The previous timeseries will be mapped using the IdAqualarm id mapping:

Code Block
xml
xml
 <?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">
   <parameter internal="H.observed"  external="CLBI"/>
   <location external="LOBI" internal="Lobith" />
   <location external="EIJS" internal="Eijsden" />
</idMap>

Example XML response from the Aqualarm service

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<Rowsets DateCreated="2015-09-16T14:01:28" EndDate="2003-11-03T14:22:49" StartDate="2000-11-03T14:21:49" Version="9.5">
   <Rowset>
      <Columns>
         <Column Description="LocationCode" MaxRange="1.0" MinRange="0.0" Name="LocationCode" SQLDataType="12" SourceColumn="LocationCode"/>
         <Column Description="ParamCode" MaxRange="1.0" MinRange="0.0" Name="ParamCode" SQLDataType="12" SourceColumn="ParamCode"/>
         <Column Description="Compoundname" MaxRange="1.0" MinRange="0.0" Name="Compoundname" SQLDataType="12" SourceColumn="Compoundname"/>
         <Column Description="ReportCode" MaxRange="1.0" MinRange="0.0" Name="ReportCode" SQLDataType="12" SourceColumn="ReportCode"/>
         <Column Description="ParamValue" MaxRange="1.0" MinRange="0.0" Name="ParamValue" SQLDataType="6" SourceColumn="ParamValue"/>
         <Column Description="Units" MaxRange="1.0" MinRange="0.0" Name="Units" SQLDataType="12" SourceColumn="Units"/>
         <Column Description="ParamDateTime" MaxRange="1.0" MinRange="0.0" Name="ParamDateTime" SQLDataType="93" SourceColumn="ParamDateTime"/>
         <Column Description="ParamQuality" MaxRange="1.0" MinRange="0.0" Name="ParamQuality" SQLDataType="-6" SourceColumn="ParamQuality"/>
         <Column Description="Validated" MaxRange="1.0" MinRange="0.0" Name="Validated" SQLDataType="12" SourceColumn="Validated"/>
         <Column Description="Modified" MaxRange="1.0" MinRange="0.0" Name="Modified" SQLDataType="12" SourceColumn="Modified"/>
      </Columns>
      <Row>
         <LocationCode>LOBI</LocationCode>
         <ParamCode>CLBI</ParamCode>
         <Compoundname>Chloride</Compoundname>
         <ReportCode/>
         <ParamValue>NA</ParamValue>
         <Units>mg/l</Units>
         <ParamDateTime>2015-09-16T08:00:06</ParamDateTime>
         <ParamQuality>0</ParamQuality>
         <Validated/>
         <Modified/>
      </Row>
      <Row>
         <LocationCode>LOBI</LocationCode>
         <ParamCode>CLBI</ParamCode>
         <Compoundname>Chloride</Compoundname>
         <ReportCode/>
         <ParamValue>NA</ParamValue>
         <Units>mg/l</Units>
         <ParamDateTime>2015-09-15T08:00:06</ParamDateTime>
         <ParamQuality>0</ParamQuality>
         <Validated/>
         <Modified/>
      </Row>
      <Row>
         <LocationCode>LOBI</LocationCode>
         <ParamCode>CLBI</ParamCode>
         <Compoundname>Chloride</Compoundname>
         <ReportCode/>
         <ParamValue>140</ParamValue>
         <Units>mg/l</Units>
         <ParamDateTime>2015-09-14T08:00:07</ParamDateTime>
         <ParamQuality>0</ParamQuality>
         <Validated>ja</Validated>
         <Modified>ja</Modified>
      </Row>
      <Row>
         <LocationCode>LOBI</LocationCode>
         <ParamCode>CLBI</ParamCode>
         <Compoundname>Chloride</Compoundname>
         <ReportCode/>
         <ParamValue>127</ParamValue>
         <Units>mg/l</Units>
         <ParamDateTime>2015-09-13T08:00:07</ParamDateTime>
         <ParamQuality>0</ParamQuality>
         <Validated>ja</Validated>
         <Modified>ja</Modified>
      </Row>
      <Row>
         <LocationCode>LOBI</LocationCode>
         <ParamCode>CLBI</ParamCode>
         <Compoundname>Chloride</Compoundname>
         <ReportCode/>
         <ParamValue>121</ParamValue>
         <Units>mg/l</Units>
         <ParamDateTime>2015-09-12T08:00:06</ParamDateTime>
         <ParamQuality>0</ParamQuality>
         <Validated>ja</Validated>
         <Modified>ja</Modified>
      </Row>
      <Row>
         <LocationCode>LOBI</LocationCode>
         <ParamCode>CLBI</ParamCode>
         <Compoundname>Chloride</Compoundname>
         <ReportCode/>
         <ParamValue>118</ParamValue>
         <Units>mg/l</Units>
         <ParamDateTime>2015-09-11T08:00:06</ParamDateTime>
         <ParamQuality>0</ParamQuality>
         <Validated>ja</Validated>
         <Modified>ja</Modified>
      </Row>
      <Row>
         <LocationCode>LOBI</LocationCode>
         <ParamCode>CLBI</ParamCode>
         <Compoundname>Chloride</Compoundname>
         <ReportCode/>
         <ParamValue>114</ParamValue>
         <Units>mg/l</Units>
         <ParamDateTime>2015-09-10T08:00:06</ParamDateTime>
         <ParamQuality>0</ParamQuality>
         <Validated>ja</Validated>
         <Modified>ja</Modified>
      </Row>
   </Rowset>
</Rowsets>
...