Mercurial > dive4elements > gnv-client
view gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/vertical/VerticalProfileOutputTransition.java @ 333:19571fd1d0e8
Sourced ChartFactory call out to an own method, which is overriden by TimeSeriesChart.
gnv-artifacts/trunk@399 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 07 Dec 2009 10:33:31 +0000 |
parents | 1c427acb6c76 |
children |
line wrap: on
line source
/** * */ package de.intevation.gnv.transition.profile.vertical; import java.util.Collection; import java.util.Locale; import org.apache.log4j.Logger; import de.intevation.gnv.chart.Chart; import de.intevation.gnv.chart.ChartLabels; import de.intevation.gnv.chart.VerticalProfileChart; import de.intevation.gnv.statistics.Statistics; import de.intevation.gnv.statistics.VerticalProfileStatistics; import de.intevation.gnv.transition.timeseries.TimeSeriesOutputTransition; /** * @author Tim Englich <tim.englich@intevation.de> * */ public class VerticalProfileOutputTransition extends TimeSeriesOutputTransition { /** * The UID of this class */ private static final long serialVersionUID = 4401516087492028840L; private static Logger log = Logger .getLogger(TimeSeriesOutputTransition.class); /** * Constructor */ public VerticalProfileOutputTransition() { super(); super.domainLable = "Depth [m]"; } @Override protected Chart getChart( ChartLabels chartLables, Collection parameters, Collection measurements, Collection dates, Collection result, Locale locale, String uuid, boolean linesVisible, boolean shapesVisible ) { Chart chart = null; if (CACHE_CHART) { log.info("Try to get verticalprofile chart from cache."); chart = (Chart) getChartFromCache(uuid); } if (chart != null) return chart; log.info("Chart not in cache yet."); chart = new VerticalProfileChart( chartLables, this.createStyle(), parameters, measurements, dates, result, null, locale, linesVisible, shapesVisible ); chart.generateChart(); if (CACHE_CHART) { log.info("Put chart into cache."); purifyChart(chart, uuid); } return chart; } protected String createChartSubtitle(Locale locale, String uuid) { return getSelectedFeatureName(uuid); } /** * @see de.intevation.gnv.transition.timeseries.TimeSeriesOutputTransition#getStatisticsGenerator() */ @Override protected Statistics getStatisticsGenerator() { return new VerticalProfileStatistics(); } }