changeset 81:9b41f3688610

Added Support for TimeSeriesMesh gnv-artifacts/trunk@106 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 21 Sep 2009 11:50:47 +0000
parents 29a7ba731838
children 5eb62df21f9a
files gnv-artifacts/Changelog gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesMeshArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/DefaultInputValue.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/InputValue.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/SingleInputTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/describedata/DefaultSingleValueDescribeData.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/describedata/SingleValueDescribeData.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java gnv-artifacts/src/test/ressources/conf.xml gnv-artifacts/src/test/ressources/queries.properties
diffstat 11 files changed, 366 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/Changelog	Thu Sep 17 14:25:24 2009 +0000
+++ b/gnv-artifacts/Changelog	Mon Sep 21 11:50:47 2009 +0000
@@ -1,3 +1,24 @@
+2009-09-21  Tim Englich  <tim.englich@intevation.de>
+
+    * src/test/ressources/queries.properties Edited:
+     Queryie for TimeSeriesMesh added. 
+    * src/test/ressources/conf.xml Edited: 
+      New Artifact representing the TimeSeries-Mesh added to the Configuration.
+    * src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Edited:
+     Inputdata for the Chartgeneration will now be allocated by name and not by position in Transitionorder. 
+    * src/main/java/de/intevation/gnv/transition/describedata/SingleValueDescribeData.java Added, 
+      src/main/java/de/intevation/gnv/transition/describedata/DefaultSingleValueDescribeData.java Added, 
+      src/main/java/de/intevation/gnv/transition/SingleInputTransition.java Added:
+      New Class for Representing a single Input Transition 
+    * src/main/java/de/intevation/gnv/transition/TransitionBase.java Edited:
+      Added support of usage inputValues none or multiple times in Queries.
+      Added support for SingleInputTransitions in Describe-Output
+    * src/main/java/de/intevation/gnv/transition/InputValue.java Edited, 
+      src/main/java/de/intevation/gnv/transition/DefaultInputValue.java Edited:
+      An InputValue now is possible to use none or multiple times in Queries. 
+    * src/main/java/de/intevation/gnv/timeseries/TimeSeriesMeshArtifact.java Added:
+      ArtifactClass for the Representation of an Mesh-Timeseries-Artifact 
+
 2009-09-17  Tim Englich  <tim.englich@intevation.de>
 
     * src/test/ressources/conf.xml Edited: 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesMeshArtifact.java	Mon Sep 21 11:50:47 2009 +0000
@@ -0,0 +1,18 @@
+package de.intevation.gnv.timeseries;
+public class TimeSeriesMeshArtifact extends TimeSeriesArtifact {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 5680432486700275986L;
+
+    /**
+     * 
+     * Constructor
+     */
+    public TimeSeriesMeshArtifact() {
+        super();
+        super.name = super.name+ "Mesh";
+    }
+
+}
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/DefaultInputValue.java	Thu Sep 17 14:25:24 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/DefaultInputValue.java	Mon Sep 21 11:50:47 2009 +0000
@@ -15,15 +15,17 @@
     private String name = null;
     private String type = null;
     private boolean multiselect = false;
+    private int usedInQueries = 1;
     
     
     /**
      * Constructor
      */
