changeset 3192:cd309f8597f6

Fix for 'linecolor ignored' issue flys-artifacts/trunk@4808 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Wed, 27 Jun 2012 11:50:24 +0000
parents ef0db530c341
children 2f922be407ea
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixDerivateFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixDeviationFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixOutlierFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixWQCurveFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java
diffstat 7 files changed, 234 insertions(+), 173 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jun 27 09:16:28 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jun 27 11:50:24 2012 +0000
@@ -1,10 +1,25 @@
+2012-06-27	Christian Lins <christian.lins@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java:
+	  Use JFreeUtil.sampleFunction2D() to sample a StyledXYSeries.
+
+	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixDerivateFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/fixings/FixDeviationFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/fixings/FixOutlierFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/fixings/FixWQCurveFacet.java:
+	  Add ctor with addtional custom facet index parameter.
+
+	* src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java:
+	  Introduce IdGenerator to generate unique facets IDs within an output,
+	  so themes can now be applied properly to points and lines.
+
 2012-06-26	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/collections/AttributeParser.java:
-	  Removed some expensive XPath usage. Some quick profiling 
+	  Removed some expensive XPath usage. Some quick profiling
 	  showed that up to 7% of our code (excluding Hibernate, H2, Restlet, etc.)
 	  were spend in these XPaths. A lot of time
-	  
+
 	  !!! Please, please, dear fellow programmers do not use XPath for fetching
 	  !!! trivial things that are easily accessible via DOM, too!
 
@@ -77,7 +92,7 @@
 2012-06-26	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Minor polish for LegendItem-Aggregation.
-	
+
 	* src/main/java/de/intevation/flys/exports/XYChartGenerator.java:
 	  Define and use static SPACE Shape.
 
@@ -95,7 +110,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/math/fitting/FunctionFactory.java:
 	  Register the singletons instead of new objects.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/math/fitting/Pow.java,
 	  src/main/java/de/intevation/flys/artifacts/math/fitting/InvQuad.java,
 	  src/main/java/de/intevation/flys/artifacts/math/fitting/SQPow.java,
@@ -281,7 +296,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java:
 	  Interpolated and measured values where switched.
-	
+
 2012-06-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/services/FixingsKMChartService.java:
@@ -292,14 +307,14 @@
 
 	* src/main/java/de/intevation/flys/utils/Formatter.java: Added formatters
 	  to be fetched only over CallMeta. CallContext are not present in services.
-	  
+
 	* src/main/java/de/intevation/flys/java2d/ShapeUtils.java: New. Some code
 	  to handle Shapes.
 
 	* src/main/java/de/intevation/flys/jfree/ShapeRenderer.java: New. Shape
-	  renderer. This is a simplified version of the shape renderer 
+	  renderer. This is a simplified version of the shape renderer
 	  from fixings analysis in desktop FLYS.
-	
+
 2012-06-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java:
@@ -337,7 +352,7 @@
 	  make the keys identifiable even through the UI.
 
 	  Apply in the same manner as contrib/check-i18n-properties.py
-	
+
 2012-06-23	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/resources/messages_de.properties,
@@ -352,7 +367,7 @@
 	  src/main/java/de/intevation/flys/themes/ThemeFactory.java,
 	  src/main/java/de/intevation/flys/jfree/XYStyle.java:
 	  Add debug logs.
-	  
+
 	* src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java,
 	  src/main/java/de/intevation/flys/jfree/StyledXYSeries.java:
 	  Draw the W/Q function as StyledXYSeries.
@@ -429,7 +444,7 @@
 	    if (gf == null) { /* FAIL */ }
 	    GaugeRange gr = gf.find(km); // km is the km where you are.
 	    if (gr == null) { /* FAIL */ }
-	
+
 	    double m0 = gr.getSectorBorder(0); // Draw as marker if not NaN
 	    double m1 = gr.getSectorBorder(1); // Draw as marker if not NaN
 	    double m2 = gr.getSectorBorder(2); // Draw as marker if not NaN
@@ -465,7 +480,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java:
 	  Moved GaugeFinder into top level class.
-	  
+
 2012-06-21	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/GaugeRange.java:
@@ -473,7 +488,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java:
 	  Moved GaugeRange into top level class.
-	  
+
 2012-06-21	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java:
@@ -919,7 +934,7 @@
 
 	* doc/conf/conf.xml: Using external system entities to configure databases.
 	  !!!
-	  !!! FROM NOW ON YOU CAN YOUR conf.xml FROM TRUNK. 
+	  !!! FROM NOW ON YOU CAN YOUR conf.xml FROM TRUNK.
 	  !!! Adjust the database credentials via the *-db.xml files
 	  !!! which are included.
 	  !!!
@@ -1035,17 +1050,17 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/Parameters.java:
 	  Comments added.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixWQCurveFacet.java:
 	  Logging output added.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixDerivateFacet.java:
 	  Max Q is now determined by parameter.interpolate().
-	  
+
 	* src/main/java/de/intevation/flys/exports/fixings/FixDerivedCurveGenerator.java,
 	  src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java:
 	  Use getCurrentKmFromRequest() in output generation.
-	  
+
 	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
 	  Typo in method description.
 
@@ -1077,7 +1092,7 @@
 	  Set missing required properties, so that this facet will be able to
 	  re-calculate results again if the results are not in cache.
 
-	* src/main/java/de/intevation/flys/artifacts/states/SQRelation.java: 
+	* src/main/java/de/intevation/flys/artifacts/states/SQRelation.java:
 	  Create correct number of facets for parameter A for outliers Facet.
 
 	* src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java:
@@ -1218,7 +1233,7 @@
 2012-06-13	Christian Lins	<christian.lins@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/XYChartGenerator.java:
