changeset 310:45625b5cd6d4

Added timegap definitions to charts. Adapted constructors and constructor calls. gnv-artifacts/trunk@368 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 24 Nov 2009 19:14:58 +0000
parents 333ea3d54423
children cbb610197b9f
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractChart.java gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/HorizontalProfileOutputTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/vertical/VerticalProfileOutputTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/verticalcrosssection/VerticalCrossSectionOutputTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java
diffstat 10 files changed, 68 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- 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  <tim.englich@intevation.de>
+
+	* 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  <tim.englich@intevation.de>
 
     * src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_feed.xml, 
--- 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();
 
--- 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;
     }
--- 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 :
--- 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++);
     }
 
 
--- 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();
--- 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
     ) {
--- 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();
--- 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
     ) {
--- 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();

http://dive4elements.wald.intevation.org