changeset 8094:bb0d35d32b01

Rename the SedimentLoadDataFacet and add deprection comment
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 15 Aug 2014 18:10:16 +0200
parents c27c04030a8d
children 7b062d9b8e1b
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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;

http://dive4elements.wald.intevation.org