Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Model_LYGUSRUGUL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
Models
Java
Model_LYGUSRUGUL
Commits
ee572925
Commit
ee572925
authored
5 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Fixing deserialization of Weather data
parent
e5a0dd6c
No related branches found
No related tags found
1 merge request
!1
Fixing deserialization of Weather data
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/nibio/vips/model/lygusrugulipennismodel/LygusRugulipennisModel.java
+1
-2
1 addition, 2 deletions
.../model/lygusrugulipennismodel/LygusRugulipennisModel.java
with
1 addition
and
2 deletions
src/main/java/no/nibio/vips/model/lygusrugulipennismodel/LygusRugulipennisModel.java
+
1
−
2
View file @
ee572925
...
@@ -220,7 +220,6 @@ public class LygusRugulipennisModel extends I18nImpl implements Model{
...
@@ -220,7 +220,6 @@ public class LygusRugulipennisModel extends I18nImpl implements Model{
public
void
setConfiguration
(
ModelConfiguration
config
)
throws
ConfigValidationException
{
public
void
setConfiguration
(
ModelConfiguration
config
)
throws
ConfigValidationException
{
this
.
dataMatrix
=
new
DataMatrix
();
this
.
dataMatrix
=
new
DataMatrix
();
ObjectMapper
mapper
=
new
ObjectMapper
();
// Setting timezone
// Setting timezone
this
.
timeZone
=
TimeZone
.
getTimeZone
((
String
)
config
.
getConfigParameter
(
"timeZone"
));
this
.
timeZone
=
TimeZone
.
getTimeZone
((
String
)
config
.
getConfigParameter
(
"timeZone"
));
// Importing weather data, creating collections
// Importing weather data, creating collections
...
@@ -230,7 +229,7 @@ public class LygusRugulipennisModel extends I18nImpl implements Model{
...
@@ -230,7 +229,7 @@ public class LygusRugulipennisModel extends I18nImpl implements Model{
// OR lastly hourly values of TM (not optimal, but better than nothing)
// OR lastly hourly values of TM (not optimal, but better than nothing)
List
<
WeatherObservation
>
TM
=
new
ArrayList
<>();
List
<
WeatherObservation
>
TM
=
new
ArrayList
<>();
WeatherUtil
wUtil
=
new
WeatherUtil
();
WeatherUtil
wUtil
=
new
WeatherUtil
();
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
)
for
(
WeatherObservation
o:
observations
)
{
{
switch
(
o
.
getElementMeasurementTypeId
())
switch
(
o
.
getElementMeasurementTypeId
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment