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

Bugfix: Add timestamp to feature properties of observations connected to POIs

parent e4849088
Branches
No related tags found
No related merge requests found
...@@ -635,18 +635,20 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse ...@@ -635,18 +635,20 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
*/ */
public ObservationListItem getListItem(String locale, ObservationDataSchema observationDataSchema) public ObservationListItem getListItem(String locale, ObservationDataSchema observationDataSchema)
{ {
// If geoInfo is from POI, need to add observationId // If geoInfo is from POI, need to add observationId and other stuff for observation rendering
if(this.location != null) if(this.location != null)
{ {
this.location.addProperty("observationId", this.getObservationId()); this.location.addProperty("observationId", this.getObservationId());
this.location.addProperty("isPositive", this.isPositive);
this.location.addProperty("timestamp", this.getTimeOfObservation().getTime());
} }
return new ObservationListItem( return new ObservationListItem(
this.getObservationId(), this.getObservationId(),
this.getTimeOfObservation(), this.getTimeOfObservation(),
this.getOrganismId(), this.getOrganismId(),
this.getOrganism().getLocalName(locale).trim() != "" ? this.getOrganism().getLocalName(locale) : this.getOrganism().getLatinName(), ! this.getOrganism().getLocalName(locale).trim().isBlank() ? this.getOrganism().getLocalName(locale) : this.getOrganism().getLatinName(),
this.getCropOrganismId(), this.getCropOrganismId(),
this.getCropOrganism().getLocalName(locale).trim() != "" ? this.getCropOrganism().getLocalName(locale) : this.getCropOrganism().getLatinName(), ! this.getCropOrganism().getLocalName(locale).trim().isBlank() ? this.getCropOrganism().getLocalName(locale) : this.getCropOrganism().getLatinName(),
// Specific geoInfo trumps location. This is to be interpreted // Specific geoInfo trumps location. This is to be interpreted
// as that the observation has been geographically masked by // as that the observation has been geographically masked by
// choice of the observer // choice of the observer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment