comparison flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixDeltaWtGenerator.java @ 3907:9a2c38fb5f29

Add reference period facet to delta W/t chart flys-artifacts/trunk@5574 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Sat, 22 Sep 2012 23:54:28 +0000
parents 6a08f4dc790b
children bd0f5a50e194
comparison
equal deleted inserted replaced
3906:fc6c6f6039df 3907:9a2c38fb5f29
193 artifactFacet.getData(context), 193 artifactFacet.getData(context),
194 artifactFacet.getFacetDescription(), 194 artifactFacet.getFacetDescription(),
195 theme, 195 theme,
196 visible); 196 visible);
197 } 197 }
198 else if (name.equals(FIX_REFERENCE_PERIOD_DWT)) {
199 doReferencePeriodsOut(
200 (FLYSArtifact) artifactFacet.getArtifact(),
201 artifactFacet.getData(context),
202 artifactFacet.getFacetDescription(),
203 theme,
204 visible);
205 }
198 else if (FacetTypes.IS.MANUALPOINTS(name)) { 206 else if (FacetTypes.IS.MANUALPOINTS(name)) {
199 doPoints (artifactFacet.getData(context), 207 doPoints (artifactFacet.getData(context),
200 artifactFacet, 208 artifactFacet,
201 theme, visible, YAXIS.dW.idx); 209 theme, visible, YAXIS.dW.idx);
202 } 210 }
203 else { 211 else {
204 logger.warn("doOut(): unknown facet name: " + name); 212 logger.warn("doOut(): unknown facet name: " + name);
205 return; 213 return;
206 } 214 }
215 }
216
217
218 protected void doReferencePeriodsOut(
219 FLYSArtifact artifact,
220 Object data,
221 String desc,
222 Document theme,
223 boolean visible)
224 {
225 logger.debug("doReferencePeriodsOut()");
226
227 FixAnalysisAccess access = new FixAnalysisAccess(artifact);
228 DateRange refRange = access.getReferencePeriod();
229
230 RegularTimePeriod start = new Day(refRange.getFrom());
231 RegularTimePeriod end = new Day(refRange.getTo());
232 StyledDomainMarker marker = new StyledDomainMarker(
233 start.getMiddleMillisecond(),
234 end.getMiddleMillisecond(),
235 theme);
236 domainMarker.add(marker);
207 } 237 }
208 238
209 239
210 protected void doSectorAverageOut( 240 protected void doSectorAverageOut(
211 FLYSArtifact artifact, 241 FLYSArtifact artifact,
383 protected void doAnalysisPeriodsOut( 413 protected void doAnalysisPeriodsOut(
384 FLYSArtifact artifact, 414 FLYSArtifact artifact,
385 Object data, 415 Object data,
386 String desc, 416 String desc,
387 Document theme, 417 Document theme,
388 boolean visible 418 boolean visible)
389 ) { 419 {
390 logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc);
391
392 DateRange[] ranges = (DateRange[]) data; 420 DateRange[] ranges = (DateRange[]) data;
393 if (ranges == null || !visible) { 421 if (ranges == null || !visible) {
394 return; 422 return;
395 } 423 }
396 for (int i = 0; i < ranges.length; i++) { 424 for (int i = 0; i < ranges.length; i++) {

http://dive4elements.wald.intevation.org