changeset 2751:e50cc06c6c4c

Serve heightmarks and floodprotection in dc conf for duration curves. flys-artifacts/trunk@4486 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 23 May 2012 21:45:52 +0000
parents 97cb098dbf7a
children 687e363b97a0
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data.xml
diffstat 2 files changed, 79 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed May 23 20:45:10 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed May 23 21:45:52 2012 +0000
@@ -1,3 +1,8 @@
+2012-05-23	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* doc/conf/meta-data.xml: Serve floodprotections and heightmarks
+	  with relative points for duration curves.
+
 2012-05-23	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java:
--- a/flys-artifacts/doc/conf/meta-data.xml	Wed May 23 20:45:10 2012 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Wed May 23 21:45:52 2012 +0000
@@ -244,6 +244,40 @@
             </dc:context>
           </fixations>
         </dc:macro>
+
+        <dc:macro name="basedata_4_heightmarks-points-relative_points">
+          <heightmarks>
+            <dc:context>
+              <dc:statement>
+                SELECT id          AS prot_id,
+                       description AS prot_description
+                FROM wsts WHERE kind = 4 AND river_id = ${river_id}
+              </dc:statement>
+              <dc:elements>
+                <relativepoint>
+                  <dc:attribute name="name" value="${prot_description}"/>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT id       AS prot_column_id,
+                             name     AS prot_column_name,
+                             position AS prot_rel_pos
+                      FROM wst_columns WHERE wst_id = ${prot_id}
+                      ORDER by position
+                    </dc:statement>
+                    <dc:elements>
+                      <column>
+                        <dc:attribute name="name" value="${prot_column_name}"/>
+                        <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/>
+                        <dc:attribute name="factory" value="staticwkms"/>
+                      </column>
+                    </dc:elements>
+                  </dc:context>
+                </relativepoint>
+              </dc:elements>
+            </dc:context>
+          </heightmarks>
+        </dc:macro>
+
         <dc:macro name="basedata_4_heightmarks-points">
           <heightmarks>
             <dc:context>
@@ -310,6 +344,44 @@
           </heightmarks>
         </dc:macro>
 
+        <dc:macro name="basedata_5_flood-protections_relative_points">
+          <flood_protections>
+            <dc:attribute name="id" value="flood-protections-${river_id}"/>
+            <dc:context>
+              <dc:statement>
+                SELECT id          AS prot_id,
+                       description AS prot_description
+                FROM wsts WHERE kind = 5 AND river_id = ${river_id}
+              </dc:statement>
+              <dc:elements>
+                <relativepoint>
+                  <dc:attribute name="name" value="${prot_description}"/>
+                  <dc:attribute name="db-id" value="${prot_id}"/>
+                  <dc:attribute name="factory" value="staticwkms"/>
+                  <columns>
+                    <dc:context>
+                      <dc:statement>
+                        SELECT id       AS prot_column_id,
+                               name     AS prot_column_name,
+                               position AS prot_rel_pos
+                        FROM wst_columns WHERE wst_id = ${prot_id}
+                        ORDER by position
+                      </dc:statement>
+                      <dc:elements>
+                        <column>
+                          <dc:attribute name="name" value="${prot_column_name}"/>
+                          <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
+                          <dc:attribute name="factory" value="staticwkms"/>
+                        </column>
+                      </dc:elements>
+                    </dc:context>
+                  </columns>
+                </relativepoint>
+              </dc:elements>
+            </dc:context>
+          </flood_protections>
+        </dc:macro>
+
         <dc:macro name="basedata_5_flood-protections">
           <flood_protections>
             <dc:attribute name="id" value="flood-protections-${river_id}"/>
@@ -563,6 +635,8 @@
                 <dc:otherwise>
                   <dc:call-macro name="mainvalues"/>
                   <dc:call-macro name="basedata_2_fixations_relative_point"/>
+                  <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/>
+                  <dc:call-macro name="basedata_5_flood-protections_relative_points"/>
                 </dc:otherwise>
             </dc:choose>
           </dc:if>

http://dive4elements.wald.intevation.org