-	  Add missing imports and correct coding issues. 
+	  Add missing imports and correct coding issues.
 
 2012-06-12	Christian Lins	<christian.lins@intevation.de>
 
@@ -1276,7 +1291,7 @@
 	* src/main/java/de/intevation/flys/artifacts/model/Parameters.java:
 	  Added interpolate methods that return an array of linear interpolated
 	  values for a given key. Say you have a column named "km" you can call
-	  'values = parameters.interpolate("km", 12)' to fetch a set 
+	  'values = parameters.interpolate("km", 12)' to fetch a set
 	  of proportional interpolated parameters even if there are only
 	  "km": 10 and "km": 15 in the data structure. Returns null if out of bounds.
 
@@ -1307,7 +1322,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/Parameters.java:
 	  Re-establish old indentation.
-	
+
 2012-06-07	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java:
@@ -1681,7 +1696,7 @@
 2012-05-30	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java:
-	  Calculate the Delta W/ts + 
+	  Calculate the Delta W/ts +
 	  the average Delta W/ts per Q sector per analysis period.
 	  !!! Very complicated stuff !!!
 	  TODO:
@@ -1801,7 +1816,7 @@
 
 	* src/main/java/de/intevation/flys/exports/DeltaWtExporter.java:
 	  Changed default column header of delta W to cm.
-	  
+
 2012-05-28	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	Made Delta W/t calculation work.
@@ -1922,13 +1937,13 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java:
 	  Create FixResults and DeltaWTsKM now to store the results.
-	
+
 2012-05-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/collections/AttributeParser.java:
 	  Replaced another silly "@attribute" XPATH with direct getAttribute()
 	  call.
-	
+
 2012-05-25	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Draw line of mainvalues to duration curve hit point to ground.
@@ -2503,7 +2518,7 @@
 	  Replaced event name by its description, which combines the
 	  description of the fixing (= WST file description) and the name
 	  of the column.
-	
+
 	* contrib/fixoverview2html.xsl: Adjusted.
 
 2012-05-16  Ingo Weinzierl <ingo@intevation.de>
@@ -2691,7 +2706,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/Parameters.java:
 	  New. Model for storing fitting results in cache.
-	  
+
 2012-05-14  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/states/ComputationRangeState.java:
@@ -2720,7 +2735,7 @@
 2012-05-13  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java:
-	  Removed unused code. 
+	  Removed unused code.
 
 2012-05-13  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
@@ -2759,7 +2774,7 @@
 
 	Tackle water-through-mountain issue that exists since r4099.
 
-	* src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java 
+	* src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java
 	  (addPoints): Add parameter that decides whether or not to skip NaNs.
 
 	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java,
@@ -3078,27 +3093,27 @@
 	* src/main/java/de/intevation/flys/artifacts/geom/Lines.java:
 	  Added local class LineData and return it to also include
 	  Length of lines.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/WaterLineArtifact.java:
 	  Changed signature of interfaces getWaterLines.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java,
 	  src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java,
 	  src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java:
 	  (getWaterLines): adjusted signature.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java:
 	  Adjusted to return type of Lines.createWaterLines.
-	
+
 	* src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java:
 	  Include length in label (stub).
 
 	* src/main/java/de/intevation/flys/jfree/HasLabel.java:
 	  New interface.
-	
+
 	* src/main/java/de/intevation/flys/jfree/StyledXYSeries.java:
 	  Implement new HasLabel interface.
-	
+
 	* src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java:
 	  Take into account that StyledXYSeries are HasLabel.
 
@@ -3324,7 +3339,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/WWQQJRDataSource.java:
 	  Added fields for new columns.
-	
+
 	* src/main/java/de/intevation/flys/exports/ReferenceCurveExporter.java:
 	  Added columns for 'W at gauge' and fixed column header.
 
@@ -3420,7 +3435,7 @@
 2012-04-05	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/services/FixingsKMChartService.java:
-	  Small fixes: The service works as expected but there seems 
+	  Small fixes: The service works as expected but there seems
 	  to be a caching issue.
 
 2012-04-05	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
@@ -3503,7 +3518,7 @@
 
 	  The input XML is nearly the same as for the overview service.
 	  Besides the river, filters and range it accepts elements
-	  <km value="..."/>                  for passing the river km, 
+	  <km value="..."/>                  for passing the river km,
 	  <extent width="..." height="..."/> for the extent of the output chart,
 	  <mime type="..."/>                 for type of result. Currently ignored.
 
@@ -3851,7 +3866,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java:
 	  Corrected name for waterlevel facets.
-	  
+
 2012-03-01	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Partial fix flys/issue615 (datacage: events for fixations).
@@ -3873,7 +3888,7 @@
 
 2012-02-27  Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
-	Added functions to be used for fitting in 
+	Added functions to be used for fitting in
 	the "Fixierungsanalyse" and "Extremwertermittlung".
 
 	* src/main/java/de/intevation/flys/artifacts/math/fitting/Function.java: New.
@@ -3908,7 +3923,7 @@
 
 	   !!! This power function is new in the pool of functions to be fit. !!!
 	   See my mail "Manuelle Punkte in der Fixierungsanalyse" 2011-10-27 for details.
-	   The function exp-new found in the old FLYS function pool is omitted 
+	   The function exp-new found in the old FLYS function pool is omitted
 	   because it is worthless and was maybe never used.
 
 	* src/main/java/de/intevation/flys/artifacts/math/fitting/App.java: New.
@@ -3934,14 +3949,14 @@
 2012-02-27	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	fix flys/issue638.
-	
+
 	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java
 	  (doArea): Ract to WKms as upper/lower area data again.
 
 2012-02-27	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Partial fix flys/issue637.
-	
+
 	* src/main/java/de/intevation/flys/exports/ReferenceCurveExporter.java,
 	  src/main/resources/messages.properties,
 	  src/main/resources/messages_de_DE.properties,
