Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | 592df582e462 |
children | 1cc7653ca84f 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
164 ThemeDocument theme, | 164 ThemeDocument theme, |
165 boolean visible | 165 boolean visible |
166 ) { | 166 ) { |
167 String name = artifactFacet.getFacetName(); | 167 String name = artifactFacet.getFacetName(); |
168 log.debug("FixDeltaWtGenerator.doOut: " + name); | 168 log.debug("FixDeltaWtGenerator.doOut: " + name); |
169 log.debug("Theme description is: " + artifactFacet.getFacetDescription()); | 169 log.debug("Theme description is: " |
170 + artifactFacet.getFacetDescription()); | |
170 | 171 |
171 this.artifact = (D4EArtifact)artifactFacet.getArtifact(); | 172 this.artifact = (D4EArtifact)artifactFacet.getArtifact(); |
172 | 173 |
173 if (name.contains(FIX_SECTOR_AVERAGE_DWT)) { | 174 if (name.contains(FIX_SECTOR_AVERAGE_DWT)) { |
174 doSectorAverageOut( | 175 doSectorAverageOut( |
289 tsc.addSeries(series); | 290 tsc.addSeries(series); |
290 | 291 |
291 addAxisDataset(tsc, 0, visible); | 292 addAxisDataset(tsc, 0, visible); |
292 | 293 |
293 if (visible && theme.parseShowLineLabel()) { | 294 if (visible && theme.parseShowLineLabel()) { |
294 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>(); | 295 List<XYTextAnnotation> textAnnos = |
296 new ArrayList<XYTextAnnotation>(); | |
295 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( | 297 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( |
296 "\u0394 W(t) [cm] " + (float)Math.round(qwd.qwd.getDeltaW() * 10000) / 10000, | 298 "\u0394 W(t) [cm] " |
299 + (float)Math.round(qwd.qwd.getDeltaW() * 10000) / 10000, | |
297 tsc.getXValue(0, 0), | 300 tsc.getXValue(0, 0), |
298 qwd.qwd.getDeltaW()); | 301 qwd.qwd.getDeltaW()); |
299 textAnnos.add(anno); | 302 textAnnos.add(anno); |
300 | 303 |
301 RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme); | 304 RiverAnnotation flysAnno = |
305 new RiverAnnotation(null, null, null, theme); | |
302 flysAnno.setTextAnnotations(textAnnos); | 306 flysAnno.setTextAnnotations(textAnnos); |
303 addAnnotations(flysAnno); | 307 addAnnotations(flysAnno); |
304 } | 308 } |
305 } | 309 } |
306 | 310 |
317 QWD qwd = (QWD) data; | 321 QWD qwd = (QWD) data; |
318 doQWDEventsOut(qwd, desc, theme, visible); | 322 doQWDEventsOut(qwd, desc, theme, visible); |
319 } | 323 } |
320 | 324 |
321 | 325 |
322 protected void doQWDEventsOut(QWD qwd, String desc, ThemeDocument theme, boolean visible) | 326 protected void doQWDEventsOut( |
323 { | 327 QWD qwd, |
328 String desc, | |
329 ThemeDocument theme, | |
330 boolean visible | |
331 ) { | |
324 TimeSeriesCollection tsc = new TimeSeriesCollection(); | 332 TimeSeriesCollection tsc = new TimeSeriesCollection(); |
325 | 333 |
326 TimeSeries series = new StyledTimeSeries(desc, theme); | 334 TimeSeries series = new StyledTimeSeries(desc, theme); |
327 TimeSeries interpol = new StyledTimeSeries(desc + "interpol", theme); | 335 TimeSeries interpol = new StyledTimeSeries(desc + "interpol", theme); |
328 | 336 |
365 doQWDTextAnnotations(annoIdxMap, tsc, qwd, theme, visible); | 373 doQWDTextAnnotations(annoIdxMap, tsc, qwd, theme, visible); |
366 } | 374 } |
367 | 375 |
368 | 376 |
369 /** | 377 /** |
370 * @param annoIdxMap map of index in qwds to series/data item indices in tsc. | 378 * @param annoIdxMap map of index in qwds to series/data item indices |
379 * in tsc. | |
371 */ | 380 */ |
372 protected void doQWDTextAnnotations(Map<Integer, int[]> annoIdxMap, | 381 protected void doQWDTextAnnotations(Map<Integer, int[]> annoIdxMap, |
373 TimeSeriesCollection tsc, QWD qwd, ThemeDocument theme, | 382 TimeSeriesCollection tsc, QWD qwd, ThemeDocument theme, |
374 boolean visible) { | 383 boolean visible) { |
375 log.debug("doQWDTextAnnotation()"); | 384 log.debug("doQWDTextAnnotation()"); |
427 if (data == null || !visible) { | 436 if (data == null || !visible) { |
428 log.debug("no standard deviation"); | 437 log.debug("no standard deviation"); |
429 return; | 438 return; |
430 } | 439 } |
431 double[] value = (double[]) data; | 440 double[] value = (double[]) data; |
432 StyledDomainMarker lower = new StyledDomainMarker((value[0] * -1), 0, theme); | 441 StyledDomainMarker lower = |
433 StyledDomainMarker upper = new StyledDomainMarker(0, value[0], theme); | 442 new StyledDomainMarker((value[0] * -1), 0, theme); |
443 StyledDomainMarker upper = | |
444 new StyledDomainMarker(0, value[0], theme); | |
434 | 445 |
435 valueMarker.add(lower); | 446 valueMarker.add(lower); |
436 valueMarker.add(upper); | 447 valueMarker.add(upper); |
437 } | 448 } |
438 | 449 |
461 log.debug("domainmarkers: " + domainMarker.size()); | 472 log.debug("domainmarkers: " + domainMarker.size()); |
462 } | 473 } |
463 | 474 |
464 | 475 |
465 @Override | 476 @Override |
466 public void init(String outName, Document request, OutputStream out, CallContext context) { | 477 public void init( |
478 String outName, | |
479 Document request, | |
480 OutputStream out, | |
481 CallContext context | |
482 ) { | |
467 super.init(outName, request, out, context); | 483 super.init(outName, request, out, context); |
468 | 484 |
469 Double currentKm = FixChartGenerator.getCurrentKmFromRequest(request); | 485 Double currentKm = FixChartGenerator.getCurrentKmFromRequest(request); |
470 | 486 |
471 if (log.isDebugEnabled()) { | 487 if (log.isDebugEnabled()) { |