[Dive4elements-commits] [PATCH 4 of 6] ExtremeCompute: Further naming improvements on facets

Wald Commits scm-commit at wald.intevation.org
Mon Nov 5 17:28:13 CET 2012


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1352133085 -3600
# Node ID 3296021f0bf5e460ff16d1aa28d356910a8a3d43
# Parent  c9e06ba9359a5013b169182478606e4290473455
ExtremeCompute: Further naming improvements on facets.

diff -r c9e06ba9359a -r 3296021f0bf5 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/extreme/ExtremeCompute.java
--- 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);


More information about the Dive4elements-commits mailing list