@@ -4215,7 +4230,7 @@
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
 	  Fetch the master discharge table for converting Ws to Qs. Handle
 	  the case that there are more Qs for a given W.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/model/Calculation6.java,
 	  src/main/java/de/intevation/flys/artifacts/model/Calculation4.java:
 	  Adjusted to new semantic.
@@ -4241,7 +4256,7 @@
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
 	  Fixed state evaluation for "W auf freier Strecke"/"W am Pegel".
 	  There is still an issue in the client with the input validation
-	  which prevents entering the right W values for 
+	  which prevents entering the right W values for
 	  "W auf freier Strecke". :-/
 
 2012-02-13  Sascha L. Teichmann	<sascha.teichmann@intevation.de>
@@ -4795,17 +4810,17 @@
 	  src/main/resources/messages_de_DE.properties,
 	  src/main/resources/messages_en.properties,
 	  src/main/resources/messages_de.properties: Fixed key spelling.
-	
+
 2012-02-08  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Fix flys/issue478 (Manuelle Punkte: Stil nicht änderbar).
-	
+
 	* doc/conf/themes: Map correct theme to manualpoint themes.
 
 2012-02-08  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Partial fix flys/issue472 .
-	
+
 	* doc/conf/artifacts/winfo.xml: Add manual points to compatibility
 	  list of cross_sections.
 
@@ -4994,7 +5009,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java(relateWs):
 	  Return the Qs of the Ws, too.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/model/Calculation5.java:
 	  Adjusted to cope with the return Qs. TODO: Create WQWQ or WWQQ dataset
 	  for storing the result.
@@ -5121,7 +5136,7 @@
 	  Stores gauge station kms for start and end km if they are any.
 
 	* src/main/java/de/intevation/flys/artifacts/model/ReferenceCurveFacet.java:
-	  Should generate a WWAxisTypes classifier via side effect to the 
+	  Should generate a WWAxisTypes classifier via side effect to the
 	  call context.
 
 	* src/main/java/de/intevation/flys/artifacts/model/Calculation5.java:
@@ -5333,7 +5348,7 @@
 	* src/main/java/de/intevation/flys/artifacts/states/ComputationRangeState.java,
 	  src/main/java/de/intevation/flys/utils/FLYSUtils.java
 	  (getMinMax, getRiverMinMax): Refactored. Moved to FLYSUtils.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/states/MinMaxState.java:
 	  Add so-called javadoc.
 
@@ -5441,7 +5456,7 @@
 2012-02-01  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/states/ReferenceCurveState.java:
-	  Added pro forma facet. 
+	  Added pro forma facet.
 
 2012-02-01  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
@@ -5578,7 +5593,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/states/ManualPointsSingleState.java:
 	  Iterate over chart types. Add facets if corresponding data is found.
-	
+
 	* src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java,
 	  src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java,
 	  src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java,
@@ -5629,7 +5644,7 @@
 	* src/main/java/de/intevation/flys/artifacts/model/Calculation5.java:
 	  Construct the WWs with startKm and endKm. This is necessary because
 	  if an error occurs in calcuting an in between km in a list of end kms
-	  the index does not correspond to the input value any more. 
+	  the index does not correspond to the input value any more.
 
 2012-01-30  Ingo Weinzierl <ingo@intevation.de>
 
@@ -5698,7 +5713,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
 	  Call the 'Bezugslinienverfahren'.
-	
+
 	* src/main/resources/messages.properties,
 	  src/main/resources/messages_de_DE.properties,
 	  src/main/resources/messages_en.properties,
@@ -5756,7 +5771,7 @@
 	 * src/main/java/de/intevation/flys/artifacts/model/Calculation5.java:
 	   New. Calcutation to be created from WINFOArtifact
 	   for the 'Bezugslinienverfahren'.
-	
+
 	 * src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
 	   Added TODO about optimization of the 'Bezugslinienverfahren'.
 	   Added number of default samples of the W~W relation.
@@ -5968,7 +5983,7 @@
 
 	* doc/conf/artifacts/winfo.xml: Added manual point facet to
 	  compatibility list of longitudinal section diagram.
-	
+
 2012-01-26  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Cosmetics.
@@ -6002,7 +6017,7 @@
 
 2012-01-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
-	* doc/conf/artifacts/winfo.xml: Add states/transitions stubs for 
+	* doc/conf/artifacts/winfo.xml: Add states/transitions stubs for
 	"Bezugsllinenverfahren."
 
 	* src/main/java/de/intevation/flys/artifacts/states/ReferenceCurveState.java,
@@ -6011,7 +6026,7 @@
 
 2012-01-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
-	* contrib/visualize-transitions.xsl: Fixed output of the conditions 
+	* contrib/visualize-transitions.xsl: Fixed output of the conditions
 	  of the transitions. Now you can see the circumstances
 	  when a branch is taken.
 
@@ -6234,7 +6249,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/states/StaticHYKState.java:
 	  Cleanup. Mark spot where State-based caching could happen.
-	  
+
 2012-01-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/HYKFacet.java:
@@ -6322,7 +6337,7 @@
 	* src/main/java/de/intevation/flys/artifacts/model/HYKFactory.java:
 	  Make HYK name accessible, do not query hyks by river, but by hyk-id,
 	  made query more real-world.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/states/StaticHYKState.java:
 	  Use hyks name as facet name, pass hyk-id when asking for hyks.
 
@@ -6451,8 +6466,8 @@
 2012-01-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/LocationProvider.java:
-	  Cache a TreeMap<km, annotation string> of the annotation values of whole 
-	  rivers. This is _much_ more efficient than firing an HQL/SQL statement for 
+	  Cache a TreeMap<km, annotation string> of the annotation values of whole
+	  rivers. This is _much_ more efficient than firing an HQL/SQL statement for
 	  each km and caching these results.
 
 2012-01-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
