From 51c6ad5892663043810b2df0ad857f05eb6a88c3 Mon Sep 17 00:00:00 2001
From: Bhabesh <bhabesh.mukhopadhyay@nibio.no>
Date: Tue, 16 Jun 2020 15:30:57 +0200
Subject: [PATCH 1/3] Revert "Merge branch 'master' into
 norwegian_translations"

This reverts commit ad838f9a73c8d936e38a106a098b07dda84204e8.
-- 
GitLab


From fbf190447fadadadf543513cad2bbcc89a939f2b Mon Sep 17 00:00:00 2001
From: Bhabesh <bhabesh.mukhopadhyay@nibio.no>
Date: Thu, 18 Jun 2020 08:15:03 +0200
Subject: [PATCH 2/3] Usage and sample configuration

Added descriptive text for technical usage and sample configuration
---
 .../alternariamodel/AlternariaModel.java      |  2 +-
 .../model/alternariamodel/texts.properties    | 33 ++++++++++++++++++-
 2 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java b/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java
index 2d10266..0e5b5bc 100644
--- a/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java
+++ b/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java
@@ -361,7 +361,7 @@ public class AlternariaModel extends I18nImpl implements Model{
          *
          * date        : Expression date is undefined on line 20, column 19 in Templates/Classes/Code/GeneratedMethodBody. Expression time is undefined on line 20, column 27 in Templates/Classes/Code/GeneratedMethodBody.
          */
-        return "TODO";
+        return this.getText("sampleconfig", Model.DEFAULT_LANGUAGE);
     }
 
     /**
diff --git a/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties b/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties
index 6dd90a7..a878e05 100644
--- a/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties
+++ b/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties
@@ -19,7 +19,13 @@ name=TOMCAST (FAST - Dew) model
 description=TODO
 
 statusInterpretation=The model's warning status will be green (no infection risk) until the accumulated risk value is 5 points below the threshold value that signifies an infection risk. From that value and until the threshold value is exceeded, the warning will be yellow (possible infection risk), and above that, the warning status will be red (high infection risk).
-usage=TODO
+usage=Description of required input parameters:\n\
+timeZone - What timezone the calculation is for. Necessary to calculate daily values from the provided hourly values. \
+See this list of time zones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones (Column "TZ")\n\
+observations - list of weather data. The following parameters are required:\n\
+* TM - Average temperature (Degrees Celcius)\n\
+* BT - Leaf wetness (Minutes/hour) (IF you don't have leaf wetness, you must provide UM (relative humidity). Then we will calculate the leaf wetness.\n\
+sprayingDate - (Optional) Farmers can choose multiple spraying dates (upto four spraying dates).
 license= Copyright (c) 2020 NIBIO <http://www.nibio.no/>. \
 \
 This file is part of Altenaria Model. \
@@ -36,3 +42,28 @@ NIBIO Open Source License for more details. \
 You should have received a copy of the NIBIO Open Source License \
 along with Altenaria Model.  If not, see <http://www.nibio.no/licenses/>.
 
+sampleconfig={                                                          \n\
+\t    "loginInfo": {                                                      \n\
+\t\t        "username": "example",                                          \n\
+\t\t        "password": "example"                                           \n\
+\t    },                                                                  \n\
+\t    "modelId": "ALTERNARIA",                                            \n\
+\t    "configParameters": {                                               \n\
+\t        "timeZone": "Europe/Oslo",                                      \n\
+\t        "observations": [                                               \n\
+\t            {                                                           \n\
+\t\t                "elementMeasurementTypeId": "TM",                       \n\
+\t\t                "logIntervalId": 1,                                     \n\
+\t\t                "timeMeasured": "2018-08-11T00:00:00+02:00",            \n\
+\t\t                "value": 10.46                                          \n\
+\t            },                                                          \n\
+\t            {                                                           \n\
+\t\t                "elementMeasurementTypeId": "BT",                       \n\
+\t\t                "logIntervalId": 1,                                     \n\
+\t\t                "timeMeasured": "2018-08-11T00:00:00+02:00",            \n\
+\t\t                "value": 60.0                                           \n\
+\t            }                                                           \n\
+\t        ]                                                               \n\
+\t    }                                                                   \n\
+ }                                                                      \n\
+
-- 
GitLab


From dc1fe49924d2a09f9e17f168344d2e453cba0253 Mon Sep 17 00:00:00 2001
From: Bhabesh <bhabesh.mukhopadhyay@nibio.no>
Date: Thu, 18 Jun 2020 10:49:23 +0200
Subject: [PATCH 3/3] sprayingDates added

sprayingDates added in sample configuration
---
 .../nibio/vips/model/alternariamodel/AlternariaModel.java  | 1 +
 .../no/nibio/vips/model/alternariamodel/texts.properties   | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java b/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java
index 0e5b5bc..38368d7 100644
--- a/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java
+++ b/src/main/java/no/nibio/vips/model/alternariamodel/AlternariaModel.java
@@ -47,6 +47,7 @@ import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.TimeZone;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import no.nibio.vips.entity.ModelConfiguration;
 import no.nibio.vips.entity.Result;
diff --git a/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties b/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties
index a878e05..02d03fa 100644
--- a/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties
+++ b/src/main/resources/no/nibio/vips/model/alternariamodel/texts.properties
@@ -63,7 +63,12 @@ sampleconfig={                                                          \n\
 \t\t                "timeMeasured": "2018-08-11T00:00:00+02:00",            \n\
 \t\t                "value": 60.0                                           \n\
 \t            }                                                           \n\
-\t        ]                                                               \n\
+\t        ],                                                               \n\
+\t        "sprayingDates": [                                                \n\
+\t\t            "2018-07-02T22:00:00Z",                                     \n\
+\t\t            "2018-07-30T22:00:00Z",                                     \n\
+\t\t            "2018-09-04T22:00:00Z"                                      \n\
+\t        ]                                                                 \n\
 \t    }                                                                   \n\
  }                                                                      \n\
 
-- 
GitLab