changeset 4146:5589b1fd459d

Merged.
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 16 Oct 2012 11:28:33 +0200
parents d39f229ea990 (current diff) 58864f4f6e3b (diff)
children 71a4b664a16a
files flys-artifacts/ChangeLog
diffstat 9 files changed, 115 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/ChangeLog	Tue Oct 16 11:28:33 2012 +0200
@@ -1,3 +1,24 @@
+2012-10-16	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	Fix issue946.
+
+	* flys-artifacts/doc/conf/meta-data.xml: Load wkms with different
+	  parameter for fix wq curves.
+
+	* flys-artifacts/doc/conf/artifacts/fixanalysis.xml:
+	  Add new facet to compat list.
+
+	* flys-artifacts/doc/conf/default-themes.xml,
+	  flys-artifacts/doc/conf/second-themes.xml,
+	  flys-artifacts/doc/conf/themes.xml:
+	  Added new theme/mapping.
+
+	* flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java:
+	  Register new facet type.
+
+	* flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java:
+	  Handle "new" Facet.
+
 2012-10-16	Christian Lins	<christian.lins@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java,
--- a/flys-artifacts/doc/conf/artifacts/fixanalysis.xml	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/doc/conf/artifacts/fixanalysis.xml	Tue Oct 16 11:28:33 2012 +0200
@@ -152,7 +152,8 @@
                         <facet name="fix_outlier" description="The outliers"/>
                         <facet name="other.wqkms.q"          description="W-Type of data" />
                         <facet name="other.wqkms.w"          description="W-Type of data" />
-                        <facet name="other.wkms" description="facet.other.wqkms"/>
+                        <facet name="other.wkms" description="facet.other.wkms"/>
+                        <facet name="other.wkms.marks" description="facet.other.wkms.makrs"/>
                         <facet name="other.wqkms" description="facet.other.wqkms"/>
                         <facet name="longitudinal_section.w" description="facet.longitudinal_section.w"/>
                         <facet name="other.wq"    description="Point-like data like fixations"/>
--- a/flys-artifacts/doc/conf/default-themes.xml	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/doc/conf/default-themes.xml	Tue Oct 16 11:28:33 2012 +0200
@@ -834,6 +834,29 @@
         </fields>
     </theme>
 
+    <theme name="WKmsAnnotation">
+        <fields>
+            <field name="linecolor" type="Color" display="Linienfarbe"
+                default="204, 204, 204" />
+            <field name="font" type="Font" display="Schriftart"
+                default="arial" />
+            <field name="textcolor" type="Color" display="Schriftfarbe"
+                default="0, 0, 0" />
+            <field name="textsize" type="int" display="Schriftgröße"
+                default="10" />
+            <field name="textstyle" type="Style" display="Schriftstil"
+                default="standard" />
+            <field name="pointsize" type="int" display="Punktdicke"
+                default="3" hints="h" />
+            <field name="backgroundcolor" type="Color" display="Texthintergrund"
+                default="255, 255, 255" />
+            <field name="textorientation" type="boolean" display="Textausrichtung"
+                default="true" />
+            <field name="showbackground" type="boolean"
+                display="Hintergrund anzeigen" default="false" />
+        </fields>
+    </theme>
+
     <theme name="WQKms">
         <inherits>
             <inherit from="HiddenColorLines" />
--- a/flys-artifacts/doc/conf/meta-data.xml	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/doc/conf/meta-data.xml	Tue Oct 16 11:28:33 2012 +0200
@@ -82,6 +82,42 @@
             </basedata>
         </dc:macro>
 
+        <dc:macro name="basedata_1_additionals_marks">
+            <dc:comment comment=".ZUS -------------------------------"/>
+            <additionals>
+              <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,
+                               description AS info
+                        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="additionalsmarks-wstv-${prot_rel_pos}-${prot_id}"/>
+                          <dc:attribute name="factory" value="staticwkms"/>
+                          <dc:attribute name="info" value="${info}"/>
+                        </column>
+                      </dc:elements>
+                    </dc:context>
+                  </additional>
+                </dc:elements>
+              </dc:context>
+            </additionals>
+        </dc:macro>
+
         <dc:macro name="basedata_1_additionals">
             <dc:comment comment=".ZUS -------------------------------"/>
             <additionals>
@@ -699,7 +735,7 @@
               </dc:if>
               <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')">
                 <dc:call-macro name="basedata_0_wq"/>
