changeset 409:c7a55ff1e22a

Datacage: Added forgotten columns of fixation WST to datcage template. flys-artifacts/trunk@1866 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 09 May 2011 13:47:15 +0000
parents fc3ac59c3c8b
children df02137b3b28
files flys-artifacts/ChangeLog flys-artifacts/src/main/resources/metadata/template.xml
diffstat 2 files changed, 31 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon May 09 12:53:49 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon May 09 13:47:15 2011 +0000
@@ -1,3 +1,8 @@
+2011-05-09	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/resources/metadata/template.xml: Added forgotten
+	  columns of fixation WSTs.
+
 2011-05-09  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/ChartGenerator.java: Added a
--- a/flys-artifacts/src/main/resources/metadata/template.xml	Mon May 09 12:53:49 2011 +0000
+++ b/flys-artifacts/src/main/resources/metadata/template.xml	Mon May 09 13:47:15 2011 +0000
@@ -6,7 +6,8 @@
       SELECT id AS river_id, name as river_name FROM rivers
     </dc:statement>
     <dc:elements>
-      <dc:element name="${river_name}">
+      <river>
+        <dc:attribute name="name" value="${river_name}"/>
         <dc:attribute name="river-id" value="${river_id}"/>
         <discharge-table-nn>
           <discharge-table-gauge>
@@ -53,7 +54,23 @@
               <dc:elements>
                 <fixation>
                   <dc:attribute name="name" value="${fix_description}"/>
-                  <dc:attribute name="fix-id" value="${fix_id}"/></fixation>
+                  <dc:attribute name="fix-id" value="${fix_id}"/>
+                  <columns>
+                    <dc:context>
+                      <dc:statement>
+                        SELECT id   AS fix_column_id,
+                               name AS fix_column_name
+                        FROM wst_columns WHERE wst_id = ${fix_id}
+                        ORDER by position
+                      </dc:statement>
+                      <dc:elements>
+                        <column>
+                          <dc:attribute name="name" value="${fix_column_name}"/>
+                          <dc:attribute name="column-id" value="${fix_column_id}"/></column>
+                      </dc:elements>
+                    </dc:context>
+                  </columns>
+                </fixation>
               </dc:elements>
             </dc:context>
           </fixations>
@@ -79,8 +96,8 @@
                       </dc:statement>
                       <dc:elements>
                         <column>
-                            <dc:attribute name="name" value="${prot_column_name}"/>
-                            <dc:attribute name="column-id" value="${prot_column_id}"/></column>
+                          <dc:attribute name="name" value="${prot_column_name}"/>
+                          <dc:attribute name="column-id" value="${prot_column_id}"/></column>
                       </dc:elements>
                     </dc:context>
                   </columns>
@@ -110,8 +127,8 @@
                       </dc:statement>
                       <dc:elements>
                         <column>
-                            <dc:attribute name="name" value="${fw_column_name}"/>
-                            <dc:attribute name="column-id" value="${fw_column_id}"/></column>
+                          <dc:attribute name="name" value="${fw_column_name}"/>
+                          <dc:attribute name="column-id" value="${fw_column_id}"/></column>
                       </dc:elements>
                     </dc:context>
                   </columns>
@@ -141,8 +158,8 @@
                       </dc:statement>
                       <dc:elements>
                         <column>
-                            <dc:attribute name="name" value="${wl_column_name}"/>
-                            <dc:attribute name="column-id" value="${wl_column_id}"/></column>
+                          <dc:attribute name="name" value="${wl_column_name}"/>
+                          <dc:attribute name="column-id" value="${wl_column_id}"/></column>
                       </dc:elements>
                     </dc:context>
                   </columns>
@@ -189,7 +206,7 @@
           <water-levels><dc:attribute name="ref" value="water-levels-${river_id}"/></water-levels>
           <extra-longitudinal-sections><dc:attribute name="ref" value="extra-longitudinal-sections-${river_id}"/></extra-longitudinal-sections>
         </longitudinal-section>
-      </dc:element> <!-- river -->
+      </river>
     </dc:elements>
   </dc:context>
 </datacage>

http://dive4elements.wald.intevation.org