Skip to content
Snippets Groups Projects

Master

Merged Tor-Einar Skog requested to merge master into develop
5 files
+ 7
10
Compare changes
  • Side-by-side
  • Inline
Files
5
/*
* Copyright (c) 2018 NIBIO <http://www.nibio.no/>.
* Copyright (c) 2020 NIBIO <http://www.nibio.no/>.
*
* This file is part of SeptoriaHumidityModel.
* SeptoriaHumidityModel is free software: you can redistribute it and/or modify
@@ -19,7 +19,6 @@
package no.nibio.vips.model.septoriahumiditymodel;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.text.ParseException;
@@ -49,7 +48,7 @@ import no.nibio.vips.util.XDate;
/**
* Model developed by SEGES, Denmark
* @copyright 2018 <a href="http://www.nibio.no/">NIBIO</a>
* @copyright 2020 <a href="http://www.nibio.no/">NIBIO</a>
* @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/
public class SeptoriaHumidityModel extends I18nImpl implements Model {
@@ -311,9 +310,7 @@ public class SeptoriaHumidityModel extends I18nImpl implements Model {
// Object deserialization tool
ObjectMapper mapper = new ObjectMapper();
// TODO: Have defaults for these?
try
{
@@ -399,7 +396,7 @@ public class SeptoriaHumidityModel extends I18nImpl implements Model {
this.lastSprayingProtectionEnd = DateTimeInterval.getLastEndDate(Arrays.asList(new DateTimeInterval[]{this.protectionPeriod1,this.protectionPeriod2}));
}
List<WeatherObservation> observations = mapper.convertValue(config.getConfigParameter("observations"), new TypeReference<List<WeatherObservation>>(){});
List<WeatherObservation> observations = this.modelUtil.extractWeatherObservationList(config.getConfigParameter("observations"));
for(WeatherObservation o:observations)
{
switch(o.getElementMeasurementTypeId())
Loading