comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation4.java @ 2166:2898b1ff6013

I18N for WINFO calculation result messages. flys-artifacts/trunk@3758 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 24 Jan 2012 22:59:44 +0000
parents c09c9e05ecfa
children 899ca89f497e
comparison
equal deleted inserted replaced
2165:637dd38d0e2f 2166:2898b1ff6013
107 } 107 }
108 } 108 }
109 109
110 if (segments.isEmpty()) { 110 if (segments.isEmpty()) {
111 logger.debug("no segments found"); 111 logger.debug("no segments found");
112 // TODO: I18N 112 addProblem("no.segments.found");
113 addProblem("no segments found");
114 return new CalculationResult(new WQKms[0], this); 113 return new CalculationResult(new WQKms[0], this);
115 } 114 }
116 115
117 int numResults = segments.get(0).values.length; 116 int numResults = segments.get(0).values.length;
118 117
119 if (numResults < 1) { 118 if (numResults < 1) {
120 logger.debug("no values given"); 119 logger.debug("no values given");
121 // TODO: I18N 120 addProblem("no.values.given");
122 addProblem("no values given");
123 return new CalculationResult(new WQKms[0], this); 121 return new CalculationResult(new WQKms[0], this);
124 } 122 }
125 123
126 124
127 WQKms [] results = new WQKms[numResults]; 125 WQKms [] results = new WQKms[numResults];
224 QPosition qi = table.getQPosition( 222 QPosition qi = table.getQPosition(
225 anchor.referencePoint, 223 anchor.referencePoint,
226 anchor.values[i]); 224 anchor.values[i]);
227 225
228 if ((qPositions[i] = qi) == null) { 226 if ((qPositions[i] = qi) == null) {
229 // TODO: I18N 227 addProblem(pos, "cannot.find.q", anchor.values[i]);
230 addProblem(pos, "cannot find q = " + anchor.values[i]);
231 functions[i] = Identity.IDENTITY; 228 functions[i] = Identity.IDENTITY;
232 } 229 }
233 else { 230 else {
234 double qA = table.getQ(qi, anchor.referencePoint); 231 double qA = table.getQ(qi, anchor.referencePoint);
235 double qF = table.getQ(qi, free .referencePoint); 232 double qF = table.getQ(qi, free .referencePoint);
261 258
262 if (table.interpolate(pos, out, qPosition, functions[i])) { 259 if (table.interpolate(pos, out, qPosition, functions[i])) {
263 results[i].add(out[0], out[1], pos); 260 results[i].add(out[0], out[1], pos);
264 } 261 }
265 else { 262 else {
266 // TODO: I18N 263 addProblem(pos, "cannot.interpolate.w.q");
267 addProblem(pos, "cannot interpolate w/q");
268 } 264 }
269 } 265 }
270 } 266 }
271 267
272 // Backjump correction 268 // Backjump correction

http://dive4elements.wald.intevation.org