Versions Compared

Key

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

...

An example of the DataWare import configuration will be given here. The importType is named DataWare which should be configured in the general section of the import. De URL to the rest service should be configured here as well. The actual data to be retrieved can be tuned by adding setting the relativeViewPeriod and the timeSeries to specify the locations and parameters. N.B.: the used parameters and locations have to be specified in the Parameters.xml and Locations.xml config.
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>DataWare</importType>
			<serverUrl>http://hostnameserver:port/rest/read/data/</serverUrl>
			<relativeViewPeriod unit="hourday" start="-61" end="30" startOverrulable="true" endOverrulable="true"/>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>ImportDataWare</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>19839</parameterId>
			<locationId>1ha</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant" />
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>ImportDataWare</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>19840</parameterId>
			<locationId>1ha</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant" />
			<idMapId>IdImportDataWare<<readWriteMode>add originals</idMapId>readWriteMode>
		</general>timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>ImportDataWare</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>19839</parameterId>
			<locationId>2ha</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant" />
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>ImportDataWare</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>19840</parameterId>
			<locationId>1ha<<locationId>2ha</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant" />
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

The IdMapping configuration idImportDataWare.xml is very important because this maps the internal FEWS Id's to the DataWare Id's. An example IdMapping file for the DataWare importer is shown below. In this case the external 19839 parameter is mapped on the internal H.observed parameter. locations should be mapped as well.previous configuration will result in the following 4 REST urls being used:

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="19839"/>
	....
</idMap>
 
http://server:port/rest/read/data/19839/2015-01-04/2015-01-05/1ha
http://server:port/rest/read/data/19839/2015-01-04/2015-01-05/1ha
http://server:port/rest/read/data/19840/2015-01-04/2015-01-05/2ha
http://server:port/rest/read/data/19840/2015-01-04/2015-01-05/2ha
 

Example XML response from DataWare service

...