[Dive4elements-commits] [PATCH] Artifacts: Moved code from WINFO artifact into state where it belongs

Wald Commits scm-commit at wald.intevation.org
Thu Jun 13 12:48:23 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1371120492 -7200
# Node ID 5c880567a0204566b447b2bc54aa12534f71a090
# Parent  ee701de9c875b8abc25968b692f7453cf7b22d0a
Artifacts: Moved code from WINFO artifact into state where it belongs.

diff -r ee701de9c875 -r 5c880567a020 artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Thu Jun 13 11:43:02 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Thu Jun 13 12:48:12 2013 +0200
@@ -1153,13 +1153,5 @@
 
         return values.toNativeArray();
     }
-
-    /**
-     * Returns the WstValueTable of current river.
-     */
-    public WstValueTable getWstValueTable() {
-        River r = RiverUtils.getRiver(this);
-        return WstValueTableFactory.getTable(r);
-    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
diff -r ee701de9c875 -r 5c880567a020 artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java	Thu Jun 13 11:43:02 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java	Thu Jun 13 12:48:12 2013 +0200
@@ -34,6 +34,7 @@
 
 import org.dive4elements.river.artifacts.model.WstFactory;
 import org.dive4elements.river.artifacts.model.WstValueTable;
+import org.dive4elements.river.artifacts.model.WstValueTableFactory;
 import org.dive4elements.river.artifacts.resources.Resources;
 
 import org.dive4elements.river.utils.RiverUtils;
@@ -423,7 +424,8 @@
         logger.debug("WQSelect.determineMinMaxWFree");
 
         WINFOArtifact winfo = (WINFOArtifact) artifact;
-        WstValueTable valueTable = winfo.getWstValueTable();
+        WstValueTable valueTable = WstValueTableFactory.getTable(
+                RiverUtils.getRiver(winfo));
 
         double[] minmaxW = null;
         if(valueTable != null) {
@@ -485,7 +487,8 @@
         logger.debug("WQSelect.determineMinMaxQ");
 
         WINFOArtifact winfo = (WINFOArtifact) artifact;
-        WstValueTable valueTable = winfo.getWstValueTable();
+        WstValueTable valueTable = WstValueTableFactory.getTable(
+                RiverUtils.getRiver(winfo));
 
         double[] minmaxQ = null;
         if(valueTable != null) {


More information about the Dive4elements-commits mailing list