Versions Compared

Key

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

...

Example Import configuration file for the REST service:


 

Code Block
titleAquarius import
<?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 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>
        <serverUrl>http://hostdummy_hostname:port/addUPI</serverUrl>
        <user>user<<user>dummy_username</user>
        <password>password<<password>dummy_password</password>
        <relativeViewPeriod unit="hour" start="-5" end="0" startOverrulable="true" endOverrulable="true"/>
        <idMapId>IdImportAquarius</idMapId>
        <unitConversionsId>UnitConversionsAquarius</unitConversionsId>
        <flagConversionsId>ImportFlagConversion</flagConversionsId>
        <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 
          set to 'false' then all timeseries for all locations are imported in one single call to the webservice. If 
          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:

Code Block
titleAquarius IdMap
<?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 (datasets)
    When using this option the value 'SkipDataSetList' in the Aquarius import module must be set to 'true'.
 -->
 <map internalLocation="MyLoc1" internalParameter="MyPar1" externalLocation="AquariusDataSetId01" externalParameter="notused" />
 <map internalLocation="MyLoc1" internalParameter="MyPar2" externalLocation="AquariusDataSetId02" externalParameter="notused" />
 
 <!--
   OPTION2: map internal timeseries to external locations
    When using this option the value 'SkipDataSetList' in the Aquarius import module must be set to 'false'.
 -->
 <map internalLocation="MyLoc1" internalParameter="MyPar1" externalLocation="AquariusLoc1" externalParameter="notused" />
 <map internalLocation="MyLoc1" internalParameter="MyPar2" externalLocation="AquariusLoc2" externalParameter="notused" />
 
 </idMap>

 


AQUARIUS RatingCurves

The import of rating curves also makes use of the custom import mechanism described in Custom import formats. The AQUARIUS server import offers one ServerParsers for parsing rating curves (AquariusRatingCurveSoapServerParser.java). The following parser is used to parse the Aquarius rating curve response format:

...

Example Import Rating Curve configuration file for the service:


 

Code Block
titleAquarius import
<?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 file:/d:/FEWS-code/trunk/xml-schemas/timeSeriesImportRun.xsd">
<!-- This is an example import configuration file for importing Rating Curve data from a service -->
<import>
    <general>
        <parserClassName>nl.wldelft.aquarius.ratingcurveparsers.AquariusRatingCurveSoapServerParser</parserClassName>
        <binDir>%REGION_HOME%/Modules/aquarius-bin</binDir>
        <serverUrl>http://hostdummy_hostname:port/addUPI</serverUrl>
        <user>user<<user>dummy_username</user>
        <password>password<<password>dummy_password</password>
        <relativeViewPeriod unit="hour" start="-5" end="0" startOverrulable="true" endOverrulable="true"/>
        <idMapId>IdImportAquariusRatingCurves</idMapId>
	    <unitConversionsId>UnitConversionsAquarius</unitConversionsId>
        <flagConversionsId>ImportFlagConversion</flagConversionsId>
        <importTimeZone>
            <timeZoneOffset>-06:00</timeZoneOffset>
        </importTimeZone>
     </general>
     <locationSetId>Aquarius.Ratings</locationSetId> 
    </import>
</timeSeriesImportRun>

 


Example IdMap file:

Code Block
titleAquarius IdMap
<?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">
    
     <!-- IdMapping for the Aquarius import requires that the FEWS parameter is mapped to:
       externalQualifier = Aquarius ratingcurve input parameter,
       externalQualifier1 = Aquarius ratingcurve output parameter
       externalQualifier2 = either StageDischarge or DischargeStage
      -->
    <locationIdFunction internalLocationSet="Aquarius.Ratings" externalLocationFunction="@AQUARIUSID@" externalQualifierFunction="HG" externalQualifierFunction1="QR"         externalQualifierFunction2="StageDischarge"/>
 
 </idMap>

...

Code Block
languagexml
titleAquarius import (AQTS 20xx)
<?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">
	<!-- This is an example import configuration file for importing Observations and Measurements data from a service 	-->
	<import>
		<general>
			<parserClassName>nl.wldelft.aquarius.timeseriesparsers.AquariusTimeSeriesRestServerParserV2</parserClassName>
			<binDir>%REGION_HOME%/Modules/aquarius</binDir>
			<serverUrl>http://serverdummy_hostname:port/AQUARIUS/Publish/v2</serverUrl>
			<user>deltares<<user>dummy_username</user>
			<password>deltares<<password>dummy_password</password>
			<relativeViewPeriod unit="day" start="-365" end="0" startOverrulable="true" endOverrulable="true"/>
			<idMapId>IdImportAquarius</idMapId>
			<flagConversionsId>ImportFlagConversion</flagConversionsId>
			<importTimeZone>
				<timeZoneOffset>-10:00</timeZoneOffset>
			</importTimeZone>
		</general>
		<properties>
			<!-- Optional: If the external location ids are equal to the TimeSeriesUniqueIds then
            	set value to 'true'. This way it is possible to skip the GetTimeSeriesDescriptionList requests.
            	Default:=false
            -->
			<bool key="SkipDataSetList" value="false"/>
			<!-- Optional: Only used if SkipDataSetList=false. In order to retrieve timeSeriesUniqueIds it
            	is necessary to call the GetTimeSeriesDescriptionList function. This function can be called per location
            	or for all locations in one go. Depending on the number of timeSeries on the server it can
            	be necessary to loop per location.
            	Default:=true (to avoid server errors)
            -->
			<bool key="LoopOverLocations" value="true"/>
		</properties>
		<timeSeriesSet>
			<moduleInstanceId>ImportMeasured</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>H.obs</parameterId>
			<locationSetId>Aquarius.Ratings</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
			<synchLevel>1</synchLevel>
			<expiryTime unit="day" multiplier="365"/>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

...