Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java @ 9318:7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
author | gernotbelger |
---|---|
date | Fri, 27 Jul 2018 10:11:23 +0200 |
parents | |
children | 0a0937f33bb5 |
comparison
equal
deleted
inserted
replaced
9317:61b5de0b673b | 9318:7b2b086e45f0 |
---|---|
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.bundu; | |
11 | |
12 import java.text.NumberFormat; | |
13 | |
14 import org.dive4elements.artifacts.CallContext; | |
15 import org.dive4elements.river.artifacts.common.AbstractResultType; | |
16 import org.dive4elements.river.artifacts.common.I18NStrings; | |
17 import org.dive4elements.river.utils.Formatter; | |
18 | |
19 /** | |
20 * @author Domenico Nardi Tironi | |
21 * | |
22 */ | |
23 public abstract class BunduResultType extends AbstractResultType { | |
24 | |
25 protected BunduResultType(final String unit, final String csvHeader, final String pdfHeader) { | |
26 super(unit, csvHeader, pdfHeader); | |
27 } | |
28 | |
29 private static final long serialVersionUID = 1L; | |
30 | |
31 public static final BunduResultType bezugswst = new BunduResultType(I18NStrings.CSV_META_HEIGHT_UNIT_RIVER, "bundu.wst.export.csv.meta.header.bezugswst", | |
32 "bundu.wst.export.csv.meta.header.bezugswst") { // UNIT needed? | |
33 private static final long serialVersionUID = 1L; | |
34 | |
35 @Override | |
36 public String exportValue(final CallContext context, final Object value) { | |
37 final double doubleValue = asDouble(value); | |
38 return exportDoubleValue(context, doubleValue); | |
39 } | |
40 | |
41 @Override | |
42 protected NumberFormat createFormatter(final CallContext context) { | |
43 return Formatter.getWaterlevelQ(context); // Richtiges Format? TODO check! | |
44 } | |
45 }; | |
46 | |
47 } |