changeset 1838:853cd2120d69

Cosmetics, doc. flys-artifacts/trunk@3174 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 07 Nov 2011 10:48:13 +0000
parents 0585bf8af41b
children c3b44da22a3a
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQKmsFactory.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationDistanceSelect.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationSelect.java
diffstat 5 files changed, 29 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Nov 07 10:43:51 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Nov 07 10:48:13 2011 +0000
@@ -1,3 +1,15 @@
+2011-11-07  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/LocationDistanceSelect.java,
+	  src/main/java/de/intevation/flys/artifacts/states/LocationSelect.java:
+	  Minor, picky cosmetics.
+
+	* src/main/java/de/intevation/flys/artifacts/model/WQKmsFactory.java:
+	  Removed junk.
+
+	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
+	  Added documentation.
+
 2011-11-07  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQKmsFactory.java	Mon Nov 07 10:43:51 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQKmsFactory.java	Mon Nov 07 10:48:13 2011 +0000
@@ -101,10 +101,6 @@
 
         List<Object []> results = sqlQuery.list();
 
-        double kms [] = new double[results.size()];
-        double ws  [] = new double[results.size()];
-        double qs  [] = new double[results.size()];
-
         int lastColumn = Integer.MAX_VALUE;
 
         for (int i = 0, N = results.size(); i < N; i++) {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java	Mon Nov 07 10:43:51 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java	Mon Nov 07 10:48:13 2011 +0000
@@ -20,6 +20,9 @@
 
 import org.apache.commons.math.exception.MathIllegalArgumentException;
 
+/**
+ * W, Q and km data from database 'wsts' spiced with interpolation algorithms.
+ */
 public class WstValueTable
 implements   Serializable
 {
@@ -86,7 +89,7 @@
     } // class Position
 
     /**
-     * A row, typically a position where measurements whrere taken.
+     * A row, typically a position where measurements were taken.
      */
     public static final class Row
     implements                Serializable, Comparable<Row>
@@ -106,6 +109,9 @@
             this.ws = ws;
         }
 
+        /**
+         * Compare according to place of measurement (km).
+         */
         public int compareTo(Row other) {
             double d = km - other.km;
             if (d < -0.0001) return -1;
@@ -351,8 +357,10 @@
         }
     } // class Row
 
+    /** Rows in table. */
     protected List<Row> rows;
 
+    /** Columns in table. */
     protected Column [] columns;
 
     public WstValueTable() {
@@ -369,6 +377,7 @@
         this.rows    = rows;
     }
 
+    /** Sort rows (by km). */
     public void sortRows() {
         Collections.sort(rows);
     }
@@ -433,10 +442,16 @@
         return ws;
     }
 
+    /**
+     * Interpolate W and Q values at a given km.
+     */
     public double [][] interpolateWQ(double km) {
         return interpolateWQ(km, null);
     }
 
+    /**
+     * Interpolate W and Q values at a given km.
+     */
     public double [][] interpolateWQ(double km, Calculation errors) {
         return interpolateWQ(km, DEFAULT_Q_STEPS, errors);
     }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationDistanceSelect.java	Mon Nov 07 10:43:51 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationDistanceSelect.java	Mon Nov 07 10:48:13 2011 +0000
@@ -18,10 +18,9 @@
 extends      ComputationRangeState
 {
 
-    /** The logger used in this class.*/
+    /** The logger used in this class. */
     private static Logger logger = Logger.getLogger(LocationDistanceSelect.class);
 
-
     /** The name of the 'mode' field. */
     public static final String MODE = "ld_mode";
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationSelect.java	Mon Nov 07 10:43:51 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationSelect.java	Mon Nov 07 10:48:13 2011 +0000
@@ -28,7 +28,6 @@
     /** The logger used in this class.*/
     private static Logger logger = Logger.getLogger(LocationSelect.class);
 
-
     /** The name of the StateData object that stores the location string.*/
     public static final String FIELD_LOCATIONS = "ld_locations";
 

http://dive4elements.wald.intevation.org