@@ -6499,7 +6514,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/states/StaticWQKmsState.java:
 	  New. State.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java:
 	  Refactored. Most computation and stuff now done in State and Facet.
 
@@ -6531,13 +6546,13 @@
 
 2012-01-16	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
-	  Use improved caching for cross section data. 
+	  Use improved caching for cross section data.
 	  !!! This commit needs heavy testing !!!
 
 	* src/main/java/de/intevation/flys/artifacts/services/CrossSectionKMService.java:
 	  Refactored to provide the map to determine the nearest cross section line
 	  neighbors for a given km to the public. This is a bit hackish because
-	  it hhould have its own factory which is then used by this service and 
+	  it hhould have its own factory which is then used by this service and
 	  other parts of the code.
 
 	* src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java:
@@ -6666,18 +6681,18 @@
 2011-01-12	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	flys/issue450 (i18n: Datenkorb: longitudinal-section)
-	
+
 	* doc/conf/meta-data.xml: Replaced dash by underscore in
 	  longitudinal-section.
 
 2011-01-12	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Towards areas on other than the first axes.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java:
 	  Changed signature on which to provide data via the blackboard.
 	  Include facets name to allow unique identification.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/model/AreaFacet.java:
 	  Store name of one of the facets involved in area creation.
 	  (AreaFacet.Data): New class to hold result data.
@@ -6799,7 +6814,7 @@
 2011-01-06	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Add cache for 'static' wqkms (e.g. BaseData) to default cache conf.
-	
+
 	* doc/conf/cache.xml: Add Cache Config for static wqkms.
 
 	* src/main/java/de/intevation/flys/artifacts/model/StaticWQKmsCacheKey.java:
@@ -6930,7 +6945,7 @@
 
 2011-01-05	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
-	flys/issue443 (Querprofile: Hibernate LazyInitializationException) 
+	flys/issue443 (Querprofile: Hibernate LazyInitializationException)
 
 	* doc/conf/cache.xml: Disable cache for cross-sections.
 
@@ -7041,7 +7056,7 @@
 
 	* src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java:
 	  Allow styling of outline of areas.
-	
+
 	* src/main/java/de/intevation/flys/exports/StyledAreaSeriesCollection.java:
 	  Parse outline style for areas, apply it to renderer.
 
@@ -7457,7 +7472,7 @@
 
 	* src/main/java/de/intevation/flys/utils/ThemeUtil.java: Helper to
 	  access transparency setting in theme.
-	
+
 	* src/main/java/de/intevation/flys/exports/StyledAreaSeriesCollection.java:
 	  Respect transparency setting.
 
@@ -7817,7 +7832,7 @@
 	  be implemented by subclasses.
 
 	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java:
-	  Override buildAxisSections() of XYChartGenerator to create an AxisSection 
+	  Override buildAxisSections() of XYChartGenerator to create an AxisSection
 	  for each axis that is able to be displayed in this sort of chart. In
 	  addition, there is a new method getYAxisLabel(int) that returns the label
 	  for a specific Y axis.
@@ -7927,7 +7942,7 @@
 	* src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java:
 	  Convenience cosmetic.
 
-	* src/main/java/de/intevation/flys/utils/DataUtil.java: 
+	* src/main/java/de/intevation/flys/utils/DataUtil.java:
 	  vim-magicosmetic.
 
 2011-12-14	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
@@ -8029,14 +8044,14 @@
 	  (getCrossSectionData): Removed, most functionality contained in
 				 CrossSectionArtifact.
 	  (getWaterLines): Now get CrossSectionLines to calculate water line.
-	 
+
 	* src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java:
 	  Get a CrossSectionLine from blackboard.
-	
+
 	* src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java:
 	  Hard TODO, commented out function needed for subtitle to allow
 	  compilation.
-	
+
 	* src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java:
 	  Added Empty-Dataset- guard.
 
@@ -8394,7 +8409,7 @@
 
 	  This is to be called when doing a "W auf freier Strecke" calculation
 	  to find out the Qs belonging to the user given W.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java,
 	  src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java,
 	  src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java:
@@ -8457,7 +8472,7 @@
 	  Keep relation between index and dataset, once its added. Compute
 	  ranges per index. Allow subclasses to override createAxes to specify
 	  internationalized labels etc.
-	
+
 	* src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java,
 	  src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java,
 	  src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java,
@@ -8762,9 +8777,9 @@
 	  at the given km.
 
 	* src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java:
-	  Spliting by NaNs definition holes _should_ work now. Needs 
+	  Spliting by NaNs definition holes _should_ work now. Needs
 	  some more testing.
-	  TODOs: 
+	  TODOs:
 	  - Use log4j instead of println for logging.
 	  - Subclass XYDifferenceRenderer instead of replacing it totally.
 
@@ -8986,7 +9001,7 @@
 	Handle Annotations in DischargeLongitudinalSection diagrams.
 
 	* src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java:
-	  Call doAnnotations for LONGITUDINAL_ANNOTATION facets. 
+	  Call doAnnotations for LONGITUDINAL_ANNOTATION facets.
 
 2011-11-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
@@ -8995,7 +9010,7 @@
 	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java
 	  (doAnnotationsOut): Removed duplicate code.
 	  Theoretically handle WQKMS data.
-	
+
 	* src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java:
 	  Adjusted call to doAnnotationOut.
 
@@ -9016,7 +9031,7 @@
 2011-11-10	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java:
-	  Use separate XYDataset for each curve. This is needed because 
+	  Use separate XYDataset for each curve. This is needed because
 	  "Raum/Flaeche" needs specialized renderers, which are not compatible
 	  with the standard renderers.
 
