Skip to content
Snippets Groups Projects
Commit a67e37a5 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Add model usage text

parent 1b18eb39
No related branches found
No related tags found
No related merge requests found
...@@ -207,12 +207,72 @@ public class SeptoriaReferenceHumidityModel implements Model { ...@@ -207,12 +207,72 @@ public class SeptoriaReferenceHumidityModel implements Model {
@Override @Override
public String getModelUsage(String language) { public String getModelUsage(String language) {
return "TODO"; return "Description of required input parameters:\n" +
"\n" +
"timeZone - What timezone the calculation is for. See this list of time zones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones (Column \"TZ\")\n" +
"\n" +
"observations - list of weather data. The following parameters are required:\n" +
"* BT - Leaf wetness (minutes/hour)\n" +
"* TM - Mean temp (Celcius)\n" +
"* UM - Relative humidity (%)\n" +
"* RR - Rainfall (mm)\n" +
"\n" +
"The weather data must be hourly data";
} }
@Override @Override
public String getSampleConfig() { public String getSampleConfig() {
return "TODO"; return "{\n" +
" \"loginInfo\":{\n" +
" \"username\":\"example\",\n" +
" \"password\":\"example\"\n" +
" },\n" +
" \"modelId\":\"SEPAPIICOL\",\n" +
" \"configParameters\":{\n" +
" \"timeZone\":\"Europe/Oslo\",\n" +
" \"observations\": [{\n" +
" \"elementMeasurementTypeId\": \"TM\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T22:00:00Z\",\n" +
" \"value\": 12.96\n" +
" }, {\n" +
" \"elementMeasurementTypeId\": \"BT\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T22:00:00Z\",\n" +
" \"value\": 0.0\n" +
" }, {\n" +
" \"elementMeasurementTypeId\": \"UM\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T22:00:00Z\",\n" +
" \"value\": 77.93\n" +
" }, {\n" +
" \"elementMeasurementTypeId\": \"RR\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T22:00:00Z\",\n" +
" \"value\": 0.0\n" +
" }, {\n" +
" \"elementMeasurementTypeId\": \"TM\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T23:00:00Z\",\n" +
" \"value\": 12.4\n" +
" }, {\n" +
" \"elementMeasurementTypeId\": \"BT\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T23:00:00Z\",\n" +
" \"value\": 0.0\n" +
" }, {\n" +
" \"elementMeasurementTypeId\": \"UM\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T23:00:00Z\",\n" +
" \"value\": 81.3\n" +
" }, {\n" +
" \"elementMeasurementTypeId\": \"RR\",\n" +
" \"logIntervalId\": 1,\n" +
" \"timeMeasured\": \"2019-04-30T23:00:00Z\",\n" +
" \"value\": 0.0\n" +
" }]\n" +
" }\n" +
"}";
} }
@Override @Override
......
...@@ -66,6 +66,7 @@ public class SeptoriaReferenceHumidityModelTest { ...@@ -66,6 +66,7 @@ public class SeptoriaReferenceHumidityModelTest {
config.setConfigParameter("timeZone", "Europe/Oslo"); config.setConfigParameter("timeZone", "Europe/Oslo");
SeptoriaReferenceHumidityModel instance = new SeptoriaReferenceHumidityModel(); SeptoriaReferenceHumidityModel instance = new SeptoriaReferenceHumidityModel();
instance.setConfiguration(config); instance.setConfiguration(config);
//System.out.println(config.toJSON());
List<Result> result = instance.getResult(); List<Result> result = instance.getResult();
//result.forEach(r->System.out.println(r.toString())); //result.forEach(r->System.out.println(r.toString()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment