[PATCH 1 of 2] Merge branch default

Wald Commits scm-commit at wald.intevation.org
Wed Oct 16 13:05:16 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1381921060 -7200
# Branch double-precision
# Node ID 2d912b2a4bdfd1496201309c13512fa8c6781eb3
# Parent  f7032e1b14335ee2303979b1522414a754b08632
# Parent  760ea7f0845534366050010dd6f7f74cee07a161
Merge branch default

diff -r f7032e1b1433 -r 2d912b2a4bdf artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Wed Oct 16 10:18:19 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Wed Oct 16 12:57:40 2013 +0200
@@ -293,6 +293,7 @@
     </dc:macro>
 
     <dc:macro name="generate-user-content">
+      <dc:message>Generate user content with variables: {dc:dump-variables()}</dc:message>
       <dc:call-macro name="artifact-range">
         <dc:call-macro name="all-user-artifacts">
           <dc:call-macro name="km-filtered-user-artifacts">
@@ -406,6 +407,9 @@
                       <dc:call-macro name="waterlevels-fix"/>
                       <dc:call-macro name="delta-wt-ls"/>
                     </dc:when>
+                    <dc:when test="starts-with($out, 'sq_relation')">
+                      <dc:call-macro name="sqrelations_user"/>
+                    </dc:when>
                   </dc:choose>
                 </dc:iterate>
               </dc:otherwise>
@@ -1062,6 +1066,35 @@
       </dc:filter>
     </dc:macro>
 
+    <dc:macro name="sqrelations_user">
+      <dc:filter expr="
+        ($out = 'sq_relation_a' and starts-with($facet_name, 'sq_a')) or
+        ($out = 'sq_relation_b' and starts-with($facet_name, 'sq_b')) or
+        ($out = 'sq_relation_c' and starts-with($facet_name, 'sq_c')) or
+        ($out = 'sq_relation_d' and starts-with($facet_name, 'sq_d')) or
+        ($out = 'sq_relation_e' and starts-with($facet_name, 'sq_e')) or
+        ($out = 'sq_relation_f' and starts-with($facet_name, 'sq_f'))">
+        <dc:if test="dc:has-result()">
+          <sq_relations>
+            <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)">
+              <sqrel description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:element name="${facet_name}">
+                    <dc:attribute name="factory" value="minfo"/>
+                    <dc:attribute name="target_out" value="${out}"/>
+                    <dc:attribute name="description" value="${facet_description}"/>
+                    <dc:attribute name="ids" value="${facet_num}"/>
+                    <dc:attribute name="artifact-id" value="${a_gid}"/>
+                    <dc:attribute name="out" value="${out_name}"/>
+                  </dc:element>
+                </dc:for-each>
+              </sqrel>
+            </dc:group>
+          </sq_relations>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
     <dc:macro name="waterlevels-discharge">
       <dc:filter expr="$out_name = 'discharge_longitudinal_section' and $facet_name = 'discharge_longitudinal_section.w'">
         <dc:if test="dc:has-result()">
@@ -2853,7 +2886,12 @@
     </dc:macro>
 
     <dc:macro name="km-filtered-user-artifacts">
-      <dc:filter expr="not($deffrom > $tokm or $defto < $fromkm)">
+      <dc:comment>
+        Apply KM Filtering but pass
+        sq_ facets with no regard about their location.
+      </dc:comment>
+      <dc:filter expr="not($deffrom > $tokm or $defto < $fromkm) or
+        starts-with($facet_name, 'sq_')">
         <dc:macro-body/>
       </dc:filter>
     </dc:macro>
diff -r f7032e1b1433 -r 2d912b2a4bdf artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java	Wed Oct 16 10:18:19 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java	Wed Oct 16 12:57:40 2013 +0200
@@ -73,20 +73,21 @@
             Element ui = creator.create("ui");
             Element staticE = creator.create("static");
             Element state = creator.create("state");
-            ui.appendChild(staticE);
-            staticE.appendChild(state);
-            root.appendChild(ui);
 
             for (StateData dataItem : datas) {
                 Element itemelent = creator.create("data");
                 creator.addAttr(itemelent, "name", dataItem.getName(), true);
                 creator.addAttr(itemelent, "type", dataItem.getType(), true);
-                state.appendChild(itemelent);
                 Element valuement = creator.create("item");
                 creator.addAttr(valuement, "label", dataItem.getDescription(), true);
                 creator.addAttr(valuement, "value", dataItem.getValue().toString(), true);
                 itemelent.appendChild(valuement);
+                state.appendChild(itemelent);
             }
+
+            ui.appendChild(staticE);
+            staticE.appendChild(state);
+            root.appendChild(ui);
         }
 
         return desc;
diff -r f7032e1b1433 -r 2d912b2a4bdf artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/StackFrames.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/StackFrames.java	Wed Oct 16 10:18:19 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/StackFrames.java	Wed Oct 16 12:57:40 2013 +0200
@@ -172,6 +172,9 @@
                 if (already.add(entry.getKey())) {
                     if (first) { first = false;   }
                     else       { sb.append(", "); }
+                    if (sb.length() - sb.lastIndexOf("\n") > 80) {
+                        sb.append("\n");
+                    }
                     sb.append('\'').append(entry.getKey())
                       .append("'='").append(entry.getValue()).append('\'');
                 }
diff -r f7032e1b1433 -r 2d912b2a4bdf etl/README.txt
--- a/etl/README.txt	Wed Oct 16 10:18:19 2013 +0200
+++ b/etl/README.txt	Wed Oct 16 12:57:40 2013 +0200
@@ -152,6 +152,13 @@
     Abflusstafeln, die in FLYS noch nicht vorhanden sind, werden
     in FLYS übernommen.
 
+    Um Inkonsistenzen in FLYS zu vermeiden müssen zusätzlich bestimme
+    Bedingungen erfüllt sein damit der Abgleich korrekt stattfinden kann.
+    So muss etwa der Name des Gewässers in DIPS auch im Namen des
+    Gewässers in FLYS enthalten sein, sowie der Pegel an einer für das
+    Gewässer gültigen Station liegen. Die im Folgenden Dokumentierten
+    Fehlermeldungen geben über derartige Probleme Auskunft.
+
     Wenn es nach dem Abgleich der AFT- und FLYS-DB eine Veränderung
     in FLYS gegeben hat, können an konfigurierbare Web-Dienste
     Nachrichten verschickt werden, dass sich Daten geändert haben.


More information about the Dive4elements-commits mailing list