@@ -9244,7 +9259,7 @@
 
 	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
 	  Be more specific in what to catch.
-	
+
 2011-11-04  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/meta-data.xml: Added the CrossSectionTracks to the "floodmap"
@@ -9341,7 +9356,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java:
 	  Createing ThemeMapping with output attribute from configuration.
-	  
+
 	* src/main/java/de/intevation/flys/themes/ThemeFactory.java:
 	  (getTheme(FLYSContext, string)): Removed, never called.
 	  (getTheme): Added outputName argument, match it.
@@ -9366,16 +9381,16 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/StaticWQKmsCacheKey.java:
 	  Cache Key for static wqkms data.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/model/WQKmsFacet.java:
 	  Facet for WQKms.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/model/WQKmsFactory.java:
 	  Factory to access WQKms.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java:
 	  Artifact that provides 'static' WQKms.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java:
 	  Added STATIC_WQKMS type.
 
@@ -9452,7 +9467,7 @@
 	  needed any longer.
 
 2011-11-03  Sascha L. Teichmann <sascha.teichmann@intevation.de>
-	
+
 	* src/main/java/de/intevation/flys/utils/Pair.java: New. A generic pair.
 
 	* src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java:
@@ -9513,23 +9528,23 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java:
 	  Added new FacetType HEIGHTMARK_POINTS.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java:
 	  Allow name to be given in constructor.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java:
 	  If heightmarks were loaded, give respective name in WKmsFacet
 	  generation.
 
 	* doc/conf/themes.xml: Added virtual "Points" and concrete
 	  heightmark_points - theme.
-	
+
 	* doc/conf/artifacts/winfo.xml: Made longitudinal_section output
 	  compatible with heightmarks_points.
 
 	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java:
 	  Render heightmarks like other wkms.
-	
+
 	* doc/conf/meta-data.xml: Changed heightmark ids such that it can be
 	  identified in StaticWKmsFacet .
 
@@ -9833,7 +9848,7 @@
 
 2011-10-28	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
-	* src/main/java/de/intevation/flys/collections/AttributeWriter.java: 
+	* src/main/java/de/intevation/flys/collections/AttributeWriter.java:
 	  Survive case where a given output doesnt exist in compatibility
 	  matrix.
 
@@ -9841,7 +9856,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/states/StaticState.java:
 	  Added simpler constructor.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java,
 	  src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java:
 	  Adjusted construction of StaticStates.
@@ -9919,10 +9934,10 @@
 
 	* src/main/java/de/intevation/flys/utils/FLYSUtils.java
 	  (getFlysContext): Added, extracted from FLYSArtifact.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
 	  (getFlysContext): Moved to FLYSUtils, updated callers.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java,
 	  src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
 	  Update callers to getFlysContext.
@@ -10140,7 +10155,7 @@
 
 	To obtain the size of a diagram it is rendered twice. The
 	second time the generated image is omitted so the concrete
-	rendered image is not needed. To save CPU cycles in this pass 
+	rendered image is not needed. To save CPU cycles in this pass
 	the image is rendered to to /dev/null Graphics2D object.
 
 	* src/main/java/de/intevation/flys/exports/ChartInfoGenerator.java:
@@ -10174,7 +10189,7 @@
 	* src/main/java/de/intevation/flys/artifacts/services/CrossSectionKMService.java:
 	  New. Service to lookup the Nth nearest neighbors for a set of given
 	  cross section ids and kms.
-	
+
 	* doc/conf/conf.xml: Registered service.
 
 	* doc/conf/cache.xml: Cache config.
@@ -10383,7 +10398,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/WKmsFactory.java:
 	  Removed dependence on "kind", but fetch name for created WKms.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java:
 	  Remove dependence on Kind.
 
@@ -10408,10 +10423,10 @@
 
 	* src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java:
 	  New, artifact with single state to get WKms from WKmsFactory.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java:
 	  New Facet to display W over km.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java:
 	  Added new type name.
 
@@ -10447,7 +10462,7 @@
 2011-10-18	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Fix issue that Annotations do not come with theme/style.
-	
+
 	* doc/conf/themes.xml: Added "Annotations" default style.
 
 	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java:
@@ -10889,7 +10904,7 @@
 	* src/main/java/de/intevation/flys/artifacts/model/WKms.java(allKms, allWs):
 	  Added methods to fetch all kms and all ws.
 
-	* src/main/java/de/intevation/flys/utils/DataUtil.java: Generalized to 
+	* src/main/java/de/intevation/flys/utils/DataUtil.java: Generalized to
 	  get WKms as arguments.
 
 	* src/main/java/de/intevation/flys/artifacts/model/WQKms.java,
@@ -11692,7 +11707,7 @@
 	Added CSV Export for W-Differences.
 
 	* doc/conf/conf.xml: Added Exporter.
-	
+
 	* doc/conf/artifacts/winfo.xml: Removed transition over distances
 	  state, added export outputmode and facet.
 
@@ -11706,7 +11721,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/DataFacet.java:
 	  Cosmetics, docs.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java,
 	  src/main/java/de/intevation/flys/exports/AbstractExporter.java,
 	  src/main/java/de/intevation/flys/exports/DurationCurveExporter.java:
@@ -11744,7 +11759,7 @@
 	  CallContext.addBackgroundMessage(). We use instances of
 	  CalculationMessage here, that makes the WINFOArtifact able to put
 	  progress information into the Artifact's DESCRIBE as well.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: Write
 	  status message and progress information into the DESCRIBE if the
 	  Artifact has started a background process.
@@ -12770,12 +12785,12 @@
 2011-08-22  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Moved all
