Skip to content

Plugins Reference

A plugin is a concrete implementation of a Domain Services abstraction. Technically, an abstraction is represented by an interface, for example ITimeSeriesRepository, or an abstract base class, for example BaseTimeSeriesRepository. The abstractions serve as extensibility points for Domain Services. Typically, plugins are technology-specific, for example an ITimeSeriesRepository-implementation that serve as an adaptor to DIMS.CORE. All technology-specific plugins are gathered in their own assembly (DLL). Such an assembly is called a provider. For example the DIMS.CORE provider contains all the DIMS.CORE-specific plugins.

A few plugins are not technology-specific, because a 3rd party API is not needed to implement it. One such example is a simple CSV-file based implementation of ITimeSeriesRepository. These plugins are defined in the same assembly that defines the abstractions themselves. So for example the CSV-file based time series respository can be found in the DHI.Services.TimeSeries assembly itself. For the same reason, this reference is separated into the default plugins, defined in the Domain Services assemblies themselves, and the technology-specific provider plugins.

Note

When configuring Web API connections most of the connection types support using the[AppData]-placeholder in connection strings. Very often data files are placed in the ASP.NET App_Data folder or sub folders to this. In this case, instead of giving the full path to the App_Data folder when defining the connection string, then the [AppData]-placeholder can be used - for example [AppData]dfs-files\my-files.dfs0. Then the [AppData]-placeholder will be resolved to the full folder path at runtime.

Note

In the below format descriptions for connection strings and entity IDs, the following syntax is used:

  • {...} denotes a placeholder - e.g. {path} must be replaced with a path literal such as c:\data\my-file.dfs0
  • (...) denotes an alternative to the preceding - e.g. {ItemNo}(name:{ItemName}) means that either the item number (for example 2) or the item name (for example name:WaterLevel) must be given
  • [...] denotes optional - e.g. [eumItem] means that an eum item can be given or not.

Note

Repository types support one or more of the following categories of methods:

  • Basic (e.g. Get)
  • Discrete (e.g Count, Contains, GetAll, GetIds)
  • Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
  • Updatable (e.g. Add, Remove, Update)

For each of the repository types it is shown which of these categories it supports. The listed methods are not necessarily the complete list of available methods.

Default plugins

Time Series

NuGet package: DHI.Services.TimeSeries

TimeSeriesRepository

Type name: DHI.Services.TimeSeries.CSV.TimeSeriesRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames) X
Updatable (e.g. Add, Remove, Update)
Format Example
ConnectionString Folder path C:\data\csv-files
Time series ID Time series full-name sub-folder/test.csv

UpdatableTimeSeriesRepository

Type name: DHI.Services.TimeSeries.CSV.UpdatableTimeSeriesRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update) X
Format Example Remarks
ConnectionString Folder path C:\data\csv-files
Time series ID The relative file path my-timeseries.csv The connection string and the ID must combine to the full file path to the CSV file.

Rasters

NuGet package: DHI.Services.Rasters

DelimitedAsciiRepository

Type name: DHI.Services.Rasters.Radar.DELIMITEDASCII.DelimitedAsciiRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds)
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example
ConnectionString {folderpath};{filepattern};{datetimeformat} C:\data\images;Radar33{{datetimeFormat}}.txt;yyyyMMddHHmm
Radar image ID DateTime DateTime.Now()

EsriAsciiRepository

Type name: DHI.Services.Rasters.Radar.ESRIASCII.EsriAsciiRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds)
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example
ConnectionString {folderpath};{filepattern};{datetimeformat} C:\data\images;Radar33{{datetimeFormat}}.ascii;yyyyMMddHHmm
Radar image ID DateTime DateTime.Now()

Jobs

NuGet package: DHI.Services.Jobs

WorkflowRepository

Type name: DHI.Services.Jobs.Workflows.WorkflowRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update) X
Format Example
ConnectionString File path C:\data\my-workflows.json
Workflow ID Workflow name my-workflow.

Provider plugins

MCLite

The MCLite provider is a lean provider for the MIKE WORKBENCH (aka. MIKE CUSTOMISED) database. It supports time series, spreadsheets and feature collections.

NuGet package: DHI.Services.MCLite

TimeSeriesRepository

Type name: DHI.Services.Provider.MCLite.TimeSeriesRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames) X
Updatable (e.g. Add, Remove, Update) X
Format Example
ConnectionString Standard MIKE WORKBENCH connection string database=my-database;host=localhost;dbflavour=PostgreSQL;port=5432;workspace=workspace1. database is either the PostgreSQL database or the path to the SQLite database. host is only applicable to PostgreSQL. dbflavour is either PostgreSQL or SQLite. port is only applicable to PostgreSQL is optional and defaults to 5432. workspace is optional and fefaults to workspace1
Time series ID The time series full-name group/sub-group/my-timeseries

