changeset 2153:734d5f5e55c0

'New chart' for cross sections. flys-artifacts/trunk@3735 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 20 Jan 2012 09:14:53 +0000
parents 2336927cb096
children ce9b15673f3f
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/chart.xml flys-artifacts/doc/conf/meta-data.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 9 files changed, 65 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/ChangeLog	Fri Jan 20 09:14:53 2012 +0000
@@ -1,3 +1,24 @@
+2012-01-20  Raimund Renkert <raimund.renkert@intevation.de>
+
+	'New chart' for cross sections.
+
+	* doc/conf/artifacts/chart.xml: Updated the states and transitions for
+	  new charts.
+
+	* doc/conf/meta-data.xml: Added cross sections to datacage.
+
+	* src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java:
+	  Changed cast from WINFOArtifact to FLYSArtifact.
+
+	* src/main/java/de/intevation/flys/artifacts/ChartArtifact.java:
+	  Changed artifact data strings for chart_type.
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties:
+	  Changed i18n string for cross sections and logitudinal sections.
+
 2012-01-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Add basic (text) styling for HYKs.
--- a/flys-artifacts/doc/conf/artifacts/chart.xml	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/doc/conf/artifacts/chart.xml	Fri Jan 20 09:14:53 2012 +0000
@@ -34,21 +34,21 @@
 
          <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition">
              <from state="state.chart.type"/>
-             <to state="state.chart.waterlevel"/>
-             <condition data="chart_type" value="chart.new.waterlevel" operator="equal"/>
+             <to state="state.chart.crosssection"/>
+             <condition data="chart_type" value="chart.new.crosssection" operator="equal"/>
          </transition>
 
          <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition">
              <from state="state.chart.type"/>
-             <to state="state.chart.km"/>
-             <condition data="chart_type" value="chart.new.discharge_longitudinal_section" operator="equal"/>
+             <to state="state.chart.longitudinal_section"/>
+             <condition data="chart_type" value="chart.new.longitudinal_section" operator="equal"/>
          </transition>
 
          <state id="state.chart.km" description="state.chart.km" state="de.intevation.flys.artifacts.states.LocationSelect">
              <data name="ld_locations" type="Double[]"/>
          </state>
 
-         <state id="state.chart.w_differences" description="state.winfo.w_differences" state="de.intevation.flys.artifacts.states.WDifferencesState">
+         <state id="state.chart.w_differences" description="state.chart.w_differences" state="de.intevation.flys.artifacts.states.WDifferencesState">
             <outputmodes>
                 <outputmode name="w_differences" description="output.w_differences" mime-type="image/png" type="chart">
                     <facets>
@@ -65,18 +65,34 @@
             </outputmodes>
         </state>
 
-       <state id="state.chart.waterlevel" description="state.winfo.waterlevel" state="de.intevation.flys.artifacts.states.WaterlevelState">
+        <state id="state.chart.longitudinal_section" description="state.chart.logitudinal_section" state="de.intevation.flys.artifacts.states.DischargeLongitudinalSection">
             <outputmodes>
-                <outputmode name="longitudinal_section" description="output.longitudinal_section" mime-type="image/png" type="chart">
+                <outputmode name="longitudinal_section" description="output.discharge_longitudinal_section" mime-type="image/png" type="chart">
+                    <facets>
+                        <facet name="empty.facet" decription= "Empty"/>
+                        <facet name="discharge_longitudinal_section.w"/>
+                        <facet name="discharge_longitudinal_section.q"/>
+                        <facet name="discharge_longitudinal_section.c"/>
+                        <facet name="other.wqkms"/>
+                        <facet name="other.wkms"/>
+                        <facet name="heightmarks_points"/>
+                        <facet name="longitudinal_section.annotations"/>
+                        <facet name="longitudinal_section.w"/>
+                    </facets>
+                </outputmode>
+            </outputmodes>
+        </state>
+
+        <state id="state.chart.crosssection" description="state.chart.crosssection" state="de.intevation.flys.artifacts.states.WaterlevelState">
+            <outputmodes>
+                <outputmode name="cross_section" description="output.cross_section" mime-type="image/png" type="chart">
                   <facets>
-                    <facet name="longitudinal_section.w" description="facet.longitudinal_section.w"/>
-                    <facet name="longitudinal_section.q" description="facet.longitudinal_section.q"/>
-                    <facet name="w_differences"          description="facet.w_differences"/>
-                    <facet name="other.wkms"             description="facet.other.wkms"/>
-                    <facet name="other.wqkms"             description="facet.other.wqkms"/>
-                    <facet name="heightmarks_points" description="facet.other.wkms.heightmarks_points"/>
-                    <facet name="longitudinal_section.area"        description="an area"/>
-                    <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations"/>
+                    <facet name="empty.facet" description="Empty"/>
+                    <facet name="cross_section_water_line" description="facet.cross_section_water_line"/>
+                    <facet name="cross_section"            description="facet.cross_section"/>
+                    <facet name="area"                     description="an area"/>
+                    <facet name="cross_section.area"                     description="an area"/>
+                    <facet name="hyk"                      description="hyks"/>
                   </facets>
                 </outputmode>
             </outputmodes>
@@ -94,12 +110,6 @@
             <condition data="chart_type" value="chart.new.durationcurve" operator="equal"/>
         </transition>
 
-        <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition">
-            <from state="state.chart.km"/>
-            <to state="state.chart.discharge_longitudinal_section"/>
-            <condition data="chart_type" value="chart.new.discharge_longitudinal_section" operator="equal"/>
-        </transition>
-
         <state id="state.chart.computeddischargecurve" description="state.chart.computeddischargecurve" state="de.intevation.flys.artifacts.states.ComputedDischargeCurveState">
             <outputmodes>
                 <outputmode name="computed_discharge_curve" description="output.computed_discharge_curve" mime-type="image/png" type="chart">