-	  WINFO specific code to WINFOArtifact. FLYSArtifact is now only revolving 
+	  WINFO specific code to WINFOArtifact. FLYSArtifact is now only revolving
 	  about state affairs.
 
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: Re-inserted
 	  the specific stuff here.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java,
 	  src/main/java/de/intevation/flys/artifacts/states/LocationDistanceSelect.java,
 	  src/main/java/de/intevation/flys/artifacts/states/WQSelect.java,
@@ -12909,16 +12924,16 @@
 	               a2.state          AS state,
 	               a2.creation       AS creation,
 	               ci2.collection_id AS collection_id
-	        FROM   collection_items ci2 
-	               JOIN artifacts a2 
-	                 ON ci2.artifact_id = a2.id 
-	               JOIN (SELECT ci.collection_id AS c_id, 
-	                            MIN(a.creation)  AS oldest_a 
-	                     FROM   collection_items ci 
-	                            JOIN artifacts a 
-	                              ON ci.artifact_id = a.id 
-	                     GROUP  BY ci.collection_id) o 
-	                 ON o.c_id = ci2.collection_id 
+	        FROM   collection_items ci2
+	               JOIN artifacts a2
+	                 ON ci2.artifact_id = a2.id
+	               JOIN (SELECT ci.collection_id AS c_id,
+	                            MIN(a.creation)  AS oldest_a
+	                     FROM   collection_items ci
+	                            JOIN artifacts a
+	                              ON ci.artifact_id = a.id
+	                     GROUP  BY ci.collection_id) o
+	                 ON o.c_id = ci2.collection_id
 	        WHERE  a2.creation = o.oldest_a;
 
 	 TODO: Use the view in the templates.
@@ -13241,8 +13256,8 @@
 	  To use this feature you can add an "connection" attribute
 	  to <dc:context> with the name of the connection to use.
 	  If no connection name is given the last used is used again.
-	  Initially the first connection in the given list is used. 
-	  If the context is left the connection that was active before 
+	  Initially the first connection in the given list is used.
+	  If the context is left the connection that was active before
 	  will be active again in a stacking manner.
 
 	  When creating NamedConnection objects you can set a boolean flag
@@ -13279,7 +13294,7 @@
 	* src/main/java/de/intevation/flys/artifacts/datacage/DatacageBackendListener.java,
 	  src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java:
 	  Forwarded kill collections and artifacts events to datacage.
-	
+
 	* src/main/resources/datacage-sql/org-h2-driver.properties,
 	  src/main/resources/datacage-sql/org-postgresql-driver.properties:
 	  Added statement to delete artifact by uuid.
@@ -13296,7 +13311,7 @@
 
 	  TODO  I: Added some cleanup for orphaned artifacts.
 	  TODO II: Figure out a way to delete collections/artifacts
-	           which are delete from backend without the 
+	           which are delete from backend without the
 			   backend API.
 
 	* src/main/resources/datacage-sql/org-h2-driver.properties,
@@ -13337,7 +13352,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/datacage/DatacageBackendListener.java:
 	  New. Proxies backend listener calls to datacage.
-	 
+
 	* src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java:
 	  Implements backend listener. TODO: Update the datacage database
 	  according the change calls.
@@ -13357,7 +13372,7 @@
 
 2011-08-01  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
-	* doc/conf/conf.xml: For documentation purposes added a out-commented 
+	* doc/conf/conf.xml: For documentation purposes added a out-commented
 	  section with the default configuration of the datacage.
 
 2011-07-31  Sascha L. Teichmann <sascha.teichmann@intevation.de>
@@ -13488,7 +13503,7 @@
 	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
 	  Make the current outs of an artifact accessible only with
 	  the global context.
-	
+
 2011-07-27  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* doc/conf/datacage.sql: Added ON DELETE CASCADE constraints.
@@ -13680,7 +13695,7 @@
 	  with 'macro'. There bodies can contain all valid elements
 	  including other 'macro's and 'call-macro's. They are
 	  called with their 'name' with 'call-macro'. The control flow
-	  is continued inside the body of the called macro and 
+	  is continued inside the body of the called macro and
 	  will continue right after the calling 'call-macro' when
 	  the macro body is finished.
 
@@ -13760,7 +13775,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/services/meta/StackFrames.java:
 	  Implements now variable provider for XPath expressions.
-	
+
 	* src/main/java/de/intevation/flys/artifacts/services/meta/Builder.java:
 	  Added new choose/when/otherwise construct similiar to XSLT
 
@@ -14301,7 +14316,7 @@
 	  The functionality we need is in 1.1 so this downgrade should
 	  cause no problems.
 
-	  Would be nice if we would support the maintainers of trove to 
+	  Would be nice if we would support the maintainers of trove to
 	  bring there new versions back into the main maven repos.
 
 2011-06-28  Ingo Weinzierl <ingo@intevation.de>
@@ -14402,7 +14417,7 @@
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
 	  The reference gauge for calculations "am Pegel" was determined
 	  wrong.
-	  
+
 2011-06-25  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/DischargeTables.java:
@@ -14448,7 +14463,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java:
 	  Generate AT facets.
-	
+
 2011-06-23  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/ATExporter.java: New.
@@ -14608,7 +14623,7 @@
 
 	* src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionExporter.java:
 	  Checks for right class now.
-	
+
 2011-06-21  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	Fix for flys/issue154
@@ -14759,7 +14774,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/DurationCurveFacet.java: New.
 	  Specialized facet to access the duration data stored in WQDay data structures.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: Facets are
 	  now generated dynamically from the current available ones stored with
 	  the artifact.
@@ -14776,7 +14791,7 @@
 	  states overwrites the computeAdvance() and computeFeed() methods to do
 	  the corresponding WINFO calculations.
 
-	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Calls 
+	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Calls
 	  computeAdvance() and computeFeed() if artifact is fed or advanced. Centralized
 	  the caching mechanism.
 