SpreadsheetRepository

Type name: DHI.Services.Provider.MCLite.SpreadsheetRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames) X
Updatable (e.g. Add, Remove, Update) X
Format Example
ConnectionString Standard MIKE WORKBENCH connection string database=my-database;host=localhost;dbflavour=PostgreSQL;port=5432;workspace=workspace1. database is either the PostgreSQL database or the path to the SQLite database. host is only applicable to PostgreSQL. dbflavour is either PostgreSQL or SQLite. port is only applicable to PostgreSQL is optional and defaults to 5432. workspace is optional and fefaults to workspace1
Spreadsheet ID The spreadsheet full-name group/sub-group/my-spreadsheet

FeatureRepository

Type name: DHI.Services.Provider.MCLite.FeatureRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames) X
Updatable (e.g. Add, Remove, Update) X
Format Example
ConnectionString Standard MIKE WORKBENCH connection string database=my-database;host=localhost;dbflavour=PostgreSQL;port=5432;workspace=workspace1. database is either the PostgreSQL database or the path to the SQLite database. host is only applicable to PostgreSQL. dbflavour is either PostgreSQL or SQLite. port is only applicable to PostgreSQL is optional and defaults to 5432. workspace is optional and fefaults to workspace1
Feature collection ID The feature collection full-name group/sub-group/my-featurecollection

MIKECore

The MIKECore provider is a provider for MIKE file types such as dfs0, dfs2, dfsu and particle files. It supports time series in dfs0-, dfs2- and dfsu-files, time step data in dfs2-files, feature collections in dfs2- and dfsu-files and maps from dfs2-, dfsu- and particle-files.

NuGet package: DHI.Services.MIKECore

Dfs0GroupedTimeSeriesRepository

Type name: DHI.Services.Provider.MIKECore.Dfs0GroupedTimeSeriesRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames) X
Updatable (e.g. Add, Remove, Update) X
Format Example
ConnectionString Folder path C:\data
Time series ID {full-name};{item} dfs-files/test.dfs0;LevelTS

Dfs0TimeSeriesRepository

Type name: DHI.Services.Provider.MIKECore.Dfs0TimeSeriesRepository

Supported method categories Remarks
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update) Even if a time series as an entity cannot be added, removed or updated, the time series values are updatable.
Format Example Remarks
ConnectionString File path C:\data\my-data.dfs0
Time series ID {ItemNo}(name:{ItemName})[eum:{eumItem}] 2 The item can be identified by the item number OR the item name.

Dfs2FeatureRepository

Type name: DHI.Services.Provider.MIKECore.Dfs2FeatureRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example Remarks
ConnectionString File path OR folder path C:\data\my-data.dfs2
Feature collection ID [File={File};]DateTime={DateTime} DateTime=2017-12-13T030000 File is not required if the full file path is defined in the connection string. The DateTimeformat is yyyy-MM-ddTHHmmss.

Dfs2MapSource

Type name: DHI.Services.Provider.MIKECore.Dfs2MapSource

Format Example Remarks
ConnectionString File path OR folder path OR empty C:\data\my-data.dfs2 If the connection string does not contain the full file path, then the full file path or "the rest" of the file path (the relative file path or the file name - whatever is missing) has to be given as a filepath-parameter in a call to the GetMap() method.

The only supported coordinate system is 'EPSG:3857' (WGS 84/Pseudo-Mercator) used for rendering maps in Google Maps, OpenStreetMap, etc.

The following parameters are supported in the GetMap() method:

  • item (mandatory): An item number in the dfs2 file. item=0 returns the item vectors.
  • filepath (optional): The full- or relative path to the dfs2 file. If the full filepath is given in the connection string, this is not necessary.
  • timestamp (optional): A DateTime value for a timestep in the dfs2 file. If not given, or not existing, data for the first timestep vil be returned.

Dfs2TimeSeriesRepository

Type name: DHI.Services.Provider.MIKECore.Dfs2TimeSeriesRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds)
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example Remarks
ConnectionString File path C:\data\my-data.dfs2
Time series ID Item={item};ElementId={id}(Latitude={lat};Longitude={lon})(X={x};Y={y}) Item=PWD;X=123.4;Y=567.8 The location is specified in one of the following 3 ways: giving the ElementId OR Longitude and LatitudeOR X and Y coordinates.

Dfs2TimeStepServer

Type name: DHI.Services.Provider.MIKECore.Dfs2TimeStepServer

Format Example
ConnectionString File path C:\data\my-data.dfs2

DfsuFeatureRepository

Type name: DHI.Services.Provider.MIKECore.DfsuFeatureRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example Remarks
ConnectionString File path OR folder path C:\data\my-data.dfsu
Feature collection ID [File={File};Item={item};DateTime={datetime}] DateTime=2017-12-13T030000 File is not required if the full file path is defined in the connection string. If Item is not specified it will return all data in attributes. If DateTime is not specified, then the first time step is chosen. The DateTimeformat is yyyy-MM-ddTHHmmss.

