comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/util/BedHeightInfo.java @ 8894:a66f2a7c4f84

SINFO FlowDepth - slight code cleanup
author gernotbelger
date Thu, 15 Feb 2018 18:40:40 +0100
parents artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/BedHeightInfo.java@7a8c12706834
children 11bf13cf0463
comparison
equal deleted inserted replaced
8893:ffebc94cf679 8894:a66f2a7c4f84
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 */
10 package org.dive4elements.river.artifacts.sinfo.util;
11
12 import java.io.Serializable;
13
14 import org.dive4elements.river.model.BedHeight;
15
16 /**
17 * Basic infos about a {@link BedHeight}.
18 *
19 * @author Gernot Belger
20 */
21 public final class BedHeightInfo implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 private final Integer year;
26
27 private final String description;
28
29 private final String type;
30
31 private final String evaluationBy;
32
33 private final String locationSystem;
34
35 private final String curElevationModelUnit;
36
37 private final String oldElevationModelUnit;
38
39
40 public static BedHeightInfo from(final BedHeight bedHeight) {
41 return new BedHeightInfo(bedHeight);
42 }
43
44 private BedHeightInfo(final BedHeight bedHeight) {
45 this.year = bedHeight.getYear();
46 this.description = bedHeight.getDescription();
47 this.type = bedHeight.getType().getName();
48 this.evaluationBy = bedHeight.getEvaluationBy();
49 this.locationSystem = bedHeight.getLocationSystem().getName();
50 this.curElevationModelUnit = bedHeight.getCurElevationModel().getUnit().getName();
51 this.oldElevationModelUnit = bedHeight.getCurElevationModel().getUnit().getName();
52 }
53
54 public Integer getYear() {
55 return this.year;
56 }
57
58 public String getDescription() {
59 return this.description;
60 }
61
62 public String getType() {
63 return this.type;
64 }
65
66 public String getEvaluationBy() {
67 return this.evaluationBy;
68 }
69
70 public String getLocationSystem() {
71 return this.locationSystem;
72 }
73
74 public String getCurElevationModelUnit() {
75 return this.curElevationModelUnit;
76 }
77
78 public String getOldElevationModelUnit() {
79 return this.oldElevationModelUnit;
80 }
81 }

http://dive4elements.wald.intevation.org