@@ -14889,7 +14904,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
 	  Loop errors through for q->w interpolations.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/model/WQDay.java:
 	  Added constructor to directly create with calculated results.
 
@@ -15251,7 +15266,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: Re-enabled
 	  calculation of the back jump correction. Fixed more flow direction issues.
-	  
+
 2011-05-27  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
@@ -15450,13 +15465,13 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/WstFactory.java:
 	  Forget to select wst kind.
-	  
+
 2011-05-20	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	flys/issue81
 
 	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
-	  weights for kms were swapped. 
+	  weights for kms were swapped.
 
 2011-05-20  Ingo Weinzierl <ingo@intevation.de>
 
@@ -15577,7 +15592,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
 	  Use new logic to calculate "Wasserstand/Wasserspiegellage".
-	  Compared to desktop FLYS are the results are structurally right 
+	  Compared to desktop FLYS are the results are structurally right
 	  but a bit off in the positions after the decimal points.
 	  Maybe a result of the interpolation? Need to debug this.
 
@@ -15671,9 +15686,9 @@
 	* src/main/java/de/intevation/flys/artifacts/math/LinearRemap.java:
 	  New. Remaps "gleichwertige" Q values to the corresponding
 	  "ungleichwertige" Q values depending on km.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
-	  Remap the Q values "ungleichwertig" depending on the 
+	  Remap the Q values "ungleichwertig" depending on the
 	  "gleichwertige" ones.
 
 2011-05-10	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
@@ -15782,7 +15797,7 @@
 2011-05-10	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java:
-	  Fetches river name from incoming XML document. If no river is given all 
+	  Fetches river name from incoming XML document. If no river is given all
 	  infos about all rivers are listed.
 
 	* src/main/resources/metadata/template.xml: Templates honors the 'river'
@@ -15794,7 +15809,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/services/meta/StackFrames.java:
 	  Take parameters as an initial stack frame.
-	  
+
 	* src/main/java/de/intevation/flys/artifacts/services/meta/TypeConverter.java:
 	  New. Converts types off stacked variables.
 
@@ -16198,7 +16213,7 @@
 	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
 	  Use the cache for the wst value table if configured.
 
-	* doc/conf/cache.xml: Choose a more precise name for the 
+	* doc/conf/cache.xml: Choose a more precise name for the
 	  wst value table cache.
 
 2011-04-29	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
@@ -16393,7 +16408,7 @@
 
 2011-04-28	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
-	* contrib/visualize-transitions.xsl: Added to create a 
+	* contrib/visualize-transitions.xsl: Added to create a
 	  Graphviz digraph out of the config.xml. Usage:
 
 	  $ xsltproc --stringparam base-dir ../doc/conf/ \
@@ -16622,7 +16637,7 @@
 	* src/main/java/de/intevation/flys/artifacts/model/DischargeTables.java:
 	  Added static method getWForQ() to interpolate a w value for
 	  a given q value based on a given discharge table.
-	
+
 2011-04-19	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/DischargeTables.java:
@@ -16792,10 +16807,10 @@
 
 	* src/main/java/de/intevation/flys/artifacts/context/SessionCallContextListener.java:
 	  Interacts with SessionHolder now.
-	
+
 	* src/main/java/de/intevation/flys/exports/ChartExportHelper.java:
 	  Removed superfluous import.
-	
+
 2011-04-14  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/context/SessionCallContextListener.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixDerivateFacet.java	Wed Jun 27 09:16:28 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixDerivateFacet.java	Wed Jun 27 11:50:24 2012 +0000
@@ -44,6 +44,10 @@
         super(0, name, description, ComputeType.ADVANCE, null, null);
     }
 
+    public FixDerivateFacet(int index, String name, String description) {
+        super(index, name, description, ComputeType.ADVANCE, null, null);
+    }
+
 
     /**
      * Returns the data this facet requires.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixDeviationFacet.java	Wed Jun 27 09:16:28 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixDeviationFacet.java	Wed Jun 27 11:50:24 2012 +0000
@@ -41,6 +41,10 @@
         super(0, name, description, ComputeType.ADVANCE, null, null);
     }
 
+    public FixDeviationFacet(int index, String name, String description) {
+        super(index, name, description, ComputeType.ADVANCE, null, null);
+    }
+
 
     /**
      * Returns the data this facet requires.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixOutlierFacet.java	Wed Jun 27 09:16:28 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixOutlierFacet.java	Wed Jun 27 11:50:24 2012 +0000
@@ -41,6 +41,10 @@
         super(0, name, description, ComputeType.ADVANCE, null, null);
     }
 
+    public FixOutlierFacet(int index, String name, String description) {
+        super(index, name, description, ComputeType.ADVANCE, null, null);
+    }
+
 
     /**
      * Returns the data this facet requires.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixWQCurveFacet.java	Wed Jun 27 09:16:28 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixWQCurveFacet.java	Wed Jun 27 11:50:24 2012 +0000
@@ -44,6 +44,10 @@
         super(0, FIX_WQ_CURVE, description, ComputeType.ADVANCE, null, null);
     }
 
+    public FixWQCurveFacet(int index, String description) {
+        super(index, FIX_WQ_CURVE, description, ComputeType.ADVANCE, null, null);
+    }
+
 
     /**
      * Returns the data this facet requires.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java	Wed Jun 27 09:16:28 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixationCompute.java	Wed Jun 27 11:50:24 2012 +0000
@@ -63,6 +63,25 @@
 
     private static final String I18N_REFERENCEDEVIATION = "fix.reference.deviation";
 
+    public static class IdGenerator {
+	private int id;
+
+	public IdGenerator() {
+	}
+
+	public IdGenerator(int id) {
+	    this.id = id;
+	}
+
+	public int next() {
+	    return id++;
+	}
+
+	public int next(int s) {
+	    return id += s;
+	}
+    }
+
     /**
      * The default constructor that initializes an empty State object.
      */
