Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claudio Schaad <c.schaad@pog.ch> Co-committed-by: Claudio Schaad <c.schaad@pog.ch>
20 lines
849 B
C#
20 lines
849 B
C#
using Schaad.OpenData.Watercraft.Models;
|
|
|
|
namespace Schaad.OpenData.Watercraft.Analysis;
|
|
|
|
public sealed record VesselDimension(string Key, string Label, Func<Vessel, string> Categorize)
|
|
{
|
|
public const string NoEngine = "Ohne Motor";
|
|
public const string Unknown = "Unbekannt";
|
|
public const string NotSpecified = "Keine Angabe";
|
|
public const string NoSpecialUse = "Ohne besondere Verwendung";
|
|
|
|
public static IReadOnlyList<VesselDimension> All { get; } =
|
|
[
|
|
new("type", "Schiffsart", v => v.Type ?? Unknown),
|
|
new("propulsion", "Antrieb", v => v.Propulsion ?? Unknown),
|
|
new("fuel", "Treibstoff", v => v.Fuel ?? NoEngine),
|
|
new("emission", "Abgasnorm", v => v.EmissionGroup ?? (v.Fuel is null ? NoEngine : NotSpecified)),
|
|
new("use", "Verwendung", v => v.SpecialUse ?? NoSpecialUse),
|
|
];
|
|
}
|