comparison artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java @ 8202:e4606eae8ea5

sed src/**/*.java 's/logger/log/g'
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 05 Sep 2014 12:58:17 +0200
parents bf87349bf456
children 5e38e2924c07
comparison
equal deleted inserted replaced
8201:4b8c5a08de04 8202:e4606eae8ea5
52 private YAXIS(int c) { 52 private YAXIS(int c) {
53 idx = c; 53 idx = c;
54 } 54 }
55 } 55 }
56 56
57 /** The logger that is used in this generator. */ 57 /** The log that is used in this generator. */
58 private static Logger logger = 58 private static Logger log =
59 Logger.getLogger(LongitudinalSectionGenerator.class); 59 Logger.getLogger(LongitudinalSectionGenerator.class);
60 60
61 /** Key to look up internationalized String for annotations label. */ 61 /** Key to look up internationalized String for annotations label. */
62 public static final String I18N_ANNOTATIONS_LABEL = 62 public static final String I18N_ANNOTATIONS_LABEL =
63 "chart.longitudinal.annotations.label"; 63 "chart.longitudinal.annotations.label";
304 * 304 *
305 * @param xaxis The domain axis. 305 * @param xaxis The domain axis.
306 */ 306 */
307 protected void invertXAxis(ValueAxis xaxis) { 307 protected void invertXAxis(ValueAxis xaxis) {
308 if (isInverted()) { 308 if (isInverted()) {
309 logger.debug("X-Axis.setInverted(true)"); 309 log.debug("X-Axis.setInverted(true)");
310 xaxis.setInverted(true); 310 xaxis.setInverted(true);
311 } 311 }
312 } 312 }
313 313
314 314
323 ThemeDocument attr, 323 ThemeDocument attr,
324 boolean visible 324 boolean visible
325 ) { 325 ) {
326 String name = artifactAndFacet.getFacetName(); 326 String name = artifactAndFacet.getFacetName();
327 327
328 logger.debug("LongitudinalSectionGenerator.doOut: " + name); 328 log.debug("LongitudinalSectionGenerator.doOut: " + name);
329 329
330 if (name == null) { 330 if (name == null) {
331 logger.error("No facet name for doOut(). No output generated!"); 331 log.error("No facet name for doOut(). No output generated!");
332 return; 332 return;
333 } 333 }
334 334
335 Facet facet = artifactAndFacet.getFacet(); 335 Facet facet = artifactAndFacet.getFacet();
336 336
380 attr, 380 attr,
381 visible, 381 visible,
382 YAXIS.W.idx); 382 YAXIS.W.idx);
383 } 383 }
384 else { 384 else {
385 logger.warn("Unknown facet name: " + name); 385 log.warn("Unknown facet name: " + name);
386 return; 386 return;
387 } 387 }
388 } 388 }
389 389
390 /** 390 /**
394 WKms wkms, 394 WKms wkms,
395 ArtifactAndFacet aandf, 395 ArtifactAndFacet aandf,
396 ThemeDocument theme, 396 ThemeDocument theme,
397 boolean visible 397 boolean visible
398 ) { 398 ) {
399 logger.debug("WDifferencesCurveGenerator.doWDifferencesOut"); 399 log.debug("WDifferencesCurveGenerator.doWDifferencesOut");
400 if (wkms == null) { 400 if (wkms == null) {
401 logger.warn("No data to add to WDifferencesChart."); 401 log.warn("No data to add to WDifferencesChart.");
402 return; 402 return;
403 } 403 }
404 404
405 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); 405 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
406 406
407 if (logger.isDebugEnabled()) { 407 if (log.isDebugEnabled()) {
408 if (wkms.size() > 0) { 408 if (wkms.size() > 0) {
409 logger.debug("Generate series: " + series.getKey()); 409 log.debug("Generate series: " + series.getKey());
410 logger.debug("Start km: " + wkms.getKm(0)); 410 log.debug("Start km: " + wkms.getKm(0));
411 logger.debug("End km: " + wkms.getKm(wkms.size() - 1)); 411 log.debug("End km: " + wkms.getKm(wkms.size() - 1));
412 logger.debug("Values : " + wkms.size()); 412 log.debug("Values : " + wkms.size());
413 } 413 }
414 } 414 }
415 415
416 StyledSeriesBuilder.addPoints(series, wkms); 416 StyledSeriesBuilder.addPoints(series, wkms);
417 417
440 } 440 }
441 else if (FacetTypes.IS.Q(facetName)) { 441 else if (FacetTypes.IS.Q(facetName)) {
442 return YAXIS.Q.idx; 442 return YAXIS.Q.idx;
443 } 443 }
444 else { 444 else {
445 logger.warn("Could not find axis for facet " + facetName); 445 log.warn("Could not find axis for facet " + facetName);
446 return YAXIS.W.idx; 446 return YAXIS.W.idx;
447 } 447 }
448 } 448 }
449 449
450 450
457 Object o, 457 Object o,
458 ArtifactAndFacet aandf, 458 ArtifactAndFacet aandf,
459 ThemeDocument theme, 459 ThemeDocument theme,
460 boolean visible 460 boolean visible
461 ) { 461 ) {
462 logger.debug("LongitudinalSectionGenerator.doArea"); 462 log.debug("LongitudinalSectionGenerator.doArea");
463 StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme); 463 StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme);
464 464
465 String seriesName = aandf.getFacetDescription(); 465 String seriesName = aandf.getFacetDescription();
466 466
467 AreaFacet.Data data = (AreaFacet.Data) o; 467 AreaFacet.Data data = (AreaFacet.Data) o;
487 } 487 }
488 else if (data.getUpperData() instanceof Lines.LineData) { 488 else if (data.getUpperData() instanceof Lines.LineData) {
489 StyledSeriesBuilder.addPoints(up, ((Lines.LineData) data.getUpperData()).points, false); 489 StyledSeriesBuilder.addPoints(up, ((Lines.LineData) data.getUpperData()).points, false);
490 } 490 }
491 else { 491 else {
492 logger.error("Do not know how to deal with (up) area info from: " 492 log.error("Do not know how to deal with (up) area info from: "
493 + data.getUpperData()); 493 + data.getUpperData());
494 } 494 }
495 } 495 }
496 496
497 // TODO Depending on style, the area (e.g. 20m^2) should be added as annotation. 497 // TODO Depending on style, the area (e.g. 20m^2) should be added as annotation.
516 } 516 }
517 else if (data.getLowerData() instanceof Lines.LineData) { 517 else if (data.getLowerData() instanceof Lines.LineData) {
518 StyledSeriesBuilder.addPoints(down, ((Lines.LineData) data.getLowerData()).points, false); 518 StyledSeriesBuilder.addPoints(down, ((Lines.LineData) data.getLowerData()).points, false);
519 } 519 }
520 else { 520 else {
521 logger.error("Do not know how to deal with (down) area info from: " 521 log.error("Do not know how to deal with (down) area info from: "
522 + data.getLowerData()); 522 + data.getLowerData());
523 } 523 }
524 } 524 }
525 525
526 if (up == null && down != null) { 526 if (up == null && down != null) {

http://dive4elements.wald.intevation.org