changeset 3227:ed07dd55f487

Fixed various bugs (package declarations, moved classes to correct places). flys-artifacts/trunk@4854 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 03 Jul 2012 08:46:14 +0000
parents cd79a4e1e80d
children 698d09930329
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterLineArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Lines.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/VectorUtils.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/DifferenceCurveFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DifferenceCurveFacet.java flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationExporter.java flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledAreaSeriesCollection.java flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeAccess.java
diffstat 20 files changed, 126 insertions(+), 119 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/ChangeLog	Tue Jul 03 08:46:14 2012 +0000
@@ -1,3 +1,27 @@
+2012-07-03  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java,
+	  src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java,
+	  src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java,
+	  src/main/java/de/intevation/flys/artifacts/math/DifferenceCurveFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/DifferenceCurveFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java,
+	  src/main/java/de/intevation/flys/artifacts/geom/VectorUtils.java,
+	  src/main/java/de/intevation/flys/artifacts/geom/Lines.java,
+	  src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java,
+	  src/main/java/de/intevation/flys/artifacts/WaterLineArtifact.java,
+	  src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java,
+	  src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java,
+	  src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java,
+	  src/main/java/de/intevation/flys/exports/sq/SQRelationExporter.java,
+	  src/main/java/de/intevation/flys/exports/ChartGenerator.java,
+	  src/main/java/de/intevation/flys/exports/XYChartGenerator.java,
+	  src/main/java/de/intevation/flys/themes/ThemeAccess.java,
+	  src/main/java/de/intevation/flys/jfree/StyledAreaSeriesCollection.java:
+	  Fixed various bugs (package declarations, moved classes to correct
+	  places).
+
 2012-07-03  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/themes.xml: Removed line properties from fixation point themes
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java	Tue Jul 03 08:46:14 2012 +0000
@@ -24,7 +24,7 @@
 
 import de.intevation.flys.model.FastCrossSectionLine;
 
