changeset 4411:3296021f0bf5

ExtremeCompute: Further naming improvements on facets.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 05 Nov 2012 17:31:25 +0100
parents c9e06ba9359a
children 1b4aaa7dbd07
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/extreme/ExtremeCompute.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/extreme/ExtremeCompute.java	Mon Nov 05 17:30:23 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/extreme/ExtremeCompute.java	Mon Nov 05 17:31:25 2012 +0100
@@ -75,15 +75,19 @@
 
         if (wqkms == null) {
             logger.error("No computation result!");
+            return res;
         }
 
         for (int i = 0; i < wqkms.length; i++) {
             String name = wqkms[i].getName();
+            // The name already contains "W(...)".
+            String qname = name.replace("W(","Q=");
+            qname = qname.substring(0,qname.length()-1);
 
             Facet w = new WaterlevelFacet(
-                i, LONGITUDINAL_W, "W("+name+")", ComputeType.ADVANCE, id, hash);
+                i, LONGITUDINAL_W, name, ComputeType.ADVANCE, id, hash);
             Facet q = new WaterlevelFacet(
-                i, LONGITUDINAL_Q, name, ComputeType.ADVANCE, id, hash);
+                i, LONGITUDINAL_Q, qname, ComputeType.ADVANCE, id, hash);
 
             facets.add(w);
             facets.add(q);

http://dive4elements.wald.intevation.org