@@ -117,7 +127,7 @@
             </outputmodes>
         </state>
 
-        <state id="state.chart.durationcurve" description="state.winfo.durationcurve" state="de.intevation.flys.artifacts.states.DurationCurveState">
+        <state id="state.chart.durationcurve" description="state.chart.durationcurve" state="de.intevation.flys.artifacts.states.DurationCurveState">
             <outputmodes>
                 <outputmode name="duration_curve" description="output.duration_curve" mime-type="image/png" type="chart">
                     <facets>
@@ -130,23 +140,5 @@
                 </outputmode>
             </outputmodes>
         </state>
-
-        <state id="state.chart.discharge_longitudinal_section" description="state.winfo.discharge_longitudinal_section" state="de.intevation.flys.artifacts.states.DischargeLongitudinalSection">
-            <outputmodes>
-                <outputmode name="discharge_longitudinal_section" description="output.discharge_longitudinal_section" mime-type="image/png" type="chart">
-                    <facets>
-                        <facet name="empty.facet" decription= "Empty"/>
-                        <facet name="discharge_longitudinal_section.w"/>
-                        <facet name="discharge_longitudinal_section.q"/>
-                        <facet name="discharge_longitudinal_section.c"/>
-                        <facet name="other.wqkms"/>
-                        <facet name="other.wkms"/>
-                        <facet name="heightmarks_points"/>
-                        <facet name="longitudinal_section.annotations"/>
-                        <facet name="longitudinal_section.w"/>
-                    </facets>
-                </outputmode>
-            </outputmodes>
-        </state>
     </states>
 </artifact>
--- a/flys-artifacts/doc/conf/meta-data.xml	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Fri Jan 20 09:14:53 2012 +0000
@@ -384,6 +384,7 @@
               <dc:if test="dc:contains($artifact-outs, 'cross_section')">
                  <dc:call-macro name="basedata_0"/>
                  <dc:call-macro name="basedata_1_additionals"/>
+                 <dc:call-macro name="cross_sections"/>
               </dc:if>
               <dc:if test="dc:contains($artifact-outs, 'discharge_longitudinal_section')">
                  <dc:call-macro name="basedata_0"/>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java	Fri Jan 20 09:14:53 2012 +0000
@@ -263,13 +263,13 @@
             "chart.new.computeddischargecurve";
 
         public static final String DISCHARGE_LONGITUDINAL_CURVE =
-            "chart.new.discharge_longitudinal_section";
+            "chart.new.longitudinal_section";
 
         public static final String W_DIFFERENCES =
             "chart.new.w_differences";
 
         public static final String WATERLEVEL =
-            "chart.new.waterlevel";
+            "chart.new.crosssection";
 
         public static final String[] CHARTS = {
             COMPUTED_DISCHARGE_CURVE,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java	Fri Jan 20 09:14:53 2012 +0000
@@ -132,7 +132,7 @@
         Object   context,
         CallMeta callMeta)
     {
-        WINFOArtifact winfo = (WINFOArtifact) artifact;
+        FLYSArtifact winfo = (FLYSArtifact) artifact;
         double[] range = FLYSUtils.getKmRange(winfo);
         double min = 0.0f;
         if (range != null && range.length > 0) {
--- a/flys-artifacts/src/main/resources/messages.properties	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Fri Jan 20 09:14:53 2012 +0000
@@ -28,9 +28,9 @@
 
 chart.new.durationcurve = Duration Curve
 chart.new.computeddischargecurve = Discharge Curve
-chart.new.discharge_longitudinal_section = Discharge Curve at
+chart.new.longitudinal_section = Longitudinal Section
 chart.new.w_differences = Differences
-chart.new.waterlevel = Waterlevel
+chart.new.crosssection = Cross Section
 
 cross_section = Cross Section
 
--- a/flys-artifacts/src/main/resources/messages_de.properties	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Fri Jan 20 09:14:53 2012 +0000
@@ -28,9 +28,9 @@
 
 chart.new.durationcurve = Dauerlinie
 chart.new.computeddischargecurve = Abflusskurve
-chart.new.discharge_longitudinal_section = Abflusskurve bei ungleichwertigem Abfluss
+chart.new.longitudinal_section = L\u00e4ngsschnitt
 chart.new.w_differences = Differenzen
-chart.new.waterlevel = Wasserstand/Wasserspiegellage
+chart.new.crosssection = Querprofil
 
 cross_section = Querprofil
 
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Fri Jan 20 09:14:53 2012 +0000
@@ -28,9 +28,9 @@
 
 chart.new.durationcurve = Dauerlinie
 chart.new.computeddischargecurve = Abflusskurve
-chart.new.discharge_longitudinal_section = Abflusskurve bei ungleichwertigem Abfluss
+chart.new.longitudinal_section = L\u00e4ngsschnitt
 chart.new.w_differences = Differenzen
-chart.new.waterlevel = Wasserstand/Wasserspiegellage
+chart.new.crosssection = Querprofil
 
 cross_section = Querprofil
 
--- a/flys-artifacts/src/main/resources/messages_en.properties	Fri Jan 20 08:38:50 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Fri Jan 20 09:14:53 2012 +0000
@@ -26,9 +26,9 @@
 
 chart.new.durationcurve = Duration Curve
 chart.new.computeddischargecurve = Discharge Curve
-chart.new.discharge_longitudinal_section = Discharge Curve at
+chart.new.longitudinal_section = Longitudinal Section
 chart.new.w_differences = Differences
-chart.new.waterlevel = Waterlevel
+chart.new.crosssection = Cross Section
 
 cross_section = Cross Section
 

http://dive4elements.wald.intevation.org