comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixRealizingCalculation.java @ 7546:b82750667e1a 3.0.18

Some i18n for Vollmer curve calculation.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 08 Nov 2013 18:04:51 +0100
parents af13ceeba52a
children ddcd52d239cd 0a5239a1e46e
comparison
equal deleted inserted replaced
7545:4dbbdf0c8b2c 7546:b82750667e1a
43 43
44 Boolean isQ = access.isQ(); 44 Boolean isQ = access.isQ();
45 List<Segment> segments = access.getSegments(); 45 List<Segment> segments = access.getSegments();
46 46
47 if (isQ == null) { 47 if (isQ == null) {
48 // TODO: i18n
49 addProblem("fix.realize.missing.is.q"); 48 addProblem("fix.realize.missing.is.q");
50 } 49 }
51 50
52 if (segments == null || segments.isEmpty()) { 51 if (segments == null || segments.isEmpty()) {
53 // TODO: i18n
54 addProblem("fix.realize.missing.segments"); 52 addProblem("fix.realize.missing.segments");
55 } 53 }
56 54
57 River r = RiverFactory.getRiver(river); 55 River r = RiverFactory.getRiver(river);
58 56
59 if (r == null) { 57 if (r == null) {
60 // TODO: i18n
61 addProblem("fix.no.such.river"); 58 addProblem("fix.no.such.river");
62 } 59 }
63 60
64 if (!hasProblems()) { 61 if (!hasProblems()) {
65 this.isQ = isQ; 62 this.isQ = isQ;
108 nextSeg = seg; 105 nextSeg = seg;
109 break; 106 break;
110 } 107 }
111 } 108 }
112 if (nextSeg == null) { 109 if (nextSeg == null) {
113 // TODO: i18n
114 addProblem(km, "fix.cannot.find.segment"); 110 addProblem(km, "fix.cannot.find.segment");
115 continue; 111 continue;
116 } 112 }
117 segment = nextSeg; 113 segment = nextSeg;
118 } 114 }
126 for (int i = 0; i < numResults; ++i) { 122 for (int i = 0; i < numResults; ++i) {
127 double q = values[i]; 123 double q = values[i];
128 double w = instance.value(q); 124 double w = instance.value(q);
129 125
130 if (Double.isNaN(w)) { 126 if (Double.isNaN(w)) {
131 // TODO: i18n
132 addProblem(km, "fix.cannot.calculate.function", q); 127 addProblem(km, "fix.cannot.calculate.function", q);
133 } 128 }
134 else { 129 else {
135 results[i].add(w, q, km); 130 results[i].add(w, q, km);
136 } 131 }

http://dive4elements.wald.intevation.org