changeset 1764:87c82499b98f

Added DC configuration to load additional data in longitudinal section. flys-artifacts/trunk@3082 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 26 Oct 2011 12:03:59 +0000
parents 0e748e8972b5
children 5d8b3880a553
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data.xml
diffstat 2 files changed, 138 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Oct 26 08:15:24 2011 +0000
+++ b/flys-artifacts/ChangeLog	Wed Oct 26 12:03:59 2011 +0000
@@ -1,3 +1,8 @@
+2011-10-26  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* doc/conf/meta-data.xml: Added dc configuration for some data
+	  that can be loaded from longitudinal section diagrams.
+
 2011-10-25  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
--- a/flys-artifacts/doc/conf/meta-data.xml	Wed Oct 26 08:15:24 2011 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Wed Oct 26 12:03:59 2011 +0000
@@ -10,7 +10,139 @@
       <dc:elements>
         <river>
           <dc:attribute name="name" value="${river_name}"/>
-          <dc:attribute name="db-id" value="${river_id}"/>
+          <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')">
+            <dc:choose>
+              <dc:when test="dc:contains($parameters, 'recommended')">
+                </dc:when>
+              <dc:otherwise>
+                <dc:comment comment=" BASEDATA ---------------------------"/>
+                <basedata>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT id          AS prot_id,
+                             description AS prot_description
+                      FROM wsts WHERE kind = 0 AND river_id = ${river_id}
+                    </dc:statement>
+                    <dc:elements>
+                      <basedata>
+                        <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="base_data-wstv-${prot_rel_pos}-${prot_id}"/>
+                              <dc:attribute name="factory" value="staticwkms"/>
+                            </column>
+                          </dc:elements>
+                        </dc:context>
+                      </basedata>
+                    </dc:elements>
+                  </dc:context>
+                </basedata>
+                <dc:comment comment=".ZUS -------------------------------"/>
+                <addtionals>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT id          AS prot_id,
+                             description AS prot_description
+                      FROM wsts WHERE kind = 1 AND river_id = ${river_id}
+                    </dc:statement>
+                    <dc:elements>
+                      <additional>
+                        <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="additionals-wstv-${prot_rel_pos}-${prot_id}"/>
+                              <dc:attribute name="factory" value="staticwkms"/>
+                            </column>
+                          </dc:elements>
+                        </dc:context>
+                      </additional>
+                    </dc:elements>
+                  </dc:context>
+                </addtionals>
+                <dc:comment comment=" FIXATIONS ---------------------------"/>
+                <fixations>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT id          AS prot_id,
+                             description AS prot_description
+                      FROM wsts WHERE kind = 2 AND river_id = ${river_id}
+                    </dc:statement>
+                    <dc:elements>
+                      <fixation>
+                        <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="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
+                              <dc:attribute name="factory" value="staticwkms"/>
+                            </column>
+                          </dc:elements>
+                        </dc:context>
+                      </fixation>
+                    </dc:elements>
+                  </dc:context>
+                </fixations>
+                <dc:comment comment=" HOEHENMARKEN ---------------------------"/>
+                <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>
+                      <heightmark>
+                        <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-wstv-${prot_rel_pos}-${prot_id}"/>
+                              <dc:attribute name="factory" value="staticwkms"/>
+                            </column>
+                          </dc:elements>
+                        </dc:context>
+                      </heightmark>
+                    </dc:elements>
+                  </dc:context>
+                </heightmarks>
+               </dc:otherwise>
+            </dc:choose>
+          </dc:if>
+
           <dc:if test="dc:contains($artifact-outs, 'waterlevels')">
             <flood-protections>
               <dc:attribute name="id" value="flood-protections-${river_id}"/>

http://dive4elements.wald.intevation.org