From 77532fee9f95a7a18a4d6935d5aee2131e1d4ce3 Mon Sep 17 00:00:00 2001 From: tamara Date: Tue, 27 Feb 2024 13:55:51 +0100 Subject: [PATCH] add codelist 265. Empty result? --- FarmmapsDownloadCL/DownloadCLInput.json | 3 +- FarmmapsDownloadCL/Models/CodelistsClasses.cs | 33 ++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/FarmmapsDownloadCL/DownloadCLInput.json b/FarmmapsDownloadCL/DownloadCLInput.json index be43c9c..42340f6 100644 --- a/FarmmapsDownloadCL/DownloadCLInput.json +++ b/FarmmapsDownloadCL/DownloadCLInput.json @@ -1,4 +1,5 @@ { - "codeLists": [ "CL022", "CL127", "CL263", "CL405", "CL251", "CL042" ] + //"codeLists": [ "CL022", "CL127", "CL263", "CL405", "CL251", "CL042" ], + "codeLists": [ "CL263", "CL265"] //"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 66f2cbe..1264e34 100644 --- a/FarmmapsDownloadCL/Models/CodelistsClasses.cs +++ b/FarmmapsDownloadCL/Models/CodelistsClasses.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Text; namespace FarmmapsDownloadCL.Models @@ -17,6 +18,7 @@ namespace FarmmapsDownloadCL.Models 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("CL265", new List { "vnd.farmmaps.itemtype.codelist.cl265", "CL265item" }); this.dictCl.Add("CL405", new List { "vnd.farmmaps.itemtype.codelist.cl405", "CL405item" }); } public string itemcode; @@ -86,7 +88,7 @@ namespace FarmmapsDownloadCL.Models { public CL263item() { - this.headers = new string[] { "codelist", "code", "eppoCode", "botanicName", "description", "description_fr", "description_nl", "cropGroupCode", "cropGroupName", "cultivationGroupCode", "cultivationGroupName" }; + this.headers = new string[] { "codelist", "code", "eppoCode", "botanicName", "description", "description_fr", "description_nl", "cropGroupCode", "cropGroupName", "subCropGroupCode", "subCropGroupName", "cultivationGroupCode", "cultivationGroupName" }; this.codelist = "CL263"; this.about = new string[] { "EDI-Crop, coderingslijst gewassoorten" }; } @@ -95,18 +97,39 @@ namespace FarmmapsDownloadCL.Models public string codelist { get; } public string[] about { get; } public string code { get; set; } - public string eppoCode { get; set; } - public string botanicName { get; set; } - public string description { get; set; } + public string eppoCode { get; set; } //? + public string botanicName { get; set; } //? + public string description { get; set; } //? public string description_nl { get; set; } public string description_fr { get; set; } public string cropGroupCode { get; set; } public string cropGroupName { get; set; } + public string subCropGroupCode { get; set; } + public string subCropGroupName { get; set; } public string cultivationGroupCode { get; set; } public string cultivationGroupName { get; set; } - public string composition { get; set; } + public string composition { get; set; } //? } + public class CL265item + { + public CL265item() + { + this.headers = new string[] { "Code", "Formaat", "Eenheid", "Waarde" }; + this.codelist = "CL265"; + this.about = new string[] { "EDI-Crop CL265: FarmCharacterictics, FieldCharacteristics, CropFieldCharacteristics, TreatmentCharacteristics", + "Betreft codelijst eigenschappen teelt en teelthandelingen CL265.Daar waar in kolom 'Waarde' wordt verwezen naar CL.., wordt de codelijst bedoeld die onder het betreffende nummer bekend is.", + "In het EDI-Crop bericht wordt de code gebruikt onder resp. CropFieldCharacteristic c.q.TreatmentCharacteristic middels de dataelementen PropertyVariableCode (invullen vanuit CL265) en PropertyVariableValue(voor de waarde)"}; + } + + public string[] headers { get; } + public string codelist { get; } + public string[] about { get; } + public string Code { get; set; } + public string Formaat { get; set; } + public string Eenheid { get; set; } + public string Waarde { get; set; } + } public class CL405item { public CL405item()