-                <dc:call-macro name="basedata_1_additionals"/>
+                <dc:call-macro name="basedata_1_additionals_marks"/>
                 <dc:call-macro name="basedata_2_fixations_wqkms"/>
                 <dc:call-macro name="basedata_3_officials"/>
                 <dc:call-macro name="basedata_4_heightmarks-points"/>
--- a/flys-artifacts/doc/conf/second-themes.xml	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/doc/conf/second-themes.xml	Tue Oct 16 11:28:33 2012 +0200
@@ -833,6 +833,29 @@
         </fields>
     </theme>
 
+    <theme name="WKmsAnnotation">
+        <fields>
+            <field name="linecolor" type="Color" display="Linienfarbe"
+                default="204, 204, 204" />
+            <field name="font" type="Font" display="Schriftart"
+                default="arial" />
+            <field name="textcolor" type="Color" display="Schriftfarbe"
+                default="0, 0, 0" />
+            <field name="textsize" type="int" display="Schriftgröße"
+                default="10" />
+            <field name="textstyle" type="Style" display="Schriftstil"
+                default="standard" />
+            <field name="pointsize" type="int" display="Punktdicke"
+                default="3" hints="h" />
+            <field name="backgroundcolor" type="Color" display="Texthintergrund"
+                default="255, 255, 255" />
+            <field name="textorientation" type="boolean" display="Textausrichtung"
+                default="true" />
+            <field name="showbackground" type="boolean"
+                display="Hintergrund anzeigen" default="false" />
+        </fields>
+    </theme>
+
     <theme name="WQKms">
         <inherits>
             <inherit from="HiddenColorLines" />
--- a/flys-artifacts/doc/conf/themes.xml	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/doc/conf/themes.xml	Tue Oct 16 11:28:33 2012 +0200
@@ -161,6 +161,7 @@
 		<mapping from="floodmap.gauge_location" to="GaugeLocation" />
 		<mapping from="other.wq" to="WQPoints" />
 		<mapping from="other.wkms" to="WKms" />
+		<mapping from="other.wkms.marks" to="WKmsAnnotation" />
 		<mapping from="other.wqkms" to="WQKms" />
 		<mapping from="other.wqkms.w" to="WQKms" />
 		<mapping from="other.wqkms.q" to="WQKms" />
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Tue Oct 16 11:28:33 2012 +0200
@@ -136,6 +136,9 @@
                     name = HEIGHTMARKS_POINTS;
                     addStringData(DATA_HEIGHT_TYPE, "true");
                 }
+                else if (parts[0].equals("additionalsmarks")) {
+                    name = STATIC_WKMS_MARKS;
+                }
                 else {
                     name = STATIC_WKMS;
                 }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java	Tue Oct 16 11:28:33 2012 +0200
@@ -193,6 +193,7 @@
     String STATIC_WQ      = "other.wq";
     String STATIC_WQ_ANNOTATIONS = "other.wq.annotations";
     String STATIC_WKMS    = "other.wkms";
+    String STATIC_WKMS_MARKS = "other.wkms.marks";
     String STATIC_WQKMS   = "other.wqkms";
     String STATIC_WQKMS_W = "other.wqkms.w";
     String STATIC_WQKMS_Q = "other.wqkms.q";
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Tue Oct 16 11:27:27 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Tue Oct 16 11:28:33 2012 +0200
@@ -120,7 +120,8 @@
         else if(QSECTOR.equals(name)) {
             doQSectorOut(aaf, doc, visible);
         }
-        else if(STATIC_WKMS_INTERPOL.equals(name) ||
+        else if(/*STATIC_WKMS_INTERPOL.equals(name) ||*/
+                STATIC_WKMS_MARKS.equals(name) ||
                 STATIC_WKMS.equals(name) ||
                 HEIGHTMARKS_POINTS.equals(name) ) {
             doWAnnotations(
@@ -129,7 +130,8 @@
                     doc,
                     visible);
         }
-        else if (LONGITUDINAL_W.equals(name) || STATIC_WQ.equals(name)) {
+        else if (LONGITUDINAL_W.equals(name) || STATIC_WQ.equals(name)
+                        || STATIC_WKMS_INTERPOL.equals(name)) {
             doWQOut(aaf.getData(context), aaf, doc, visible);
         }
         else if (name.equals(DISCHARGE_CURVE)) {

http://dive4elements.wald.intevation.org