Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java @ 9205:3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
author | gernotbelger |
---|---|
date | Mon, 02 Jul 2018 19:01:09 +0200 |
parents | b4402594213b |
children | 0dcd1cd41915 |
comparison
equal
deleted
inserted
replaced
9204:4f411c6ee3ae | 9205:3dae6b78e1da |
---|---|
41 "sinfo.export.flow_depth.pdf.header.waterlevel") { | 41 "sinfo.export.flow_depth.pdf.header.waterlevel") { |
42 private static final long serialVersionUID = 1L; | 42 private static final long serialVersionUID = 1L; |
43 | 43 |
44 @Override | 44 @Override |
45 public String exportValue(final CallContext context, final Object value) { | 45 public String exportValue(final CallContext context, final Object value) { |
46 // TODO Auto-generated method stub | 46 throw new UnsupportedOperationException(); |
47 return null; | 47 } |
48 } | 48 |
49 | 49 @Override |
50 @Override | 50 protected NumberFormat createFormatter(final CallContext context) { |
51 protected NumberFormat createFormatter(final CallContext context) { | 51 throw new UnsupportedOperationException(); |
52 // TODO Auto-generated method stub | |
53 return null; | |
54 } | 52 } |
55 | 53 |
56 }; | 54 }; |
57 | 55 |
58 public static final SInfoResultType floodDischarge = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.export.flood_duration.csv.header.discharge", | 56 public static final SInfoResultType floodDischarge = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.export.flood_duration.csv.header.discharge", |
85 protected NumberFormat createFormatter(final CallContext context) { | 83 protected NumberFormat createFormatter(final CallContext context) { |
86 return Formatter.getIntegerFormatter(context); | 84 return Formatter.getIntegerFormatter(context); |
87 } | 85 } |
88 }; | 86 }; |
89 | 87 |
90 public static final SInfoResultType mainValue1Duration = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.1.duration", | |
91 "sinfo.flood_duration.header.pdf.mainvalue.1.duration") { | |
92 private static final long serialVersionUID = 1L; | |
93 | |
94 @Override | |
95 public String exportValue(final CallContext context, final Object value) { | |
96 final double doubleValue = asDouble(value); | |
97 return exportDoubleValue(context, doubleValue); | |
98 } | |
99 | |
100 @Override | |
101 protected NumberFormat createFormatter(final CallContext context) { | |
102 return Formatter.getIntegerFormatter(context); | |
103 } | |
104 }; | |
105 | |
106 public static final SInfoResultType mainValue2Duration = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.2.duration", | |
107 "sinfo.flood_duration.header.pdf.mainvalue.2.duration") { | |
108 private static final long serialVersionUID = 1L; | |
109 | |
110 @Override | |
111 public String exportValue(final CallContext context, final Object value) { | |
112 final double doubleValue = asDouble(value); | |
113 return exportDoubleValue(context, doubleValue); | |
114 } | |
115 | |
116 @Override | |
117 protected NumberFormat createFormatter(final CallContext context) { | |
118 return Formatter.getIntegerFormatter(context); | |
119 } | |
120 }; | |
121 | |
122 public static final SInfoResultType mainValue3Duration = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.3.duration", | |
123 "sinfo.flood_duration.header.pdf.mainvalue.3.duration") { | |
124 private static final long serialVersionUID = 1L; | |
125 | |
126 @Override | |
127 public String exportValue(final CallContext context, final Object value) { | |
128 final double doubleValue = asDouble(value); | |
129 return exportDoubleValue(context, doubleValue); | |
130 } | |
131 | |
132 @Override | |
133 protected NumberFormat createFormatter(final CallContext context) { | |
134 return Formatter.getIntegerFormatter(context); | |
135 } | |
136 }; | |
137 | |
138 public static final SInfoResultType waterlevel = new SInfoResultType(null, SInfoI18NStrings.CSV_WATERLEVEL_HEADER, | 88 public static final SInfoResultType waterlevel = new SInfoResultType(null, SInfoI18NStrings.CSV_WATERLEVEL_HEADER, |
139 "sinfo.export.flow_depth.pdf.header.waterlevel") { | 89 "sinfo.export.flow_depth.pdf.header.waterlevel") { |
140 private static final long serialVersionUID = 1L; | 90 private static final long serialVersionUID = 1L; |
141 | 91 |
142 @Override | 92 @Override |
183 protected NumberFormat createFormatter(final CallContext context) { | 133 protected NumberFormat createFormatter(final CallContext context) { |
184 return Formatter.getFlowDepth(context); | 134 return Formatter.getFlowDepth(context); |
185 } | 135 } |
186 }; | 136 }; |
187 | 137 |
188 public static final SInfoResultType waterlevel3 = new SInfoResultType(null, "sinfo.flood_duration.header.mainvalue.3.w", | 138 // public static final SInfoResultType waterlevel3 = new SInfoResultType(null, |
189 "sinfo.flood_duration.header.pdf.mainvalue.3.w") { | 139 // "sinfo.flood_duration.header.mainvalue.3.w", |
190 private static final long serialVersionUID = 1L; | 140 // "sinfo.flood_duration.header.pdf.mainvalue.3.w") { |
191 | 141 // private static final long serialVersionUID = 1L; |
192 @Override | 142 // |
193 public String exportValue(final CallContext context, final Object value) { | 143 // @Override |
194 final double doubleValue = asDouble(value); | 144 // public String exportValue(final CallContext context, final Object value) { |
195 return exportDoubleValue(context, doubleValue); | 145 // final double doubleValue = asDouble(value); |
196 } | 146 // return exportDoubleValue(context, doubleValue); |
197 | 147 // } |
198 @Override | 148 // |
199 protected NumberFormat createFormatter(final CallContext context) { | 149 // @Override |
200 return Formatter.getFlowDepth(context); | 150 // protected NumberFormat createFormatter(final CallContext context) { |
201 } | 151 // return Formatter.getFlowDepth(context); |
202 }; | 152 // } |
153 // }; | |
203 | 154 |
204 public static final SInfoResultType waterlevelLabel = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_LABEL_HEADER) { | 155 public static final SInfoResultType waterlevelLabel = new SInfoResultType(I18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_LABEL_HEADER) { |
205 private static final long serialVersionUID = 1L; | 156 private static final long serialVersionUID = 1L; |
206 | 157 |
207 @Override | 158 @Override |