-    public DefaultInputValue(String name, String type, boolean multiselect){
+    public DefaultInputValue(String name, String type, boolean multiselect, int usedInQueries){
         this.name = name;
         this.type = type;
         this.multiselect = multiselect;
+        this.usedInQueries = usedInQueries;
     }
 
     /**
@@ -55,4 +57,8 @@
         return this.multiselect;
     }
 
+    public int usedInQueries() {
+        return this.usedInQueries;
+    }
+
 }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/InputValue.java	Thu Sep 17 14:25:24 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/InputValue.java	Mon Sep 21 11:50:47 2009 +0000
@@ -14,5 +14,6 @@
     public String getName();
     public String getType();
     public boolean isMultiselect();
+    public int usedInQueries();
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/SingleInputTransition.java	Mon Sep 21 11:50:47 2009 +0000
@@ -0,0 +1,61 @@
+/**
+ *
+ */
+package de.intevation.gnv.transition;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.gnv.geobackend.base.Result;
+import de.intevation.gnv.transition.describedata.DefaultSingleValueDescribeData;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class SingleInputTransition extends TransitionBase {
+
+    /**
+     * the logger, used to log exceptions and additonaly information
+     */
+    private static Logger log = Logger.getLogger(SingleInputTransition.class);
+    
+    /**
+     *
+     */
+    private static final long serialVersionUID = -6169497306324917318L;
+
+    /**
+     * Constructor
+     */
+    public SingleInputTransition() {
+    }
+
+    /**
+     * @see de.intevation.gnv.transition.Transition#validate()
+     */
+    public boolean validate() {
+        return true;
+    }
+
+    @Override
+    protected void purifyResult(Collection<Result> result) {
+        log.debug("SingleInputTransition.purifyResult");
+        if (this.descibeData == null){
+            this.descibeData = new ArrayList<Object>();
+        }
+        String value = null;
+        if (result != null && result.size() == 1){
+            Result tmpItem = result.iterator().next();
+            value = tmpItem.getObject("MAX").toString();
+        }else{
+            value = "";
+        }
+        
+        this.descibeData.add(new DefaultSingleValueDescribeData(this.dataName, value));
+    }
+    
+
+}
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Thu Sep 17 14:25:24 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Mon Sep 21 11:50:47 2009 +0000
@@ -10,6 +10,7 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -31,6 +32,7 @@
 import de.intevation.gnv.transition.describedata.MinMaxDescribeData;
 import de.intevation.gnv.transition.describedata.NamedArrayList;
 import de.intevation.gnv.transition.describedata.NamedCollection;
+import de.intevation.gnv.transition.describedata.SingleValueDescribeData;
 import de.intevation.gnv.transition.exception.TransitionException;
 import de.intevation.gnv.utils.ArtifactXMLUtilities;
 
@@ -54,7 +56,7 @@
     
     private String description = null;
     
-    private String dataName = null;
+    protected String dataName = null;
     
     private boolean dataMultiSelect = false;
 
@@ -130,7 +132,20 @@
         this.inputValueNames = new ArrayList<String>(inputValuesNodes.getLength());
         for (int i = 0 ; i < inputValuesNodes.getLength(); i++){
             Node inputValueNode = inputValuesNodes.item(i);
-            InputValue inputValue = new DefaultInputValue(Config.getStringXPath(inputValueNode,"@name"), Config.getStringXPath(inputValueNode,"@type"), Boolean.parseBoolean(Config.getStringXPath(inputValueNode,"@multiselect")));
+            String usedinQueryValue = Config.getStringXPath(inputValueNode,"@usedinquery");
+            int usedinQuery = 1;
+            if (usedinQueryValue != null){
+                try {
+                    usedinQuery = Integer.parseInt(usedinQueryValue);
+                } catch (NumberFormatException e) {
+                    log.warn("Used in Query Value cannot be transformed into a Number");
+                }
+            }
+            InputValue inputValue = new DefaultInputValue(
+                    Config.getStringXPath(inputValueNode,"@name"), 
+                    Config.getStringXPath(inputValueNode,"@type"), 
+                    Boolean.parseBoolean(Config.getStringXPath(inputValueNode,"@multiselect")),
+                    usedinQuery);
             log.debug(inputValue.toString());
             this.inputValues.put(inputValue.getName(),inputValue);
             this.inputValueNames.add(inputValue.getName());
@@ -272,17 +287,30 @@
     public void advance() throws TransitionException {
         log.debug("TransitionBase.advance");
         try {
-            String[] filterValues = new String[this.inputValueNames.size()];
+            List<String> list = new ArrayList<String>();
+            
+           
             Iterator<String> it = this.inputValueNames.iterator();
             int i = 0;
             while (it.hasNext()){
                 String value = it.next();
                 InputData data = this.inputData.get(value);
-                filterValues[i++] = data.getValue();
+                int size = this.inputValues.get(data.getName()).usedInQueries();
+                for (int j = 0; j < size; j++){
+                    list.add(data.getValue());
+                }
             }
-            QueryExecutor queryExecutor = QueryExecutorFactory.getInstance().getQueryExecutor();
-            Collection<Result> result = queryExecutor.executeQuery(this.queryID, filterValues);
-            this.purifyResult(result);
+            String[] filterValues = list.toArray(new String[0]);
+            Collection<Result> result =  null;
+            try {
+                if (this.queryID != null){
+                    QueryExecutor queryExecutor = QueryExecutorFactory.getInstance().getQueryExecutor();
+                    result = queryExecutor.executeQuery(this.queryID, filterValues);
+                }
+                this.purifyResult(result);
+            } catch (RuntimeException e) {
+                log.error(e,e);
+            }
         } catch (QueryException e) {
             log.error(e,e);
             throw new TransitionException(e);
@@ -414,7 +442,29 @@
                             staticNode.appendChild(inputMinNode);
                             staticNode.appendChild(inputMaxNode);
                         }
+                    }else if (o instanceof SingleValueDescribeData){
+                        
+                        SingleValueDescribeData svdb = (SingleValueDescribeData)o;
+                        
+                        Element inputNode = xmlutilities.createXFormElement(document, "input");
+                        inputNode.setAttribute("ref", svdb.getName());
+                        
+                        Element inputLableNode = xmlutilities.createXFormElement(document, "label");
+                        inputLableNode.setTextContent(svdb.getName());
+                        inputNode.appendChild(inputLableNode);
+                        
+                        Element inputValueNode = xmlutilities.createXFormElement(document, "value");
+                        inputValueNode.setTextContent(svdb.getValue());
+                        inputNode.appendChild(inputValueNode);
+                        
+                        
+                        if (!it.hasNext()){
+                            dynamic.appendChild(inputNode);
+                        }else{
+                            staticNode.appendChild(inputNode);
+                        }
                     }
+                
                 }
             }
         }