-import de.intevation.flys.geom.Lines;
+import de.intevation.flys.artifacts.geom.Lines;
 
 
 /**
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Tue Jul 03 08:46:14 2012 +0000
@@ -30,7 +30,7 @@
 
 import de.intevation.artifacts.common.utils.XMLUtils;
 
-import de.intevation.flys.geom.Lines;
+import de.intevation.flys.artifacts.geom.Lines;
 
 import de.intevation.flys.model.FastCrossSectionLine;
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Tue Jul 03 08:46:14 2012 +0000
@@ -24,7 +24,7 @@
 
 import de.intevation.flys.artifacts.states.LocationDistanceSelect;
 
-import de.intevation.flys.geom.Lines;
+import de.intevation.flys.artifacts.geom.Lines;
 
 import de.intevation.flys.model.DischargeTable;
 import de.intevation.flys.model.FastCrossSectionLine;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterLineArtifact.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterLineArtifact.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,7 +1,6 @@
 package de.intevation.flys.artifacts;
 
-import de.intevation.flys.geom.Lines;
-
+import de.intevation.flys.artifacts.geom.Lines;
 import de.intevation.flys.model.FastCrossSectionLine;
 /**
  * Interface, Artifact can create WaterLines (Water against Cross-Profile).
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java	Tue Jul 03 08:46:14 2012 +0000
@@ -2,7 +2,7 @@
 
 import de.intevation.flys.backend.SessionFactoryProvider;
 
-import de.intevation.flys.geom.Lines;
+import de.intevation.flys.artifacts.geom.Lines;
 
 import de.intevation.flys.model.CrossSection;
 import de.intevation.flys.model.CrossSectionLine;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Lines.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Lines.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,4 +1,4 @@
-package de.intevation.flys.geom;
+package de.intevation.flys.artifacts.geom;
 
 import java.util.ArrayList;
 import java.util.List;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,23 +1,19 @@
-package de.intevation.flys.geom;
-
-import java.io.Serializable;
+package de.intevation.flys.artifacts.geom;
 
 import java.awt.Shape;
-
 import java.awt.geom.Path2D;
 import java.awt.geom.Point2D;
-
+import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Collections;
 
 import de.intevation.flys.artifacts.math.Linear;
-
-import static de.intevation.flys.geom.VectorUtils.X;
-import static de.intevation.flys.geom.VectorUtils.Y;
-import static de.intevation.flys.geom.VectorUtils.EPSILON;
+import static de.intevation.flys.artifacts.geom.VectorUtils.EPSILON;
+import static de.intevation.flys.artifacts.geom.VectorUtils.X;
+import static de.intevation.flys.artifacts.geom.VectorUtils.Y;
 
 public class Polygon2D
 implements   Serializable
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/VectorUtils.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/VectorUtils.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,4 +1,4 @@
-package de.intevation.flys.geom;
+package de.intevation.flys.artifacts.geom;
 
 import java.awt.geom.Point2D;
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/DifferenceCurveFacet.java	Tue Jul 03 07:23:46 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-package de.intevation.flys.artifacts.model;
-
-import org.apache.log4j.Logger;
-
-import de.intevation.artifacts.Artifact;
-import de.intevation.artifacts.CallContext;
-
-import de.intevation.artifactdatabase.state.Facet;
-
-import de.intevation.flys.artifacts.WINFOArtifact;
-
-import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
-
-
-/**
- * Facet with the curve of a subtraction of two waterlevel-lines.
- * TODO inherit directly from DataFacet? Check whether this Facet is obsolete.
- */
-public class DifferenceCurveFacet extends WaterlevelFacet {
-
-    private static Logger logger = Logger.getLogger(DifferenceCurveFacet.class);
-
-
-    public DifferenceCurveFacet() {
-    }
-
-    public DifferenceCurveFacet(
-        int         index,
-        String      name,
-        String      description,
-        ComputeType type,
-        String      stateID,
-        String      hash
-
-    ) {
-        super(index, name, description, type, stateID, hash);
-    }
-
-    /**
-     * Get difference curve data.
-     * @return a WKms at given index.
-     */
-    @Override
-    public Object getData(Artifact artifact, CallContext context) {
-        WINFOArtifact winfo = (WINFOArtifact)artifact;
-
-        CalculationResult res = (CalculationResult)
-            winfo.compute(context, hash, stateId, type, false);
-
-        WKms [] wkms = (WKms [])res.getData();
-
-        WKms result = wkms[index];
-        logger.debug("Got difference curve data (" + result.getName()
-            + ") at index: " + index);
-
-        return result;
-    }
-
-
-    /** Copy deeply. */
-    @Override
-    public Facet deepCopy() {
-        WaterlevelFacet copy = new DifferenceCurveFacet();
-        copy.set(this);
-        copy.type    = type;
-        copy.stateId = stateId;
-        copy.hash    = hash;
-        return copy;
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Tue Jul 03 08:46:14 2012 +0000
@@ -14,7 +14,7 @@
 
 import de.intevation.flys.model.FastCrossSectionLine;
 
-import de.intevation.flys.geom.Lines;
+import de.intevation.flys.artifacts.geom.Lines;
 
 
 /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DifferenceCurveFacet.java	Tue Jul 03 08:46:14 2012 +0000
@@ -0,0 +1,68 @@
+package de.intevation.flys.artifacts.model;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.artifactdatabase.state.Facet;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.WINFOArtifact;
+import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
+
+
+/**
+ * Facet with the curve of a subtraction of two waterlevel-lines.
+ * TODO inherit directly from DataFacet? Check whether this Facet is obsolete.
+ */
+public class DifferenceCurveFacet extends WaterlevelFacet {
+
+    private static Logger logger = Logger.getLogger(DifferenceCurveFacet.class);
+
+
+    public DifferenceCurveFacet() {
+    }
+
+    public DifferenceCurveFacet(
+        int         index,
+        String      name,
+        String      description,
+        ComputeType type,
+        String      stateID,
+        String      hash
+
+    ) {
+        super(index, name, description, type, stateID, hash);
+    }
+
+    /**
+     * Get difference curve data.
+     * @return a WKms at given index.
+     */
+    @Override
+    public Object getData(Artifact artifact, CallContext context) {
+        WINFOArtifact winfo = (WINFOArtifact)artifact;
+
+        CalculationResult res = (CalculationResult)
+            winfo.compute(context, hash, stateId, type, false);
+
+        WKms [] wkms = (WKms [])res.getData();
+
+        WKms result = wkms[index];
+        logger.debug("Got difference curve data (" + result.getName()
+            + ") at index: " + index);
+
+        return result;
+    }
+
+
+    /** Copy deeply. */
+    @Override
+    public Facet deepCopy() {
+        WaterlevelFacet copy = new DifferenceCurveFacet();
+        copy.set(this);
+        copy.type    = type;
+        copy.stateId = stateId;
+        copy.hash    = hash;
+        return copy;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Tue Jul 03 08:46:14 2012 +0000
@@ -60,8 +60,8 @@
 import de.intevation.flys.jfree.StyledAreaSeriesCollection;
 import de.intevation.flys.jfree.Style;
 import de.intevation.flys.jfree.StyledSeries;
+import de.intevation.flys.themes.ThemeAccess;
 import de.intevation.flys.utils.FLYSUtils;
-import de.intevation.flys.utils.ThemeAccess;
 
 
 /**
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,33 +1,25 @@
 package de.intevation.flys.exports;
 
+import java.text.NumberFormat;
 import java.util.List;
-import java.text.NumberFormat;
 
 import org.apache.log4j.Logger;
-
 import org.jfree.chart.JFreeChart;
 import org.jfree.chart.title.TextTitle;
 import org.jfree.data.xy.XYSeries;
-
-import de.intevation.flys.jfree.FLYSAnnotation;
-
 import org.w3c.dom.Document;
 
-import de.intevation.artifacts.DataProvider;
-
 import de.intevation.artifactdatabase.state.ArtifactAndFacet;
-
+import de.intevation.artifacts.DataProvider;
+import de.intevation.flys.artifacts.geom.Lines;
+import de.intevation.flys.artifacts.model.CrossSectionFacet;
 import de.intevation.flys.artifacts.model.FacetTypes;
-import de.intevation.flys.artifacts.model.CrossSectionFacet;
+import de.intevation.flys.artifacts.model.HYKFactory;
+import de.intevation.flys.jfree.FLYSAnnotation;
 import de.intevation.flys.jfree.StyledXYSeries;
-
 import de.intevation.flys.model.FastCrossSectionLine;
-import de.intevation.flys.artifacts.model.HYKFactory;
-
-import de.intevation.flys.geom.Lines;
-
+import de.intevation.flys.utils.Formatter;
 import de.intevation.flys.utils.ThemeUtil;
-import de.intevation.flys.utils.Formatter;
 
 
 /**
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Tue Jul 03 08:46:14 2012 +0000
@@ -28,7 +28,7 @@
 import de.intevation.flys.utils.FLYSUtils;
 import de.intevation.flys.utils.DataUtil;
 
-import de.intevation.flys.geom.Lines;
+import de.intevation.flys.artifacts.geom.Lines;
 
 
 /**
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/TimeseriesChartGenerator.java	Tue Jul 03 08:46:14 2012 +0000
@@ -10,7 +10,7 @@
 import de.intevation.flys.jfree.StyledTimeSeries;
 import de.intevation.flys.jfree.TimeBounds;
 
-import de.intevation.flys.utils.ThemeAccess;
+import de.intevation.flys.themes.ThemeAccess;
 
 import de.intevation.flys.artifacts.model.HYKFactory;
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Tue Jul 03 08:46:14 2012 +0000
@@ -48,7 +48,7 @@
 import de.intevation.flys.jfree.StyledAreaSeriesCollection;
 import de.intevation.flys.jfree.StyledXYSeries;
 
-import de.intevation.flys.utils.ThemeAccess;
+import de.intevation.flys.themes.ThemeAccess;
 import de.intevation.flys.utils.ThemeUtil;
 
 import de.intevation.flys.artifacts.model.HYKFactory;
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationExporter.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQRelationExporter.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,4 +1,4 @@
-package de.intevation.flys.exports;
+package de.intevation.flys.exports.sq;
 
 import java.io.OutputStream;
 import java.util.ArrayList;
@@ -13,6 +13,7 @@
 import de.intevation.artifacts.CallContext;
 
 import de.intevation.flys.artifacts.model.CalculationResult;
+import de.intevation.flys.exports.AbstractExporter;
 
 
 /**
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledAreaSeriesCollection.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledAreaSeriesCollection.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,18 +1,15 @@
 package de.intevation.flys.jfree;
 
+import java.awt.BasicStroke;
 import java.awt.Color;
 import java.awt.Stroke;
-import java.awt.BasicStroke;
 
 import org.apache.log4j.Logger;
-
+import org.jfree.data.xy.XYSeriesCollection;
 import org.w3c.dom.Document;
 
-import org.jfree.data.xy.XYSeriesCollection;
-
+import de.intevation.flys.themes.ThemeAccess;
 import de.intevation.flys.utils.ThemeUtil;
-import de.intevation.flys.utils.ThemeAccess;
-import de.intevation.flys.jfree.StableXYDifferenceRenderer;
 
 
 /**
--- a/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeAccess.java	Tue Jul 03 07:23:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeAccess.java	Tue Jul 03 08:46:14 2012 +0000
@@ -1,4 +1,4 @@
-package de.intevation.flys.utils;
+package de.intevation.flys.themes;
 
 import java.awt.Color;
 import java.awt.Font;
@@ -6,6 +6,7 @@
 import org.w3c.dom.Document;
 
 import de.intevation.flys.jfree.StableXYDifferenceRenderer;
+import de.intevation.flys.utils.ThemeUtil;
 
 import org.jfree.chart.annotations.XYTextAnnotation;
 

http://dive4elements.wald.intevation.org