changeset 469:62fc63d0f71d

Added a new State in Product Verticalprofile in Timeseriespoints. Now it will be displayed the Years where measurements happened and than only the dates of the chosen Year will be fetched and displayed. gnv-artifacts/trunk@532 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 12 Jan 2010 12:42:53 +0000
parents 7ba4c7222265
children b7bb66440cc8
files gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml gnv-artifacts/doc/conf/queries.properties gnv-artifacts/src/main/resources/lang/artifactMessages.properties gnv-artifacts/src/main/resources/lang/artifactMessages_de.properties gnv-artifacts/src/main/resources/lang/artifactMessages_de_DE.properties gnv-artifacts/src/main/resources/lang/artifactMessages_en.properties
diffstat 7 files changed, 49 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Jan 12 11:34:25 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Jan 12 12:42:53 2010 +0000
@@ -1,5 +1,17 @@
 2010-01-12  Tim Englich  <tim.englich@intevation.de>
 
+	* doc/conf/queries.properties: 
+	  Added Query for Years in VerticalProfiles in TimeSeriesPoints.
+	  Modified the Query for Dates in VerticalProfiles in TimeSeriesPoints.
+	
+	* doc/conf/products/verticalprofile/conf_timeseriespoint.xml: 
+	  Added State for choosing the year and than it will only display
+	  the Dates which are within the coosen year.
+	  
+	* src/main/resources/lang/artifactMessages*.properties:
+	  Added Ressource for diaplaying year. 
+
+2010-01-12  Tim Englich  <tim.englich@intevation.de>
 	* src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java (configureHorizontalCrossSection): 
 	  Added the Method to load the Configurationsettings for horizontal-cross-sections
 	  from the global Configuartion and put it into the Context.
--- a/gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml	Tue Jan 12 11:34:25 2010 +0000
+++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml	Tue Jan 12 12:42:53 2010 +0000
@@ -87,6 +87,23 @@
         
         <transition transition="de.intevation.gnv.transition.DefaultTransition">
             <from state="verticalprofile_parameter"/>
+            <to state="verticalprofile_year"/>
+        </transition>
+        
+         <state id="verticalprofile_year" description="verticalprofile_year" state="de.intevation.gnv.state.DefaultState">
+            <queryID>verticalprofile_year</queryID>
+            <dataname>yearid</dataname>
+            <data-multiselect>true</data-multiselect>
+            <inputvalues>
+                <inputvalue name="featureid" type="Integer" multiselect="false"  usedinquery="1"/>
+                <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/>
+                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
+                <inputvalue name="yearid" type="String" multiselect="true" usedinquery="0"/>
+            </inputvalues>
+        </state>
+        
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalprofile_year"/>
             <to state="verticalprofile_date"/>
         </transition>
         
@@ -97,6 +114,7 @@
             <inputvalues>
                 <inputvalue name="featureid" type="Integer" multiselect="false"  usedinquery="1"/>
                 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/>
+                 <inputvalue name="yearid" type="String" multiselect="true" usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                 <inputvalue name="dateid" type="Date" multiselect="true" usedinquery="0"/>
             </inputvalues>
--- a/gnv-artifacts/doc/conf/queries.properties	Tue Jan 12 11:34:25 2010 +0000
+++ b/gnv-artifacts/doc/conf/queries.properties	Tue Jan 12 12:42:53 2010 +0000
@@ -261,6 +261,19 @@
           M.FEATUREID = ? and \
           TS.PARAMETERID IN ( ? )
           
+          
+verticalprofile_year=select distinct \
+        to_char(tsv.TIMEVALUE,'YYYY') KEY, \
+        to_char(tsv.TIMEVALUE,'YYYY') VALUE \
+    from MEDIAN.TIMESERIES ts, \
+         MEDIAN.TIMESERIESVALUE tsv, \
+         MEDIAN.MEASUREMENT m \
+    where ts.TIMESERIESID = tsv.TIMESERIESID and \
+          m.MEASUREMENTID = tsv.MEASUREMENTID and \
+          m.FEATUREID = ? and \
+          ts.PARAMETERID IN ( ? ) \
+    order by to_char(tsv.TIMEVALUE,'YYYY')
+          
 verticalprofile_date=select distinct \
            tsv.TIMEVALUE KEY, \
            tsv.TIMEVALUE VALUE \
@@ -270,7 +283,8 @@
     where ts.TIMESERIESID = tsv.TIMESERIESID and \
           m.MEASUREMENTID = tsv.MEASUREMENTID and \
           m.FEATUREID = ? and \
-          ts.PARAMETERID IN ( ? ) \
+          ts.PARAMETERID IN ( ? ) and \
+          to_char(tsv.TIMEVALUE,'YYYY') IN (?) \
     order by tsv.TIMEVALUE 
 
 verticalprofile_chart_data= SELECT M.ZLOCATION XORDINATE, \
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages.properties	Tue Jan 12 11:34:25 2010 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages.properties	Tue Jan 12 12:42:53 2010 +0000
@@ -33,6 +33,7 @@
 mindepthid = Deepest Layer
 maxdepthid = Highest Layer
 parameterid = Parameter
+yearid = Year
 timeinterval = Time period
 minvalue = from
 maxvalue = to
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages_de.properties	Tue Jan 12 11:34:25 2010 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages_de.properties	Tue Jan 12 12:42:53 2010 +0000
@@ -33,6 +33,7 @@
 mindepthid = Untere Grenzschicht
 maxdepthid = Obere Grenzschicht
 parameterid = Parameter
+yearid = Jahr
 timeinterval = Zeitfenster
 minvalue = von
 maxvalue = bis
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages_de_DE.properties	Tue Jan 12 11:34:25 2010 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages_de_DE.properties	Tue Jan 12 12:42:53 2010 +0000
@@ -33,6 +33,7 @@
 mindepthid = Untere Grenzschicht
 maxdepthid = Obere Grenzschicht
 parameterid = Parameter
+yearid = Jahr
 timeinterval = Zeitfenster
 minvalue = von
 maxvalue = bis
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages_en.properties	Tue Jan 12 11:34:25 2010 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages_en.properties	Tue Jan 12 12:42:53 2010 +0000
@@ -33,6 +33,7 @@
 mindepthid = Deepest Layer
 maxdepthid = Highest Layer
 parameterid = Parameter
+yearid = Year
 timeinterval = Time period
 minvalue = from
 maxvalue = to

http://dive4elements.wald.intevation.org