comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java @ 3135:d7bc53701b08

Updated i18n for delta W(t) chart in fix analysis. flys-artifacts/trunk@4742 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 21 Jun 2012 13:17:44 +0000
parents 6f6a8e5fb7a4
children b6da650b0718
comparison
equal deleted inserted replaced
3134:5a0aef74c316 3135:d7bc53701b08
44 { 44 {
45 45
46 /** The log used in this class. */ 46 /** The log used in this class. */
47 private static Logger log = Logger.getLogger(FixationCompute.class); 47 private static Logger log = Logger.getLogger(FixationCompute.class);
48 48
49 private static final String I18N_REFERENCEPERIOD = "fix.reference.period"; 49 private static final String I18N_REFERENCEPERIOD = "fix.reference.period.events";
50 50
51 private static final String I18N_ANALYSISPERIODS = "fix.analysis.periods"; 51 private static final String I18N_ANALYSISPERIODS = "fix.analysis.periods";
52 52
53 private static final String I18N_DERIVATIVE = "fix.derivative"; 53 private static final String I18N_DERIVATIVE = "fix.derivative";
54 54
55 private static final String I18N_OUTLIER = "fix.outlier"; 55 private static final String I18N_OUTLIER = "fix.outlier";
56
57 private static final String I18N_ANALYSIS = "fix.analysis";
58
59 private static final String I18N_DEVIATION = "fix.deviation";
56 60
57 /** 61 /**
58 * The default constructor that initializes an empty State object. 62 * The default constructor that initializes an empty State object.
59 */ 63 */
60 public FixationCompute() { 64 public FixationCompute() {
96 new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); 100 new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
97 101
98 int count = access.getAnalysisPeriods().length; 102 int count = access.getAnalysisPeriods().length;
99 for (int i = 0; i < count; i++) { 103 for (int i = 0; i < count; i++) {
100 DateRange period = access.getAnalysisPeriods()[i]; 104 DateRange period = access.getAnalysisPeriods()[i];
105 DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM);
106 String startDate = df.format(period.getFrom());
107 String endDate = df.format(period.getTo());
108
101 for (int j = access.getQSectorStart().intValue(); 109 for (int j = access.getQSectorStart().intValue();
102 j <= access.getQSectorEnd().intValue(); 110 j <= access.getQSectorEnd().intValue();
103 j++) { 111 j++) {
104 112
105 DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM);
106 String startDate = df.format(period.getFrom());
107 String endDate = df.format(period.getTo());
108 String sector = ""; 113 String sector = "";
109 switch (j) { 114 switch (j) {
110 case 0: sector = "[0 - (MNQ+MQ)/2)"; break; 115 case 0: sector = "[0 - (MNQ+MQ)/2)"; break;
111 case 1: sector = "[(MNQ+MQ)/2 - (MQ+MHQ)/2)"; break; 116 case 1: sector = "[(MNQ+MQ)/2 - (MQ+MHQ)/2)"; break;
112 case 2: sector = "[(MQ+MHQ)/2 - HQ5)"; break; 117 case 2: sector = "[(MQ+MHQ)/2 - HQ5)"; break;
132 new FixAvSectorFacet(facetNdx, 137 new FixAvSectorFacet(facetNdx,
133 FIX_SECTOR_AVERAGE_WQ + "_" + sectorNdx, 138 FIX_SECTOR_AVERAGE_WQ + "_" + sectorNdx,
134 description)); 139 description));
135 140
136 } 141 }
137 String eventDesc = period.getFrom().toString() + 142 String eventDesc =
138 " - " + 143 Resources.getMsg(context.getMeta(),
139 period.getTo().toString(); 144 I18N_ANALYSIS,
145 I18N_ANALYSIS) +
146 ": " + startDate + " - " + endDate;
140 facets.add(new FixAnalysisEventsFacet(i, 147 facets.add(new FixAnalysisEventsFacet(i,
141 FIX_ANALYSIS_EVENTS_DWT, 148 FIX_ANALYSIS_EVENTS_DWT,
142 eventDesc)); 149 eventDesc));
143 facets.add(new FixAnalysisEventsFacet(i, 150 facets.add(new FixAnalysisEventsFacet(i,
144 FIX_ANALYSIS_EVENTS_LS, 151 FIX_ANALYSIS_EVENTS_LS,
181 facets.add(new FixDerivateFacet(FIX_DERIVATE, 188 facets.add(new FixDerivateFacet(FIX_DERIVATE,
182 Resources.getMsg(context.getMeta(), 189 Resources.getMsg(context.getMeta(),
183 I18N_DERIVATIVE, 190 I18N_DERIVATIVE,
184 I18N_DERIVATIVE))); 191 I18N_DERIVATIVE)));
185 192
186 facets.add(new FixDeviationFacet(FIX_DEVIATION_DWT, "Abweichung")); 193 facets.add(new FixDeviationFacet(FIX_DEVIATION_DWT,
194 Resources.getMsg(context.getMeta(),
195 I18N_DEVIATION,
196 I18N_DEVIATION)));
187 return res; 197 return res;
188 } 198 }
189 } 199 }
190 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 200 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org