[PATCH 5 of 9] Rename the SedimentLoadDataFacet and add deprection comment

Wald Commits scm-commit at wald.intevation.org
Fri Aug 15 18:27:28 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1408119016 -7200
# Node ID bb0d35d32b016bd28401971540b0782c0be6a4eb
# Parent  c27c04030a8dab84cabc60e5677336509983e325
Rename the SedimentLoadDataFacet and add deprection comment

diff -r c27c04030a8d -r bb0d35d32b01 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java	Fri Aug 15 18:09:47 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java	Fri Aug 15 18:10:16 2014 +0200
@@ -6,6 +6,15 @@
  * documentation coming with Dive4Elements River for details.
  */
 
+// TODO Aheinecke 15.8.2014
+// This class was formerly known as SedimentLoadFacet.
+// This class could be a base for the calculated sediment loads.
+// If there is another facet for them remove this
+// class altogether.
+//
+// The new SedimentLoadFacet is a new StaticFacet which only wraps
+// static data from the database.
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import gnu.trove.TDoubleArrayList;
@@ -38,20 +47,20 @@
 
 
 /** Facet to access various sediment loads. */
-public class SedimentLoadFacet
+public class SedimentLoadDataFacet
 extends DataFacet
 {
     /** Very own logger. */
-    private static Logger logger = Logger.getLogger(SedimentLoadFacet.class);
+    private static Logger logger = Logger.getLogger(SedimentLoadDataFacet.class);
 
     /** Used as tolerance value when fetching measurement stations. */
     private static double EPSILON = 1e-5;
 
 
-    public SedimentLoadFacet() {
+    public SedimentLoadDataFacet() {
     }
 
-    public SedimentLoadFacet(int idx, String name, String description,
+    public SedimentLoadDataFacet(int idx, String name, String description,
         ComputeType type, String stateId, String hash) {
         super(idx, name, description, type, hash, stateId);
         this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
@@ -219,7 +228,7 @@
         else if (FacetTypes.IS.SEDIMENT_LOAD_TOTAL(name))
             return result.getTotalData();
         else {
-            logger.error("SedimentLoadFacet " + name + " cannot determine data type.");
+            logger.error("SedimentLoadDataFacet " + name + " cannot determine data type.");
             return null;
         }
     }
@@ -227,7 +236,7 @@
     /** Copy deeply. */
     @Override
     public Facet deepCopy() {
-        SedimentLoadFacet copy = new SedimentLoadFacet();
+        SedimentLoadDataFacet copy = new SedimentLoadDataFacet();
         copy.set(this);
         copy.type = type;
         copy.hash = hash;


More information about the Dive4Elements-commits mailing list