Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/DurationWaterlevel.java @ 9217:4e6111f87dda
header fix flood_duration
author | gernotbelger |
---|---|
date | Wed, 04 Jul 2018 10:32:18 +0200 |
parents | 3dae6b78e1da |
children | 83ebeb620b5a |
rev | line source |
---|---|
9145 | 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.flood_duration; | |
11 | |
12 import java.io.Serializable; | |
13 import java.text.NumberFormat; | |
14 | |
15 /** | |
16 * @author Domenico Nardi Tironi | |
17 * | |
18 */ | |
19 public class DurationWaterlevel implements Serializable { | |
20 | |
21 private static final long serialVersionUID = 1L; | |
22 | |
23 private final double w; | |
24 private final double q; | |
25 private final String bezeichnung; | |
26 private final int floodDurDaysPerYear; | |
27 | |
28 public DurationWaterlevel(final double w, final int floodDurDaysPerYear, final double q, final String bezeichnung) { | |
29 this.w = w; | |
30 this.q = q; | |
31 this.bezeichnung = bezeichnung; | |
32 this.floodDurDaysPerYear = floodDurDaysPerYear; | |
33 } | |
34 | |
9205
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
35 public double getWaterlevel() { |
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
36 return this.w; |
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
37 } |
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
38 |
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
39 public int getFloodDurDaysPerYear() { |
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
40 return this.floodDurDaysPerYear; |
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
41 } |
3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
gernotbelger
parents:
9145
diff
changeset
|
42 |
9145 | 43 public String getFloodDurDaysPerYearFormatted() { |
44 return String.valueOf(this.floodDurDaysPerYear); | |
45 } | |
46 | |
47 public String getBezeichnung() { | |
48 return this.bezeichnung; | |
49 } | |
50 | |
51 public String getQFormatted(final NumberFormat qFormatter) { | |
52 return qFormatter.format(this.q); | |
53 } | |
54 | |
55 public String getWFormatted(final NumberFormat wFormatter) { | |
56 return wFormatter.format(this.w); | |
57 } | |
58 | |
9217 | 59 // normally, the label is included in the type, but we need to replace the index ("_1") |
9145 | 60 public static final String getHeaderQ() { |
9217 | 61 return "sinfo.flood_duration.header.q_index"; |
9145 | 62 } |
63 | |
9217 | 64 public static final String getHeaderWPdf() { |
9145 | 65 return "sinfo.flood_duration.header.pdf.w_index"; |
66 } | |
67 | |
9217 | 68 public static final String getHeaderBezeichnPdf() { |
9145 | 69 return "sinfo.flood_duration.header.pdf.bezeichnung_index"; |
70 } | |
71 | |
9217 | 72 public static final String getHeaderFloodDurPerYearPdf() { |
9145 | 73 return "sinfo.flood_duration.header.pdf.fd_per_year_index"; |
74 } | |
9217 | 75 |
76 public static final String getHeaderWCsv() { | |
77 return "sinfo.flood_duration.header.w_index"; | |
78 } | |
79 | |
80 public static final String getHeaderBezeichnCsv() { | |
81 return "sinfo.flood_duration.header.bezeichnung_index"; | |
82 } | |
83 | |
84 public static final String getHeaderFloodDurPerYearCsv() { | |
85 return "sinfo.flood_duration.header.fd_per_year_index"; | |
86 } | |
87 | |
9145 | 88 } |