Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/DurationWaterlevel.java @ 9145:e6b63b2b41b9
sinfo.flood_duration pdf, csv, ui
author | gernotbelger |
---|---|
date | Tue, 12 Jun 2018 10:23:23 +0200 |
parents | |
children | 3dae6b78e1da |
comparison
equal
deleted
inserted
replaced
9144:7879c2ca8bd3 | 9145:e6b63b2b41b9 |
---|---|
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 | |
35 public String getFloodDurDaysPerYearFormatted() { | |
36 return String.valueOf(this.floodDurDaysPerYear); | |
37 } | |
38 | |
39 public String getBezeichnung() { | |
40 return this.bezeichnung; | |
41 } | |
42 | |
43 public String getQFormatted(final NumberFormat qFormatter) { | |
44 return qFormatter.format(this.q); | |
45 } | |
46 | |
47 public String getWFormatted(final NumberFormat wFormatter) { | |
48 return wFormatter.format(this.w); | |
49 } | |
50 | |
51 public static final String getHeaderQ() { | |
52 return "sinfo.flood_duration.header.q_index"; // kein extra-String für pdf | |
53 } | |
54 | |
55 public static final String getHeaderW() { | |
56 return "sinfo.flood_duration.header.pdf.w_index"; | |
57 } | |
58 | |
59 public static final String getHeaderBezeichn() { | |
60 return "sinfo.flood_duration.header.pdf.bezeichnung_index"; | |
61 } | |
62 | |
63 public static final String getHeaderFloodDurPerYear() { | |
64 return "sinfo.flood_duration.header.pdf.fd_per_year_index"; | |
65 } | |
66 } |