Skip to content
Snippets Groups Projects

Fixing deserialization of Weather data

Merged Tor-Einar Skog requested to merge master into develop
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -33,6 +33,7 @@ import no.nibio.vips.model.ConfigValidationException;
import no.nibio.vips.model.Model;
import no.nibio.vips.model.ModelExcecutionException;
import no.nibio.vips.model.ModelId;
import no.nibio.vips.util.ModelUtil;
import no.nibio.vips.util.WeatherElements;
import no.nibio.vips.util.WeatherUtil;
import no.nibio.vips.util.XDate;
@@ -219,7 +220,7 @@ public class SeptoriaReferenceHumidityModel implements Model {
public void setConfiguration(ModelConfiguration config) throws ConfigValidationException {
ObjectMapper mapper = new ObjectMapper();
this.timeZone = TimeZone.getTimeZone((String) config.getConfigParameter("timeZone"));
this.observations = mapper.convertValue(config.getConfigParameter("observations"), new TypeReference<List<WeatherObservation>>(){});
this.observations = new ModelUtil().extractWeatherObservationList(config.getConfigParameter("observations"));
}
}
Loading