From da808362c30ff16c44418a56fe73f64b83949172 Mon Sep 17 00:00:00 2001 From: Pepijn van Oort Date: Wed, 1 Nov 2023 12:32:05 +0100 Subject: [PATCH] Added codelist CL251: Codering teeltdoelen (CropProductionPurposeCode) --- FarmmapsDownloadCL/DownloadCLInput.json | 2 +- FarmmapsDownloadCL/Models/CodelistsClasses.cs | 22 +++++++++++++++++++ FarmmapsKPI/Models/CropRecordings.cs | 10 --------- 3 files changed, 23 insertions(+), 11 deletions(-) delete mode 100644 FarmmapsKPI/Models/CropRecordings.cs diff --git a/FarmmapsDownloadCL/DownloadCLInput.json b/FarmmapsDownloadCL/DownloadCLInput.json index 0cfa53f..be43c9c 100644 --- a/FarmmapsDownloadCL/DownloadCLInput.json +++ b/FarmmapsDownloadCL/DownloadCLInput.json @@ -1,4 +1,4 @@ { - "codeLists": [ "CL022", "CL127", "CL263", "CL405", "CL042" ] + "codeLists": [ "CL022", "CL127", "CL263", "CL405", "CL251", "CL042" ] //"DownloadFolder": "Downloads", //"C:\\hugoschrererdir\\kpidir\\", // "Downloads", -> if you just put "Downloads" the program will download to somewhere in ..\FarmMapsApiClient_WURtest\FarmmapsDataDownload\bin\Debug\netcoreapp3.1\Downloads\ } \ No newline at end of file diff --git a/FarmmapsDownloadCL/Models/CodelistsClasses.cs b/FarmmapsDownloadCL/Models/CodelistsClasses.cs index b53615a..66f2cbe 100644 --- a/FarmmapsDownloadCL/Models/CodelistsClasses.cs +++ b/FarmmapsDownloadCL/Models/CodelistsClasses.cs @@ -15,6 +15,7 @@ namespace FarmmapsDownloadCL.Models //then below create a new CLxxxitem with fieldnames as you see them in the just downloaded new codelist this.dictCl.Add("CL022", new List { "vnd.farmmaps.itemtype.codelist.cl022", "CL022item" }); this.dictCl.Add("CL127", new List { "vnd.farmmaps.itemtype.codelist.cl127", "CL127item" }); + this.dictCl.Add("CL251", new List { "vnd.farmmaps.itemtype.codelist.cl251", "CL251item" }); this.dictCl.Add("CL263", new List { "vnd.farmmaps.itemtype.codelist.cl263", "CL263item" }); this.dictCl.Add("CL405", new List { "vnd.farmmaps.itemtype.codelist.cl405", "CL405item" }); } @@ -60,6 +61,27 @@ namespace FarmmapsDownloadCL.Models public string culturalPracticeLevel1 { get; set; } public string culturalPracticeLevel2 { get; set; } } + public class CL251item + { + public CL251item() + { + this.headers = new string[] { "codelist", "code", "rvo", "active", "primary", "description", "description_fr", "description_nl" }; + this.codelist = "CL251"; + this.about = new string[] { "Codering teeltdoelen (CropProductionPurposeCode)", "primary: 1 = primary; 2 = secondary", "rvo: 1 = yes; 0 = no" }; + } + + public string[] headers { get; } + public string codelist { get; } + public string[] about { get; } + public string code { get; set; } + public string rvo { get; set; } + public string active { get; set; } + public string primary { get; set; } + public string description { get; set; } + public string description_nl { get; set; } + public string description_fr { get; set; } + + } public class CL263item { public CL263item() diff --git a/FarmmapsKPI/Models/CropRecordings.cs b/FarmmapsKPI/Models/CropRecordings.cs deleted file mode 100644 index 61e667f..0000000 --- a/FarmmapsKPI/Models/CropRecordings.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace FarmmapsKPI.Models -{ - internal class CropRecordings - { - } -}