Mercurial > dive4elements > river
diff backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightValue.java @ 9034:8aa7d9eaaa21
Added bed_height_values section heights height01 to height10
author | mschaefer |
---|---|
date | Mon, 30 Apr 2018 10:13:15 +0200 |
parents | 392bbcd8a88b |
children |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightValue.java Fri Apr 27 17:41:59 2018 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/ImportBedHeightValue.java Mon Apr 30 10:13:15 2018 +0200 @@ -32,6 +32,7 @@ protected Double soundingWidth; protected Double minHeight; protected Double maxHeight; + protected Double[] sectionHeight; protected BedHeightValue peer; @@ -46,9 +47,14 @@ this.soundingWidth = soundingWidth; this.minHeight = minHeight; this.maxHeight = maxHeight; + this.sectionHeight = new Double[10]; } + public void setSectionHeight(final int index, final Double value) { + this.sectionHeight[index - 1] = value; + } + public void storeDependencies(final BedHeight bedHeight) { getPeer(bedHeight); } @@ -76,6 +82,8 @@ if ((values == null) || values.isEmpty()) { this.peer = new BedHeightValue(bedHeight, this.station, this.height, this.uncertainty, this.dataGap, this.soundingWidth, this.minHeight, this.maxHeight); + for (int i = 1; i <= 10; i++) + this.peer.setSectionHeight(i, this.sectionHeight[i - 1]); session.save(this.peer); } else { this.peer = values.get(0);