Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/common/GeneralResultType.java @ 9318:7b2b086e45f0
collision pdf details, ResultType refactoring, bezugswst result
author | gernotbelger |
---|---|
date | Fri, 27 Jul 2018 10:11:23 +0200 |
parents | 740d65e4aa14 |
children |
comparison
equal
deleted
inserted
replaced
9317:61b5de0b673b | 9318:7b2b086e45f0 |
---|---|
34 @Override | 34 @Override |
35 protected NumberFormat createFormatter(final CallContext context) { | 35 protected NumberFormat createFormatter(final CallContext context) { |
36 return Formatter.getWaterlevelKM(context); | 36 return Formatter.getWaterlevelKM(context); |
37 } | 37 } |
38 }; | 38 }; |
39 public static final GeneralResultType waterlevelLabel = new GeneralResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_LABEL_HEADER) { | |
40 private static final long serialVersionUID = 1L; | |
41 | |
42 @Override | |
43 public String exportValue(final CallContext context, final Object value) { | |
44 return exportStringValue(value); | |
45 } | |
46 | |
47 @Override | |
48 protected NumberFormat createFormatter(final CallContext context) { | |
49 throw new UnsupportedOperationException(); | |
50 } | |
51 }; | |
39 | 52 |
40 public static final GeneralResultType date = new GeneralResultType(I18NStrings.UNIT_NONE, I18NStrings.CSV_META_DATE) { | 53 public static final GeneralResultType date = new GeneralResultType(I18NStrings.UNIT_NONE, I18NStrings.CSV_META_DATE) { |
54 @Override | |
55 public String exportValue(final CallContext context, final Object value) { | |
56 return exportDateValue(context, (Date) value); | |
57 } | |
58 | |
59 @Override | |
60 protected NumberFormat createFormatter(final CallContext context) { | |
61 throw new UnsupportedOperationException(); | |
62 } | |
63 }; | |
64 | |
65 public static final GeneralResultType dateShort = new GeneralResultType(I18NStrings.UNIT_NONE, "sinfo.export.csv.meta.date") { | |
41 @Override | 66 @Override |
42 public String exportValue(final CallContext context, final Object value) { | 67 public String exportValue(final CallContext context, final Object value) { |
43 return exportDateValue(context, (Date) value); | 68 return exportDateValue(context, (Date) value); |
44 } | 69 } |
45 | 70 |
85 @Override | 110 @Override |
86 protected NumberFormat createFormatter(final CallContext context) { | 111 protected NumberFormat createFormatter(final CallContext context) { |
87 return Formatter.getWaterlevelQ(context); | 112 return Formatter.getWaterlevelQ(context); |
88 } | 113 } |
89 }; | 114 }; |
115 | |
116 public static final GeneralResultType gaugeLabel = new GeneralResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_GAUGE_HEADER) { | |
117 private static final long serialVersionUID = 1L; | |
118 | |
119 @Override | |
120 public String exportValue(final CallContext context, final Object value) { | |
121 return exportStringValue(value); | |
122 } | |
123 | |
124 @Override | |
125 protected NumberFormat createFormatter(final CallContext context) { | |
126 throw new UnsupportedOperationException(); | |
127 } | |
128 }; | |
129 | |
130 public static final GeneralResultType gaugeLabelCm = new GeneralResultType(I18NStrings.UNIT_NONE, "chart.reference.curve.x.axis.in.cm") { | |
131 private static final long serialVersionUID = 1L; | |
132 | |
133 @Override | |
134 public String exportValue(final CallContext context, final Object value) { | |
135 return exportStringValue(value); | |
136 } | |
137 | |
138 @Override | |
139 protected NumberFormat createFormatter(final CallContext context) { | |
140 throw new UnsupportedOperationException(); | |
141 } | |
142 }; | |
90 } | 143 } |