comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java @ 4276:0aa42c9d58e9

Documentation in ChartGenerator added.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 26 Oct 2012 16:41:36 +0200
parents 6942a8b31d95
children 3c8964855270
comparison
equal deleted inserted replaced
4275:32bd5af17eda 4276:0aa42c9d58e9
68 import de.intevation.flys.utils.Formatter; 68 import de.intevation.flys.utils.Formatter;
69 69
70 /** 70 /**
71 * The base class for chart creation. It should provide some basic things that 71 * The base class for chart creation. It should provide some basic things that
72 * equal in all chart types. 72 * equal in all chart types.
73 *
74 * Annotations are added as FLYSAnnotations and come in mutliple basic forms:
75 * TextAnnotations are labels somewhere in data space, StickyAnnotations are
76 * labels of a slice or line in one data dimension (i.e. visualized as label
77 * on a single axis).
73 * 78 *
74 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 79 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
75 */ 80 */
76 public abstract class ChartGenerator implements OutGenerator { 81 public abstract class ChartGenerator implements OutGenerator {
77 82
1456 } 1461 }
1457 1462
1458 1463
1459 /** 1464 /**
1460 * Returns the X-Axis range as String array from request document. 1465 * Returns the X-Axis range as String array from request document.
1461 * 1466 * If the (x|y)range elements are not found in request document, return
1462 * @return a String array with [lower, upper]. 1467 * null (i.e. not zoomed).
1468 *
1469 * @return a String array with [lower, upper], null if not in document.
1463 */ 1470 */
1464 protected String[] getDomainAxisRangeFromRequest() { 1471 protected String[] getDomainAxisRangeFromRequest() {
1465 Element xrange = (Element)XMLUtils.xpath( 1472 Element xrange = (Element)XMLUtils.xpath(
1466 request, 1473 request,
1467 XPATH_CHART_X_RANGE, 1474 XPATH_CHART_X_RANGE,
1479 1486
1480 return new String[] { lower, upper }; 1487 return new String[] { lower, upper };
1481 } 1488 }
1482 1489
1483 1490
1491 /** Returns null if the (x|y)range-element was not found in request document.
1492 * This usally means that the axis are not manually zoomed, i.e. showing
1493 * full data extent. */
1484 protected String[] getValueAxisRangeFromRequest() { 1494 protected String[] getValueAxisRangeFromRequest() {
1485 Element yrange = (Element)XMLUtils.xpath( 1495 Element yrange = (Element)XMLUtils.xpath(
1486 request, 1496 request,
1487 XPATH_CHART_Y_RANGE, 1497 XPATH_CHART_Y_RANGE,
1488 XPathConstants.NODE, 1498 XPathConstants.NODE,

http://dive4elements.wald.intevation.org