[Dive4elements-commits] [PATCH] Readd accidentally removed macros

Wald Commits scm-commit at wald.intevation.org
Tue May 21 18:36:34 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1369154192 -7200
# Node ID 5db238b0176e6c19c07d05dafe44a08a32012742
# Parent  a18aafc1372f58b67a681ec331414f9b3afd9b76
Readd accidentally removed macros

diff -r a18aafc1372f -r 5db238b0176e artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Tue May 21 18:00:29 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Tue May 21 18:36:32 2013 +0200
@@ -1783,6 +1783,42 @@
       </dc:filter>
     </dc:macro>
 
+    <dc:macro name="flood-map-hws-lines">
+      <dc:context>
+        <dc:statement>
+          SELECT DISTINCT
+          name     AS hws_name,
+          official AS hws_official,
+          kind_id  AS hws_kind
+          FROM hws_lines
+          WHERE river_id = ${river_id}
+        </dc:statement>
+        <dc:if test="dc:has-result()">
+          <lines>
+            <dc:call-macro name="filter_hws_ddg"/>
+          </lines>
+        </dc:if>
+      </dc:context>
+    </dc:macro>
+
+    <dc:macro name="flood-map-hws-points">
+      <dc:context>
+        <dc:statement>
+          SELECT DISTINCT
+          name     AS hws_name,
+          official AS hws_official,
+          kind_id  AS hws_kind
+          FROM hws_points
+          WHERE river_id = ${river_id}
+        </dc:statement>
+        <dc:if test="dc:has-result()">
+          <points>
+            <dc:call-macro name="filter_hws_ddg"/>
+          </points>
+        </dc:if>
+      </dc:context>
+    </dc:macro>
+
     <dc:macro name="flood-map-hydr-boundaries-state">
       <federal>
         <dc:context>
@@ -2508,6 +2544,60 @@
       </buildings>
     </dc:macro>
 
+    <dc:macro name="officiallines_user">
+      <dc:comment comment=".wst -------------------------------"/>
+      <officiallines>
+        <dc:for-each>
+          <dc:context>
+            <dc:statement>
+              SELECT m.id       AS a_id,
+                     m.state    AS a_state,
+                     m.gid      AS a_gid,
+                     m.creation AS a_creation,
+                     ardg.v     AS gaugy,
+                     arv.v      AS wqsingle
+              FROM   master_artifacts m,
+              artifact_data ardg,
+              artifact_data arv
+              WHERE  m.collection_id = ${collection_id}
+              AND m.gid = CAST(${artifact-id} AS uuid)
+              AND ardg.artifact_id = m.id
+              AND ardg.k = 'ld_gaugename'
+              AND arv.artifact_id = m.id
+              AND arv.k = 'wq_single'
+              AND EXISTS (
+              SELECT id
+              FROM artifact_data ad
+              WHERE ad.artifact_id = m.id
+              AND k = 'river'
+              AND v = ${river})
+            </dc:statement>
+            <dc:for-each>
+              <dc:context connection="system">
+                <dc:statement>
+                  SELECT ol.wst_id         AS wstid,
+                         ol.wst_column_pos AS wstcolpos,
+                         ol.name           AS olname,
+                         ol.value          AS oval
+                  FROM official_q_values ol
+                  WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2))
+                  AND ol.gauge_name = ${gaugy}
+                </dc:statement>
+                <dc:for-each>
+                  <dc:element name="${olname}">
+                    <dc:attribute name="name" value="${olname}"/>
+                    <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/>
+                    <dc:attribute name="factory" value="staticwkms"/>
+                    <dc:attribute name="out" value="${out}"/>
+                  </dc:element>
+                </dc:for-each>
+              </dc:context>
+            </dc:for-each>
+          </dc:context>
+        </dc:for-each>
+      </officiallines>
+    </dc:macro>
+
     <!-- Common stuff -->
 
     <dc:macro name="km-filtered-wsts">


More information about the Dive4elements-commits mailing list