DfsuMapSource

Type name: DHI.Services.Provider.MIKECore.DfsuMapSource

Format Example Remarks
ConnectionString File path OR folder path OR empty C:\data\my-data.dfsu If the connection string does not contain the full file path, then the full file path or "the rest" of the file path (the relative file path or the file name - whatever is missing) has to be given as a filepath-parameter in a call to the GetMap() method.

The only supported coordinate system is 'EPSG:3857' (WGS 84/Pseudo-Mercator) used for rendering maps in Google Maps, OpenStreetMap, etc.

The following parameters are supported in the GetMap() method:

  • item (mandatory): An item number in the dfsu file. item=0 returns the item vectors.
  • filepath (optional): The full- or relative path to the dfsu file. If the full filepath is given in the connection string, this is not necessary.
  • timestamp (optional): A DateTime value for a timestep in the dfsu file. If not given, or not existing, data for the first timestep vil be returned.

DfsuTimeSeriesRepository

Type name: DHI.Services.Provider.MIKECore.DfsuTimeSeriesRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds)
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example Remarks
ConnectionString File path C:\data\my-data.dfsu
Time series ID Item={item};ElementId={id}(Latitude={lat};Longitude={lon})(X={x};Y={y})[;LayerNumber{no}] Item=PWD;X=123.4;Y=567.8 The location is specified in one of the following 3 ways: giving the ElementId OR Longitude and Latitude OR X and Y coordinates. LayerNumber is only applicable for 3D dfsu files.

ParticleMapSource

Type name: DHI.Services.Provider.MIKECore.ParticleMapSource

Format Example Remarks
ConnectionString File path OR folder path OR empty C:\data\my-data.xml If the connection string does not contain the full file path, then the full file path or "the rest" of the file path (the relative file path or the file name - whatever is missing) has to be given as a filepath-parameter in a call to the GetMap() method.

Windows Workflow Foundation

The Windows Workflow Foundation provider is a provider of job execution using Windows Workflow Foundation.

NuGet package: DHI.Services.WF

RemoteWorker

Type name: DHI.Services.Provider.WF.RemoteWorker

DIMS.CORE

The DIMS.CORE provider is a provider of time series, feature collections (locations) and radar images in a DIMS.CORE database.

NuGet package: DHI.Services.DIMS

TimeSeriesRepository

Type name: DHI.Services.Provider.DIMS.TimeSeriesRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example
ConnectionString Standard DIMS.CORE token dimstest2016.dhi.dk;{BB729FC3-0135-11E5-BFFA-24FD526B9663};...
Time series ID The time series name my-timeseries

FeatureRepository

Type name: DHI.Services.Provider.DIMS.FeatureRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example Remarks
ConnectionString Standard DIMS.CORE token dimstest2016.dhi.dk;{BB729FC3-0135-11E5-BFFA-24FD526B9663};...
Feature collection ID locations locations A DIMS.CORE database always has one-and-only-one feature collection ID which is "locations". This feature collection is a collection of point features representing the locations of the individual time series in the database.

RadarImageRepository

Type name: DHI.Services.Provider.DIMS.RadarImageRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds)
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update)
Format Example Remarks
ConnectionString token={token};timeSeriesName={name} token=dimstest2016.dhi.dk;{BB729FC3-0135-11E5-BFFA-24FD526B9663};...;timeSeriesName=my-images The timeSeriesName is the name of the time series with the radar images.
Radar image ID DateTime DateTime.Now()

OpenXML

The OpenXML provider is a provider for Microsoft Office documents. Currently, it supports Excel spreadsheets.

NuGet package: DHI.Services.OpenXML

SpreadsheetRepository

Type name: DHI.Services.Provider.OpenXML.SpreadsheetRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames) X
Updatable (e.g. Add, Remove, Update) X
Format Example
ConnectionString Folder path C:\data
Spreadsheet ID The spreadsheet full-name spreadsheets/my-sheet.xlsx

ShapeFile

The ShapeFile provider is a provider of feature collections from ESRI shape files (.shp).

NuGet package: DHI.Services.ShapeFile

FeatureRepository

Type name: DHI.Services.Provider.ShapeFile.FeatureRepository

Supported method categories
Basic (e.g. Get) X
Discrete (e.g. Count, Contains, GetAll, GetIds) X
Grouped (e.g. ContainsGroup, GetByGroup, GetFullNames)
Updatable (e.g. Add, Remove, Update) X
Format Example Remarks
ConnectionString File path OR folder path C:\data\shape-files
Feature collection ID The full- or relative file path my-shapes.shp The connection string and the ID must combine to the full file path to the shape file.