changeset 6054:5db238b0176e

Readd accidentally removed macros
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 21 May 2013 18:36:32 +0200
parents a18aafc1372f
children b82512b2432a
files artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 90 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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">

http://dive4elements.wald.intevation.org