Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/util/BedHeightInfo.java @ 8942:11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
author | gernotbelger |
---|---|
date | Fri, 09 Mar 2018 18:47:06 +0100 |
parents | a66f2a7c4f84 |
children | 5d5d482da3e9 |
rev | line source |
---|---|
8877 | 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
8894 | 10 package org.dive4elements.river.artifacts.sinfo.util; |
8877 | 11 |
8884 | 12 import java.io.Serializable; |
8942
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
13 import java.math.BigDecimal; |
8884 | 14 |
8877 | 15 import org.dive4elements.river.model.BedHeight; |
16 | |
17 /** | |
18 * Basic infos about a {@link BedHeight}. | |
19 * | |
20 * @author Gernot Belger | |
21 */ | |
8894 | 22 public final class BedHeightInfo implements Serializable { |
8884 | 23 |
24 private static final long serialVersionUID = 1L; | |
8877 | 25 |
26 private final Integer year; | |
27 | |
28 private final String description; | |
29 | |
30 private final String type; | |
31 | |
8882 | 32 private final String evaluationBy; |
33 | |
8877 | 34 private final String locationSystem; |
35 | |
8879 | 36 private final String curElevationModelUnit; |
8877 | 37 |
8879 | 38 private final String oldElevationModelUnit; |
8877 | 39 |
8942
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
40 private final BigDecimal from; |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
41 |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
42 private final BigDecimal to; |
8882 | 43 |
8877 | 44 public static BedHeightInfo from(final BedHeight bedHeight) { |
45 return new BedHeightInfo(bedHeight); | |
46 } | |
47 | |
48 private BedHeightInfo(final BedHeight bedHeight) { | |
49 this.year = bedHeight.getYear(); | |
50 this.description = bedHeight.getDescription(); | |
51 this.type = bedHeight.getType().getName(); | |
8882 | 52 this.evaluationBy = bedHeight.getEvaluationBy(); |
8877 | 53 this.locationSystem = bedHeight.getLocationSystem().getName(); |
8879 | 54 this.curElevationModelUnit = bedHeight.getCurElevationModel().getUnit().getName(); |
55 this.oldElevationModelUnit = bedHeight.getCurElevationModel().getUnit().getName(); | |
8942
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
56 |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
57 this.from = bedHeight.getRange().getA(); |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
58 this.to = bedHeight.getRange().getB(); |
8877 | 59 } |
60 | |
61 public Integer getYear() { | |
62 return this.year; | |
63 } | |
64 | |
65 public String getDescription() { | |
66 return this.description; | |
67 } | |
68 | |
69 public String getType() { | |
70 return this.type; | |
71 } | |
72 | |
8882 | 73 public String getEvaluationBy() { |
74 return this.evaluationBy; | |
75 } | |
76 | |
8877 | 77 public String getLocationSystem() { |
78 return this.locationSystem; | |
79 } | |
80 | |
8879 | 81 public String getCurElevationModelUnit() { |
82 return this.curElevationModelUnit; | |
8877 | 83 } |
84 | |
8879 | 85 public String getOldElevationModelUnit() { |
86 return this.oldElevationModelUnit; | |
8877 | 87 } |
8942
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
88 |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
89 public BigDecimal getFrom() { |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
90 return this.from; |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
91 } |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
92 |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
93 public BigDecimal getTo() { |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
94 return this.to; |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
95 } |
11bf13cf0463
Minor changes to tkh calculation. Loading default bed heights form config file.
gernotbelger
parents:
8894
diff
changeset
|
96 } |