2021-05-13 20:03:07 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2021-07-20 23:06:09 +02:00
|
|
|
|
using TINK.Model.Station.Operator;
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
|
|
|
|
namespace TINK.Model.Station
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Holds station info. </summary>
|
|
|
|
|
public class Station : IStation
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Constructs a station object.</summary>
|
2021-07-20 23:06:09 +02:00
|
|
|
|
/// <param name="id">Id of the station.</param>
|
|
|
|
|
/// <param name="group">Group (TINK, Konrad) to which station is related.</param>
|
|
|
|
|
/// <param name="position">GPS- position of the station.</param>
|
|
|
|
|
/// <param name="stationName">Name of the station.</param>
|
2021-05-13 20:03:07 +02:00
|
|
|
|
public Station(
|
2021-07-20 23:06:09 +02:00
|
|
|
|
string id,
|
|
|
|
|
IEnumerable<string> group,
|
2022-01-22 18:16:10 +01:00
|
|
|
|
IPosition position,
|
2021-07-20 23:06:09 +02:00
|
|
|
|
string stationName = "",
|
|
|
|
|
Data operatorData = null)
|
2021-05-13 20:03:07 +02:00
|
|
|
|
{
|
2021-07-20 23:06:09 +02:00
|
|
|
|
Id = id;
|
|
|
|
|
Group = group ?? throw new ArgumentException("Can not construct station object. Group of stations must not be null.");
|
|
|
|
|
Position = position;
|
|
|
|
|
StationName = stationName ?? string.Empty;
|
|
|
|
|
OperatorData = operatorData ?? new Data();
|
2021-05-13 20:03:07 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the unique id of the station.c</summary>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
public string Id { get; }
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
|
|
|
|
/// <summary> Holds the group to which the station belongs.</summary>
|
|
|
|
|
public IEnumerable<string> Group { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary> Gets the name of the station.</summary>
|
|
|
|
|
public string StationName { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary> Holds the gps- position of the station.</summary>
|
2022-01-22 18:16:10 +01:00
|
|
|
|
public IPosition Position { get; }
|
2021-07-20 23:06:09 +02:00
|
|
|
|
|
|
|
|
|
/// <summary> Holds operator related info.</summary>
|
|
|
|
|
public IData OperatorData { get; }
|
2021-05-13 20:03:07 +02:00
|
|
|
|
}
|
|
|
|
|
}
|