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 2d1026663b0d32f720ce619ebcb6f076623b24e8..38368d7699c6598ebc764b44f6d27ff7a84f0a1d 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; @@ -361,7 +362,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 6dd90a7645b5ed8a337335ba2bd1d1f0e42355b3..02d03fac9382a9f1fb65d5e61dea521263794cbe 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,33 @@ 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 "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\ +