@@ -104,8 +123,10 @@
         facets.add(
             new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
 
+	int maxId = -100;
 
         int count = access.getAnalysisPeriods().length;
+
         for (int i = 0; i < count; i++) {
             DateRange period = access.getAnalysisPeriods()[i];
             DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM);
@@ -131,6 +152,8 @@
                 int facetNdx = i << 2;
                 facetNdx = facetNdx | j;
 
+               if (facetNdx > maxId) maxId = facetNdx;
+
                 facets.add(
                     new FixAvSectorFacet(facetNdx,
                                          FIX_SECTOR_AVERAGE_DWT + "_" + sectorNdx,
@@ -150,6 +173,7 @@
                                          description));
 
             }
+
             String eventDesc =
                 Resources.getMsg(context.getMeta(),
                                  I18N_ANALYSIS,
@@ -166,6 +190,8 @@
                 eventDesc));
         }
 
+	IdGenerator idg = new IdGenerator(maxId);
+
         String i18n_ref = Resources.getMsg(context.getMeta(),
                 I18N_REFERENCEPERIOD,
                 I18N_REFERENCEPERIOD);
@@ -174,48 +200,53 @@
                 I18N_REFERENCEDEVIATION);
 
 
-        facets.add(new FixReferenceEventsFacet(0,
+        facets.add(new FixReferenceEventsFacet(idg.next(),
             FIX_REFERENCE_EVENTS_DWT,
             i18n_ref));
-        facets.add(new FixLongitudinalReferenceFacet(1,
+        facets.add(new FixLongitudinalReferenceFacet(idg.next(),
             FIX_REFERENCE_EVENTS_LS,
             i18n_ref));
-        facets.add(new FixReferenceEventsFacet(2,
+        facets.add(new FixReferenceEventsFacet(idg.next(),
             FIX_REFERENCE_EVENTS_WQ,
             i18n_ref));
 
-        facets.add(new FixLongitudinalDeviationFacet(0,
+        facets.add(new FixLongitudinalDeviationFacet(idg.next(),
             FIX_DEVIATION_LS,
             i18n_dev));
 
         String i18n_ana = Resources.getMsg(context.getMeta(),
                 I18N_ANALYSISPERIODS,
                 I18N_ANALYSISPERIODS);
-        facets.add(new FixAnalysisPeriodsFacet(0,
+        facets.add(new FixAnalysisPeriodsFacet(idg.next(),
             FIX_ANALYSIS_PERIODS_DWT,
             i18n_ana));
-        facets.add(new FixAnalysisPeriodsFacet(1,
+        facets.add(new FixAnalysisPeriodsFacet(idg.next(),
             FIX_ANALYSIS_PERIODS_LS,
             i18n_ana));
-        facets.add(new FixAnalysisPeriodsFacet(2,
+        facets.add(new FixAnalysisPeriodsFacet(idg.next(),
             FIX_ANALYSIS_PERIODS_WQ,
             i18n_ana));
 
-        facets.add(new FixWQCurveFacet("W/Q"));
+
+        facets.add(new FixWQCurveFacet(idg.next(), "W/Q"));
 
         Boolean preprocessing = access.getPreprocessing();
 
         if (preprocessing != null && preprocessing) {
-            facets.add(new FixOutlierFacet(FIX_OUTLIER,
+            facets.add(new FixOutlierFacet(idg.next(), FIX_OUTLIER,
                 Resources.getMsg(context.getMeta(), I18N_OUTLIER, I18N_OUTLIER)));
         }
 
-        facets.add(new FixDerivateFacet(FIX_DERIVATE,
+        facets.add(new FixDerivateFacet(
+	    idg.next(),
+	    FIX_DERIVATE,
             Resources.getMsg(context.getMeta(),
                 I18N_DERIVATIVE,
                 I18N_DERIVATIVE)));
 
-        facets.add(new FixDeviationFacet(FIX_DEVIATION_DWT,
+        facets.add(new FixDeviationFacet(
+	    idg.next(),
+	    FIX_DEVIATION_DWT,
             Resources.getMsg(context.getMeta(),
                 I18N_DEVIATION,
                 I18N_DEVIATION)));
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Wed Jun 27 09:16:28 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Wed Jun 27 11:50:24 2012 +0000
@@ -11,7 +11,7 @@
 
 import de.intevation.flys.exports.ChartGenerator;
 
-import de.intevation.flys.jfree.Function2DAdapter;
+import de.intevation.flys.jfree.JFreeUtil;
 import de.intevation.flys.jfree.StyledXYSeries;
 
 import org.apache.log4j.Logger;
@@ -142,16 +142,15 @@
         double maxQ = func.getMaxQ();
 
         if(maxQ > 0) {
-            XYSeries series = DatasetUtilities.sampleFunction2DToSeries(
-                new Function2DAdapter(func.getFunction()),
-                0,              // start
-                func.getMaxQ(), // end
-                500,            // number of samples
-                aaf.getFacetDescription());
+            StyledXYSeries series = JFreeUtil.sampleFunction2D(
+                func.getFunction(),
+                doc,
+                aaf.getFacetDescription(),
+                500,             // number of samples
+                0.0 ,               // start
+                func.getMaxQ()); // end
 
-            // Wrap to StyledXYSeries
-            XYSeries styledSeries = new StyledXYSeries(aaf.getFacetDescription(), doc, series);
-            addAxisSeries(styledSeries, 0, visible);
+            addAxisSeries(series, 0, visible);
         }
         else {
             logger.warn("doWQCurveOut: maxQ <= 0");

http://dive4elements.wald.intevation.org