Versions Compared

Key

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

...

The DDSC import function (<importType>DDSC</importType>) imports from the following REST service: https://api.ddsc.nl/api/v1v2/

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"?>
<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>DDSC</importType>
			<serverUrl>https://api.ddsc.nl/api/v1v2/timeseries</serverUrl>
			<user>user</user>
			<password>pw</password>
			<relativeViewPeriod unit="day" start="-14" end="0" startOverrulable="true" endOverrulable="false"/>
			<idMapId>IdImportDDSC</idMapId>
			<unitConversionsId>ImportUnitConversions</unitConversionsId>
			<missingValue>-9999</missingValue>
			<dataFeedId>DDSC</dataFeedId>
			<convertDatum>true</convertDatum>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>ImportDDSC</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>SH</parameterId>
			<locationSetId>DAM_SUB</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
			<synchLevel>1</synchLevel>
		</timeSeriesSet>
	</import>


</timeSeriesImportRun>

...

Example JSON file for timeseries

 

Code Block
xml
xml
 
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "url": "https://api.ddsc.nl/api/v2/timeseries/b6903937-14e4-4926-8e84-158185d4f32c/",
      "id": 14978": 20231,
      "uuid": "b6903937-14e4-4926-8e84-158185d4f32c",
      "name": "OMZD_29,9_BARO",
      "organisation_code": "b6903937-14e4-4926-8e84-158185d4f32c",
      "value_type": "float",
      "location": {
        "url": "https://api.ddsc.nl/api/v1v2/timeserieslocations/157a6c92cef6e07e-cf4bcfe9-422f4451-8d5a9caa-6aeceb01b43c6cd5cdb106a0/",
        "uuid": "157a6c92cef6e07e-cf4bcfe9-422f4451-8d5a9caa-6aeceb01b43c6cd5cdb106a0",
        "name": "GREB_BK_A1_SHOMZD meetraai DP29,9",
        "locationorganisation": {
          "uuidurl": "60d69cff-9ba1-4a4b-988e-7f9a0821948dhttps://api.ddsc.nl/api/v2/organisations/8e94ef601f0546a6adf74440d2ce856a/",
          "name": "Noorderzijlvest",
          "GREB_BK_A1"
unique_id": "8e94ef601f0546a6adf74440d2ce856a",
          "users_url": "https://api.ddsc.nl/api/v2/organisations/8e94ef601f0546a6adf74440d2ce856a/users/"
        },
        "latestorganisation_value_timestampcode": "2015-06-01T07:01:11.000000Z"cef6e07e-cfe9-4451-9caa-6cd5cdb106a0"
      },
      "latestparameter_referenced_valueunit": 6.212,{
        "eventsurl": "https://api.ddsc.nl/api/v2/v1parameterreferencedunits/events/157a6c92-cf4b-422f-8d5a-6aeceb01b43c355/",
        "value_typecode": "floatDRUK (mbar) LT",
        "parameter_short_display_name": "STIJGHTEDruk",
        "referenced_unit_short_display_name": "mbar",
        "description": "m",
        "annotationsdomain_values": 0 null
      },
      "owneraccess_modifier": "GrebbedijkCommon",
      "sourcesupplier": {
        "url": "https://api.ddsc.nl/api/v2/users/224/",
        "uuidusername": "76d9314f-0ddf-4fa6-a6b2-5b0e8cec9d78erik.peters",
        "first_name": "GREB_BK_A1Erik",
        } "last_name": "Peters",
    }
  ]
}

 

Example JSON events

 

Code Block
xmlxml
{
  "countemail": 168"e.peters@alertsolutions.nl",
    "next    "organisations_url": "https://api.ddsc.nl/api/v2/users/v1224/events/157a6c92-cf4b-422f-8d5a-6aeceb01b43c?start=2015-01-09T18%3A00%3A00.000Z&end=2015-01-19T18%3A00%3A00.000Z&page=2&format=json",
  "previous": null,
  "results": [
organisations/"
      },
      "supplier_code": "0201400D41912C8F.0P",
      "first_value_timestamp": 1372160208000,
      "last_value_timestamp": 1449720170000,
      "last_value": 1030.05,
      "events": [
        {
          "flagtimestamp": 1449366444000,
          "-1"max": 1013.6,
          "valuemin": 6.520999908447266,
  1013.6
        },
        {
    "datetime      "timestamp": 1449367344000,
 "2015-01-09T19:01:11.000000Z"
         "max": 1013.58,
          "min": 1013.58
        },
        {
          "flagtimestamp": 1449460953000,
          "-1"max": 1025.25,
          "valuemin": 6.568999767303467,1025.25
        },
        {
          "datetimetimestamp": 1449532960000,
          "max"2015-01-09T21:01:12.000000Z"
: 1029.21,
          "min": 1029.21
        },
        {
          "flagtimestamp": 1449568964000,
  "-1",
        "max": 1026.28,
          "valuemin": 6.586999893188477,
1026.28
        },
        {
          "datetimetimestamp": 1449662572000,
          "max"2015-01-09T23:01:11.000000Z"
: 1032.85,
          "min": 1032.85
        },
        {
          "flagtimestamp": 1449712971000,
    "-1",
      "max": 1031.05,
          "valuemin": 6.586999893188477,
1031.05
        },
        {
          "datetimetimestamp": "2015-01-10T00:01:12.000000Z"1449713871000,
          "max": 1030.65,
          "min": 1030.65
        },
        {
          "flagtimestamp": 1449714771000,
          "-1"max": 1030.54,
          "valuemin": 6.580999851226807,
1030.54
        },
        {
          "datetimetimestamp": 1449715671000,
         "2015-01-10T02:01:11.000000Z"
 "max": 1030.52,
          "min": 1030.52
        },
        {
          "flagtimestamp": "-1"1449716571000,
          "valuemax": 61030.58099985122680747,
          "datetimemin": "2015-01-10T03:01:10.000000Z"
1030.47
        },
        {
          "flagtimestamp": "-1"1449717471000,
          "valuemax": 61030.58099985122680735,
          "datetimemin": "2015-01-10T05:01:10.000000Z"
1030.35
        },
        {
          "flagtimestamp": "-1"1449718371000,
          "valuemax": 61030.57999992370605533,
          "datetimemin": "2015-01-10T06:01:33.000000Z"1030.33
        },
        {
          "flagtimestamp": "-1"1449719271000,
          "valuemax": 61030.57800006866455123,
          "datetimemin": "2015-01-10T07:01:10.000000Z"
1030.23
        },
        {
          "flagtimestamp": "-1"1449720170000,
          "valuemax": 61030.57999992370605505,
          "datetimemin": "2015-01-10T09:01:13.000000Z"1030.05
        }
      ]
    }
  ]
}

...

 

Java source code

DdscTimeSeriesServerParser.java

...