@@ -438,6 +488,6 @@
      * @see de.intevation.gnv.transition.Transition#getInputData()
      */
     public Collection<InputData> getInputData() throws TransitionException {
-        return this.inputData.values();
+        return this.inputData !=  null ? this.inputData.values() : null;
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/describedata/DefaultSingleValueDescribeData.java	Mon Sep 21 11:50:47 2009 +0000
@@ -0,0 +1,46 @@
+/**
+ *
+ */
+package de.intevation.gnv.transition.describedata;
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class DefaultSingleValueDescribeData implements SingleValueDescribeData {
+
+    
+    /**
+     *
+     */
+    private static final long serialVersionUID = 3580176842483316917L;
+
+    private String name = null;
+    
+    private String value = null;
+    
+    /**
+     * Constructor
+     * @param name
+     * @param value
+     */
+    public DefaultSingleValueDescribeData(String name, String value) {
+        super();
+        this.name = name;
+        this.value = value;
+    }
+
+    /**
+     * @see de.intevation.gnv.transition.describedata.SingleValueDescribeData#getName()
+     */
+    public String getName() {
+        return this.name;
+    }
+
+    /**
+     * @see de.intevation.gnv.transition.describedata.SingleValueDescribeData#getValue()
+     */
+    public String getValue() {
+        return this.value;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/describedata/SingleValueDescribeData.java	Mon Sep 21 11:50:47 2009 +0000
@@ -0,0 +1,14 @@
+/**
+ *
+ */
+package de.intevation.gnv.transition.describedata;
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public interface SingleValueDescribeData extends DescribeData {
+
+    public String getName();
+    
+    public String getValue();
+}
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Thu Sep 17 14:25:24 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Mon Sep 21 11:50:47 2009 +0000
@@ -20,6 +20,7 @@
 import de.intevation.gnv.geobackend.base.Result;
 import de.intevation.gnv.transition.OutputTransitionBase;
 import de.intevation.gnv.transition.describedata.KeyValueDescibeData;
+import de.intevation.gnv.transition.describedata.NamedCollection;
 import de.intevation.gnv.transition.exception.TransitionException;
 
 /**
@@ -53,7 +54,7 @@
     public void out(String outputMode, OutputStream outputStream) throws TransitionException {
         log.debug("TimeSeriesOutputTransition");
         try {
-            this.advance(); // TODO nur neu holen wenn hash auf chartResult sich geändert hat
+            this.advance(); // TODO nur neu holen wenn hash auf chartResult sich ge�ndert hat
             ChartFactory chartFactory = new ChartFactory();
             
             Collection<KeyValueDescibeData> parameters = this.getParameters();
@@ -93,28 +94,31 @@
     
     protected Collection<KeyValueDescibeData> getParameters(){
         Iterator<Object> it = this.descibeData.iterator();
-        int i = 0;
+        
         while (it.hasNext()){
            
            Object o = it.next();
-           if (i == 1){ // TODO über Identifier arbeiten This is just a hack
-               return (Collection)o;
+           if (o instanceof NamedCollection<?>){
+               NamedCollection<KeyValueDescibeData> nc = (NamedCollection<KeyValueDescibeData>)o;
+               if (nc.getName().equals("parameterid")){ // TODO: konfigurierbar machen.
+                   return nc;
+               }
            }
-           i++;
         }
         return null;
     }
     
     protected Collection<KeyValueDescibeData> getMeasurements(){
         Iterator<Object> it = this.descibeData.iterator();
-        int i = 0;
         while (it.hasNext()){
            
            Object o = it.next();
-           if (i == 2){ // TODO über Identifier arbeiten This is just a hack
-               return (Collection)o;
+           if (o instanceof NamedCollection<?>){
+               NamedCollection<KeyValueDescibeData> nc = (NamedCollection<KeyValueDescibeData>)o;
+               if (nc.getName().equals("measurementid")){ // TODO: konfigurierbar machen.
+                   return nc;
+               }
            }
-           i++;
         }
         return null;
     }
--- a/gnv-artifacts/src/test/ressources/conf.xml	Thu Sep 17 14:25:24 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/conf.xml	Mon Sep 21 11:50:47 2009 +0000
@@ -4,13 +4,13 @@
         <context-factory>de.intevation.gnv.artifacts.context.GNVArtifactContextFactory</context-factory>
         <artifact-factories>
             <artifact-factory name="fis_marnet" description="Artiefactfactory for Instantiating the Artifact for the FIS Marnet"  
-                              ttl="60000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                              ttl="300000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
             <artifact-factory name="fis_imis" description="Artiefactfactory for Instantiating the Artifact for the FIS IMIS"  
-                              ttl="60000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                              ttl="300000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
             <artifact-factory name="fis_staun" description="Artiefactfactory for Instantiating the Artifact for the FIS STAUN"  
-                              ttl="60000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                              ttl="300000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
             <artifact-factory name="fis_modeldata" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
-                              ttl="60000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                              ttl="300000" artifact="de.intevation.gnv.artifacts.fis.FISArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
         </artifact-factories>
     </factories>
     <artifacts>
@@ -18,7 +18,7 @@
             <products>
                 <product name= "timeSeries">
                     <artifact-factory name="timeSeries" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
-                              ttl="60000" artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                             ttl="300000" artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
                     <parameters>
                         <parameter name="sourceid" value="4"/>
                     </parameters>
@@ -29,7 +29,7 @@
             <products>
                 <product name= "timeSeries">
                     <artifact-factory name="timeSeries" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
-                              ttl="60000" artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                              ttl="300000" artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
                     <parameters>
                         <parameter name="sourceid" value="18"/>
                     </parameters>
@@ -40,7 +40,7 @@
             <products>
                 <product name= "timeSeries">
                     <artifact-factory name="timeSeries" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
-                              ttl="60000" artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                              ttl="300000" artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
                     <parameters>
                         <parameter name="sourceid" value="17"/>
                     </parameters>
@@ -49,11 +49,117 @@
         </artifact>
         <artifact name="fis_modeldata">
             <products>
+                <product name= "timeSeriesMesh">
+                    <artifact-factory name="timeSeriesMesh" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
+                              ttl="300000" artifact="de.intevation.gnv.timeseries.TimeSeriesMeshArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                    <parameters></parameters>
+                </product>
             </products>
         </artifact>
+        
+        <artifact name="timeSeriesMesh">
+            <transitions>
+                
+                <transition id="timeseries_mesh" description="timeseries_mesh" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_mesh</queryID>
+                    <dataname>featureid</dataname>
+                    <data-multiselect>false</data-multiselect>
+                    <reachableTransitions>
+                           <transition>timeseries_mesh_coordinate</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="timeseries_mesh_coordinate" description="timeseries_mesh_coordinate" transition="de.intevation.gnv.transition.SingleInputTransition">
+                    <dataname>mesh_coordinate</dataname>
+                    <data-multiselect>false</data-multiselect>
+                    <reachableTransitions>
+                           <transition>timeseries_meshpoint</transition>v
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="timeseries_meshpoint" description="timeseries_meshpoint" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_meshpoint</queryID>
+                    <dataname>mesh_point</dataname>
+                    <data-multiselect>false</data-multiselect>
+                    <reachableTransitions>
+                        <transition>timeseries_meshpoint_depth</transition>v
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="mesh_coordinate" type="Integer" multiselect="false"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="timeseries_meshpoint_depth" description="timeseries_meshpoint_depth" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_meshpoint_depth</queryID>
+                    <dataname>measurementid</dataname>
+                    <data-multiselect>true</data-multiselect>
+                    <reachableTransitions>
+                        <transition>timeseries_meshpoint_parameter</transition>v
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/>
+                    </inputvalues>
+                </transition>
+
+                <transition id="timeseries_meshpoint_parameter" description="timeseries_meshpoint_parameter" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_mesh_parameter</queryID>
+                    <dataname>parameterid</dataname>
+                    <data-multiselect>true</data-multiselect>
+                    <reachableTransitions>
+                        <transition>timeseries_meshpoint_interval</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="measurementid" type="Integer" multiselect="false" usedinquery="0"/>
+                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="timeseries_meshpoint_interval" description="timeseries_interval" transition="de.intevation.gnv.transition.MinMaxTransition">
+                    <queryID>timeseries_mesh_interval</queryID>
+                    <dataname>minvalue</dataname>
+                    <data-multiselect>false</data-multiselect>
+                    <reachableTransitions>
+                        <transition>timeseries_meshpoint_calculate_results</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="measurementid" type="Integer" multiselect="false" usedinquery="0"/>
+                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
+                         <inputvalue name="parameterid"   type="Integer" multiselect="true" usedinquery="0"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="timeseries_meshpoint_calculate_results" description="timeseries_interval" transition="de.intevation.gnv.transition.timeseries.TimeSeriesOutputTransition">
+                    <queryID>timeseries_mesh_chart_data</queryID>
+                    <inputvalues>
+                        <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="measurementid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="parameterid"   type="Integer" multiselect="true" usedinquery="1"/>
+                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="minvalue" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="maxvalue" type="Integer" multiselect="false" usedinquery="1"/>
+                    </inputvalues>
+                    <outputsModes>
+                        <outputsMode name="chart" description="Chartrepresentation of the Values" mime-type="image/png"/>
+                        <outputsMode name="csv" description="CSV-Export der Daten" mime-type="test/plain"/>
+                        <outputsMode name="statistics" description="Statistik zu den Daten" mime-type="test/plain"/>
+                    </outputsModes>
+                </transition>
+                
+            </transitions>
+        </artifact>
+        
+        
         <artifact name="timeSeries">
             <transitions>
-                
                 <transition id="timeseries_timeseriespoint" description="timeseries_timeseriespoint" transition="de.intevation.gnv.transition.DefaultTransition">
                     <queryID>timeseries_timeseriespoint</queryID>
                     <dataname>featureid</dataname>
@@ -134,8 +240,8 @@
         <sleep-time>300000</sleep-time>
     </cleaner>
     <database>
-        <user>tim</user>
-        <password>test</password>
+        <user></user>
+        <password></password>
         <!--url>jdbc:h2:src/test/ressources/artifacts.db</url>
         <driver>org.h2.Driver</driver> 
         <sql></sql> -->
--- a/gnv-artifacts/src/test/ressources/queries.properties	Thu Sep 17 14:25:24 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/queries.properties	Mon Sep 21 11:50:47 2009 +0000
@@ -3,3 +3,14 @@
 timeseries_depth_height=SELECT DISTINCT m.MEASUREMENTID KEY, m.ZLOCATION VALUE from MEDIAN.MEASUREMENT m where m.MEASUREMENTID in (SELECT DISTINCT  t_v.MEASUREMENTID from MEDIAN.TIMESERIESVALUE t_v where t_v.TIMESERIESID in (SELECT DISTINCT  t.TIMESERIESID from MEDIAN.TIMESERIES t where t.PARAMETERID in (SELECT DISTINCT  p.PARAMETERID from MEDIAN.PARAMETER p where m.FEATUREID IN ( ? ) and p.PARAMETERID IN (?))))ORDER BY m.ZLOCATION DESC
 timeseries_interval=select min(tv.TIMEVALUE) MIN, max(tv.TIMEVALUE) MAX from MEDIAN.TIMESERIES t , MEDIAN.TIMESERIESVALUE tv where tv.TIMESERIESID = t.TIMESERIESID AND t.PARAMETERID IN ( ? ) AND tv.MEASUREMENTID IN ( ? )
 timeseries_chart_data=SELECT tv.TIMEVALUE, tv.DATAVALUE, t.PARAMETERID, tv.MEASUREMENTID, tv.TIMESERIESID FROM MEDIAN.TIMESERIESVALUE tv, MEDIAN.TIMESERIES t WHERE tv.TIMESERIESID = t.TIMESERIESID AND t.PARAMETERID IN ( ? ) AND tv.MEASUREMENTID IN ( ? ) AND tv.TIMEVALUE > TO_DATE ('?', 'YYYY.MM.DD HH24:MI:SS') AND tv.TIMEVALUE < TO_DATE ('?', 'YYYY.MM.DD HH24:MI:SS') ORDER BY tv.MEASUREMENTID ,tv.TIMESERIESID ,t.PARAMETERID ,tv.TIMEVALUE
+
+
+# Zeitserie Mesh
+
+timeseries_mesh = SELECT OBJECTID KEY, m.NAME VALUE FROM MEDIAN.MESH m order by m.NAME
+timeseries_meshpoint = SELECT FEATUREID KEY, SHAPE VALUE FROM  MEDIAN.MESHPOINT mp , MEDIAN.MESH m WHERE m.OBJECTID = ? AND mp.MESHID = m.MESHID AND KPOSITION = 1 AND rownum < 10 
+timeseries_meshpoint_depth = select mp.FEATUREID KEY, -ml.UPPERZLOCATION || ' - '|| -ml.LOWERZLOCATION as VALUE from MEDIAN.MESHLAYER ml, MEDIAN.MESHPOINT mp where ml.KPOSITION = mp.KPOSITION and ml.MESHID = mp.MESHID and mp.FEATUREID in ( select FEATUREID from MEDIAN.MESHPOINT mp, MEDIAN.MESH m where m.OBJECTID = ? AND mp.MESHID = m.MESHID  AND IPOSITION = (select IPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?) and JPOSITION = (select JPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?)) order by ml.UPPERZLOCATION desc
+timeseries_mesh_parameter=SELECT distinct p.PARAMETERID KEY , p.GERMANNAME VALUE  from MEDIAN.PARAMETER p, MEDIAN.MESHSCALARVALUE msc, MEDIAN.MESH m  where m.OBJECTID = ? AND msc.PARTID = m.PARTIDMIN AND msc.PARAMETERID = p.PARAMETERID
+timeseries_mesh_interval=select /*+ parallel(TIMEVALUE,5) */ min(TIMEVALUE) MIN, max(TIMEVALUE) MAX from MEDIAN.MESHSCALARVALUE msc , MEDIAN.MESH m where m.OBJECTID = ?  AND msc.PARTID >= m.PARTIDMIN AND msc.PARTID <= m.PARTIDMAX
+timeseries_mesh_chart_data=select /*+ parallel(timevalue,10) */ msv.TIMEVALUE, msv.DATAVALUE, msv.PARAMETERID, msv.FEATUREID MEASUREMENTID, mp.FEATUREID TIMESERIESID from MEDIAN.MESHSCALARVALUE msv , MEDIAN.MESHPOINT mp, MEDIAN.MESH m where (m.OBJECTID = ? AND msv.PARTID >= m.PARTIDMIN AND msv.PARTID <= m.PARTIDMAX ) AND msv.FEATUREID in ( ? ) and msv.PARAMETERID in ( ? ) AND mp.FEATUREID = ? and TIMEVALUE >= to_date('?', 'YYYY.MM.DD HH24:MI:SS') and TIMEVALUE <= to_date('?', 'YYYY.MM.DD HH24:MI:SS') order by msv.FEATUREID, msv.PARAMETERID, msv.TIMEVALUE
+

http://dive4elements.wald.intevation.org