Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
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
VIPSLogic
Commits
d282a374
Commit
d282a374
authored
1 year ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
feat(observations): Add observationTimeSeriesId to json response
parent
f65a710c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/no/nibio/vips/logic/entity/Observation.java
+6
-0
6 additions, 0 deletions
src/main/java/no/nibio/vips/logic/entity/Observation.java
src/main/java/no/nibio/vips/logic/entity/rest/ObservationListItem.java
+17
-1
17 additions, 1 deletion
.../no/nibio/vips/logic/entity/rest/ObservationListItem.java
with
23 additions
and
1 deletion
src/main/java/no/nibio/vips/logic/entity/Observation.java
+
6
−
0
View file @
d282a374
...
@@ -558,6 +558,11 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
...
@@ -558,6 +558,11 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
this
.
observationIllustrationSet
=
observationIllustrationSet
;
this
.
observationIllustrationSet
=
observationIllustrationSet
;
}
}
@Transient
public
Integer
getObservationTimeSeriesId
()
{
return
observationTimeSeries
!=
null
?
observationTimeSeries
.
getObservationTimeSeriesId
()
:
null
;
}
/**
/**
* @return the observation time series
* @return the observation time series
*/
*/
...
@@ -686,6 +691,7 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
...
@@ -686,6 +691,7 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
}
}
return
new
ObservationListItem
(
return
new
ObservationListItem
(
this
.
getObservationId
(),
this
.
getObservationId
(),
this
.
getObservationTimeSeriesId
(),
this
.
getTimeOfObservation
(),
this
.
getTimeOfObservation
(),
this
.
getOrganismId
(),
this
.
getOrganismId
(),
!
this
.
getOrganism
().
getLocalName
(
locale
).
trim
().
isBlank
()
?
this
.
getOrganism
().
getLocalName
(
locale
)
:
this
.
getOrganism
().
getLatinName
(),
!
this
.
getOrganism
().
getLocalName
(
locale
).
trim
().
isBlank
()
?
this
.
getOrganism
().
getLocalName
(
locale
)
:
this
.
getOrganism
().
getLatinName
(),
...
...
This diff is collapsed.
Click to expand it.
src/main/java/no/nibio/vips/logic/entity/rest/ObservationListItem.java
+
17
−
1
View file @
d282a374
...
@@ -27,7 +27,7 @@ import no.nibio.vips.observationdata.ObservationDataSchema;
...
@@ -27,7 +27,7 @@ import no.nibio.vips.observationdata.ObservationDataSchema;
* @author Tor-Einar Skog <tor-einar.skog@nibio.no>
* @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/
*/
public
class
ObservationListItem
implements
Comparable
{
public
class
ObservationListItem
implements
Comparable
{
private
Integer
observationId
,
organismId
,
cropOrganismId
;
private
Integer
observationId
,
observationTimeSeriesId
,
organismId
,
cropOrganismId
;
private
Date
timeOfObservation
;
private
Date
timeOfObservation
;
private
String
organismName
,
cropOrganismName
;
private
String
organismName
,
cropOrganismName
;
private
String
geoInfo
;
private
String
geoInfo
;
...
@@ -40,6 +40,7 @@ public class ObservationListItem implements Comparable{
...
@@ -40,6 +40,7 @@ public class ObservationListItem implements Comparable{
public
ObservationListItem
(
public
ObservationListItem
(
Integer
observationId
,
Integer
observationId
,
Integer
observationTimeSeriesId
,
Date
timeOfObservation
,
Date
timeOfObservation
,
Integer
organismId
,
Integer
organismId
,
String
organismName
,
String
organismName
,
...
@@ -54,6 +55,7 @@ public class ObservationListItem implements Comparable{
...
@@ -54,6 +55,7 @@ public class ObservationListItem implements Comparable{
ObservationDataSchema
observationDataSchema
ObservationDataSchema
observationDataSchema
){
){
this
.
observationId
=
observationId
;
this
.
observationId
=
observationId
;
this
.
observationTimeSeriesId
=
observationTimeSeriesId
;
this
.
timeOfObservation
=
timeOfObservation
;
this
.
timeOfObservation
=
timeOfObservation
;
this
.
organismId
=
organismId
;
this
.
organismId
=
organismId
;
this
.
organismName
=
organismName
;
this
.
organismName
=
organismName
;
...
@@ -93,6 +95,20 @@ public class ObservationListItem implements Comparable{
...
@@ -93,6 +95,20 @@ public class ObservationListItem implements Comparable{
this
.
observationId
=
observationId
;
this
.
observationId
=
observationId
;
}
}
/**
* @return the observationTimeSeriesId
*/
public
Integer
getObservationTimeSeriesId
()
{
return
observationTimeSeriesId
;
}
/**
* @param observationTimeSeriesId the observationTimeSeriesId to set
*/
public
void
setObservationTimeSeriesId
(
Integer
observationTimeSeriesId
)
{
this
.
observationTimeSeriesId
=
observationTimeSeriesId
;
}
/**
/**
* @return the timeOfObservation
* @return the timeOfObservation
*/
*/
...
...
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