# HG changeset patch # User Ingo Weinzierl # Date 1259090098 0 # Node ID 45625b5cd6d4d5c7d17ca1d1cb2b81489f357900 # Parent 333ea3d544234889788362fce3c531aaf88b1af6 Added timegap definitions to charts. Adapted constructors and constructor calls. gnv-artifacts/trunk@368 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/ChangeLog Tue Nov 24 19:14:58 2009 +0000 @@ -1,3 +1,18 @@ +2009-11-24 Tim Englich + + * src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java, + src/main/java/de/intevation/gnv/chart/AbstractChart.java, + src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java, + src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java: Added + timegap definitions, adapted constructors. + + * src/main/java/de/intevation/gnv/transition/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputTransition.java, + src/main/java/de/intevation/gnv/transition/profile/verticalcrosssection/VerticalCrossSectionOutputTransition.java, + src/main/java/de/intevation/gnv/transition/profile/horizontal/HorizontalProfileOutputTransition.java, + src/main/java/de/intevation/gnv/transition/profile/vertical/VerticalProfileOutputTransition.java, + src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java: + Adapted creation of charts regarding changes of constructors. + 2009-11-24 Tim Englich * src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_feed.xml, diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractChart.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractChart.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractChart.java Tue Nov 24 19:14:58 2009 +0000 @@ -28,6 +28,7 @@ protected Collection measurements; protected Collection resultSet; protected Collection dates; + protected Collection timeGaps; public abstract JFreeChart generateChart(); diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java Tue Nov 24 19:14:58 2009 +0000 @@ -1,6 +1,7 @@ package de.intevation.gnv.chart; import java.util.Collection; +import java.util.Iterator; import java.util.Locale; import com.vividsolutions.jts.geom.Point; @@ -15,6 +16,7 @@ import org.jfree.data.xy.XYSeries; import de.intevation.gnv.geobackend.base.Result; +import de.intevation.gnv.timeseries.gap.TimeGap; import de.intevation.gnv.utils.DistanceCalculator; @@ -36,11 +38,21 @@ ChartTheme theme, Collection parameters, Collection measurements, + Collection dates, Collection result, - Collection dates, + Collection timeGaps, Locale locale ) { - super(labels, theme, parameters, measurements, result, dates, locale); + super( + labels, + theme, + parameters, + measurements, + dates, + result, + timeGaps, + locale + ); this.PLOT_ORIENTATION = PlotOrientation.VERTICAL; this.distance = 0; } diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java Tue Nov 24 19:14:58 2009 +0000 @@ -32,16 +32,18 @@ ChartTheme theme, Collection parameters, Collection measurements, + Collection dates, Collection result, - Collection dates, + Collection timeGaps, Locale locale ) { this.labels = labels; this.theme = theme; this.parameters = parameters; this.measurements = measurements; + this.dates = dates; this.resultSet = result; - this.dates = dates; + this.timeGaps = timeGaps; this.locale = locale; this.PLOT_ORIENTATION = PlotOrientation.VERTICAL; } @@ -96,7 +98,9 @@ // add the last dataset if existing to plot and prepare its axis addSeries(series, idx); - prepareAxis(((String)series.getKey()), idx++); + + if (series != null) + prepareAxis(((String)series.getKey()), idx++); } @@ -135,4 +139,4 @@ "m"; } } -// vim:set ts=4 sw=4 si et sta sts=4 fenc=latin1 : +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java Tue Nov 24 19:14:58 2009 +0000 @@ -30,16 +30,18 @@ ChartTheme theme, Collection parameters, Collection measurements, + Collection dates, Collection result, - Collection dates, + Collection timeGaps, Locale locale ) { this.labels = labels; this.theme = theme; this.parameters = parameters; this.measurements = measurements; + this.dates = dates; this.resultSet = result; - this.dates = dates; + this.timeGaps = timeGaps; this.locale = locale; this.PLOT_ORIENTATION = PlotOrientation.HORIZONTAL; } @@ -93,7 +95,9 @@ } addSeries(series, idx); - prepareAxis(((String)series.getKey()), idx++); + + if (series != null) + prepareAxis(((String)series.getKey()), idx++); } diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/HorizontalProfileOutputTransition.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/HorizontalProfileOutputTransition.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/HorizontalProfileOutputTransition.java Tue Nov 24 19:14:58 2009 +0000 @@ -65,13 +65,15 @@ super(); super.domainLable = "Distance [km]"; } + + @Override protected Chart getChart( ChartLabels chartLables, Collection parameters, Collection measurements, + Collection dates, Collection result, - Collection dates, Locale locale, String uuid ) { @@ -91,8 +93,9 @@ createStyle(), parameters, measurements, + dates, result, - dates, + null, locale ); chart.generateChart(); diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputTransition.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputTransition.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputTransition.java Tue Nov 24 19:14:58 2009 +0000 @@ -51,8 +51,8 @@ ChartLabels chartLables, Collection parameters, Collection measurements, + Collection dates, Collection result, - Collection dates, Locale locale, String uuid ) { diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/vertical/VerticalProfileOutputTransition.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/vertical/VerticalProfileOutputTransition.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/vertical/VerticalProfileOutputTransition.java Tue Nov 24 19:14:58 2009 +0000 @@ -39,11 +39,16 @@ } - @Override - protected Chart getChart(ChartLabels chartLables, Collection parameters, - Collection measurements, Collection result, - Collection dates, Locale locale, String uuid) { + protected Chart getChart( + ChartLabels chartLables, + Collection parameters, + Collection measurements, + Collection dates, + Collection result, + Locale locale, + String uuid + ) { Chart chart = null; if (CACHE_CHART) { @@ -60,8 +65,9 @@ this.createStyle(), parameters, measurements, + dates, result, - dates, + null, locale ); chart.generateChart(); diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/verticalcrosssection/VerticalCrossSectionOutputTransition.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/verticalcrosssection/VerticalCrossSectionOutputTransition.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/verticalcrosssection/VerticalCrossSectionOutputTransition.java Tue Nov 24 19:14:58 2009 +0000 @@ -60,8 +60,8 @@ ChartLabels chartLables, Collection parameters, Collection measurements, + Collection dates, Collection result, - Collection dates, Locale locale, String uuid ) { diff -r 333ea3d54423 -r 45625b5cd6d4 gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Tue Nov 24 15:59:51 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Tue Nov 24 19:14:58 2009 +0000 @@ -409,8 +409,8 @@ chartLables, parameters, measurements, + dates, getChartResult(uuid), - timeGapDefinitions, null, // Locale uuid ); @@ -432,12 +432,13 @@ ); } + protected Chart getChart( ChartLabels chartLables, Collection parameters, Collection measurements, + Collection dates, Collection result, - Collection dates, Locale locale, String uuid ) { @@ -457,8 +458,9 @@ createStyle(), parameters, measurements, + dates, result, - dates, + timeGapDefinitions, null ); chart.generateChart();