changeset 207:d87347142702

Store the Results of an Artifact not in the Artifact but in an ehcache instance. issue3 gnv-artifacts/trunk@263 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 23 Oct 2009 08:50:50 +0000
parents 01ac348ac4a4
children a33d59f5791a
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/MinMaxTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/SingleInputTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/NorthSouthEastWestTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_chart.xml gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_csv.xml gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_statistics.xml gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_07_out_chart.xml gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_07_out_csv.xml gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_03_advance.xml gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_chart.xml gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_csv.xml gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_statistics.xml
diffstat 23 files changed, 140 insertions(+), 93 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/ChangeLog	Fri Oct 23 08:50:50 2009 +0000
@@ -1,5 +1,31 @@
 2009-10-23  Tim Englich  <tim.englich@intevation.de>
 
+	* src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml,
+	  src/test/ressources/verticalprofile/verticalprofile_step_03_advance.xml, 
+	  src/test/ressources/verticalprofile/verticalprofile_step_04_out_*.xml,
+	  src/test/ressources/timeseries_mesh/timeseries_step_07_out_*.xml, 
+	  src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_*.xml:
+	  Changed the uuid because the new Storage shows that there were different ones in one Testcase 
+	
+	* src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java:
+	  Put the UUID into the Resultlookup 
+	* src/main/java/de/intevation/gnv/transition/TransitionBase.java: 
+	  Removed the Storage of Results in the Object and put them into the ehcache
+	* src/main/java/de/intevation/gnv/transition/Transition.java: 
+	  Removed some needless Methods that were not longer Required
+	  
+	* src/main/java/de/intevation/gnv/transition/profile/horizontal/NorthSouthEastWestTransition.java (advance):
+	  src/main/java/de/intevation/gnv/transition/SingleInputTransition.java (purifyResult): 
+	  src/main/java/de/intevation/gnv/transition/MinMaxTransition.java (purifyResult): 
+	  src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java (extractKVP): 
+	  src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java (describe): 
+	  src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java (describe): 
+	  src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java (describe): 
+	  src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java (describe): 
+	  src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java (uuid):
+	  Lookup the Results from ehcach and centralize the Lookup to one methode. 
+
+2009-10-23  Tim Englich  <tim.englich@intevation.de>
 	* doc/conf/queries.properties: 
 	  Optimized Query horizontalprofile_instantaneouspoint_cruise because it is not warranted
 	  that the name of an cruise is set. issue60
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Fri Oct 23 08:50:50 2009 +0000
@@ -65,6 +65,8 @@
                                                               + XPATH_IDENTIFIER_REPLACE
                                                               + "']";
 
+    
+    protected String uuid = null;
     /**
      * The current Transition
      */
@@ -96,7 +98,7 @@
     @Override
     public Document advance(Document target, CallContext context) {
         log.debug("GNVArtifactBase.advance");
-        String uuid = Config.getStringXPath(target, "action/uuid/@value");
+        this.uuid = Config.getStringXPath(target, "action/uuid/@value");
         Document result = XMLUtils.newDocument();
         try {
             if (this.current != null) {
@@ -112,8 +114,6 @@
                             // 2.Ergebnisse Berechnen
                             this.current.advance(uuid, context.getMeta());
                             // 3. Ergebnisse Übergeben
-                            nextStep.setDescibeData(this.current
-                                    .getDescibeData());
                             nextStep.putInputData(this.current.getInputData(),
                                     uuid);
                             // 4. Umschalten auf neue Transistion
@@ -209,8 +209,7 @@
         Document result = XMLUtils.newDocument();
         try {
             if (this.current != null) {
-                String uuid = Config.getStringXPath(target,
-                        "action/uuid/@value");
+                this.uuid = Config.getStringXPath(target,"action/uuid/@value");
                 Collection<InputData> inputData = this.parseInputData(target,
                                                                       "/action/data/input");
                 if (!inputData.isEmpty()){
@@ -275,7 +274,7 @@
         }
     }
 
-    protected Document createDescibeOutput(CallMeta callMeta) {
+    protected Document createDescibeOutput(CallMeta callMeta, String uuid) {
         log.debug("GNVArtifactBase.createDescibeOutput");
         Document document = XMLUtils.newDocument();
         Element rootNode = this.createRootNode(document);
@@ -284,7 +283,7 @@
         this.createCurrentState(rootNode, document);
         this.createReachableStates(rootNode, document);
         this.createModel(rootNode, document);
-        this.createUserInterface(rootNode, document, callMeta);
+        this.createUserInterface(rootNode, document, callMeta, uuid);
         return document;
     }
 
@@ -360,11 +359,11 @@
     }
 
     protected void createUserInterface(Element parent, Document document,
-                                       CallMeta callMeta) {
+                                       CallMeta callMeta, String uuid) {
         Element uiNode = xmlUtilities.createArtifactElement(document, "ui");
 
         if (this.current != null) {
-            this.current.describe(document, uiNode, callMeta);
+            this.current.describe(document, uiNode, callMeta, uuid);
         }
 
         parent.appendChild(uiNode);
@@ -464,8 +463,7 @@
         try {
 
             if (current != null && current instanceof OutputTransition) {
-                String uuid = Config.getStringXPath(format,
-                        "action/uuid/@value");
+                this.uuid = Config.getStringXPath(format,"action/uuid/@value");
                 ((OutputTransition) current)
                         .out(this.readOutputType(format), this.parseInputData(
                                 format, "/action/out/params/input"),
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java	Fri Oct 23 08:50:50 2009 +0000
@@ -41,7 +41,7 @@
     @Override
     public Document describe(CallContext context) {
         log.debug("HorizontalProfileArtifact.describe");
-        return super.createDescibeOutput(context.getMeta());
+        return super.createDescibeOutput(context.getMeta(), super.uuid);
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java	Fri Oct 23 08:50:50 2009 +0000
@@ -40,7 +40,7 @@
     @Override
     public Document describe(CallContext context) {
         log.debug("VerticalProfileArtifact.describe");
-        return super.createDescibeOutput(context.getMeta());
+        return super.createDescibeOutput(context.getMeta(),super.uuid);
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/verticalcrosssection/VerticalCrossSectionMeshArtifact.java	Fri Oct 23 08:50:50 2009 +0000
@@ -41,7 +41,7 @@
     @Override
     public Document describe(CallContext context) {
         log.debug("VerticalCrossSectionMeshArtifact.describe");
-        return super.createDescibeOutput(context.getMeta());
+        return super.createDescibeOutput(context.getMeta(),super.uuid);
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java	Fri Oct 23 08:50:50 2009 +0000
@@ -40,7 +40,7 @@
     @Override
     public Document describe(CallContext context) {
         log.debug("TimeSeriesArtifact.describe");
-        return super.createDescibeOutput(context.getMeta());
+        return super.createDescibeOutput(context.getMeta(), super.uuid);
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java	Fri Oct 23 08:50:50 2009 +0000
@@ -54,12 +54,14 @@
     @Override
     protected void purifyResult(Collection<Result> result, String uuid) {
         log.debug("CoordinateSelectionTransition.purifyResult");
-        if (this.descibeData == null) {
-            this.descibeData = new ArrayList<Object>();
+        Collection<Object> describeData = this.getDescibeData(uuid);
+        if (describeData == null) {
+            describeData = new ArrayList<Object>();
         }
         NamedCollection<KeyValueDescibeData> keyValueDescibeData = this
                 .extractKVP(result, "FEATUREID", "SHAPE");
-        this.descibeData.add(keyValueDescibeData);
+        describeData.add(keyValueDescibeData);
+        this.setDescibeData(uuid, describeData);
     }
     
     @Override
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/MinMaxTransition.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/MinMaxTransition.java	Fri Oct 23 08:50:50 2009 +0000
@@ -19,6 +19,10 @@
 public class MinMaxTransition extends TransitionBase {
 
     /**
+     * The UID of this Class
+     */
+    private static final long serialVersionUID = -3525903792105187408L;
+    /**
      * the logger, used to log exceptions and additonaly information
      */
     private static Logger log = Logger.getLogger(MinMaxTransition.class);
@@ -37,22 +41,23 @@
     @Override
     protected void purifyResult(Collection<Result> result, String uuid) {
         log.debug("MinMaxTransition.purifyResult");
-        if (this.descibeData == null) {
-            this.descibeData = new ArrayList<Object>();
+        Collection<Object> describeData = this.getDescibeData(uuid);
+        if (describeData == null) {
+            describeData = new ArrayList<Object>();
         }
         if (result != null && result.size() == 1) {
 
             String minName = this.dataName;
             String maxName = this.dataName;
             Result value = result.iterator().next();
-            DescribeData describeData = new DefaultMinMaxDescribeData(minName,
+            DescribeData values = new DefaultMinMaxDescribeData(minName,
                     maxName, value.getObject("MIN"), value.getObject("MAX"));
-            log.debug(describeData.toString());
-            this.descibeData.add(describeData);
+            log.debug(values.toString());
+            describeData.add(values);
         } else {
             log.warn("Result cannot be handled as MinMax Resultset");
         }
-
+        this.setDescibeData(uuid, describeData);
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/SingleInputTransition.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/SingleInputTransition.java	Fri Oct 23 08:50:50 2009 +0000
@@ -47,8 +47,9 @@
     @Override
     protected void purifyResult(Collection<Result> result, String uuid) {
         log.debug("SingleInputTransition.purifyResult");
-        if (this.descibeData == null) {
-            this.descibeData = new ArrayList<Object>();
+        Collection<Object> describeData = this.getDescibeData(uuid);
+        if (describeData == null) {
+            describeData = new ArrayList<Object>();
         }
         String value = null;
         if (result != null && result.size() == 1) {
@@ -58,8 +59,8 @@
             value = "";
         }
 
-        this.descibeData.add(new DefaultSingleValueDescribeData(this.dataName,
-                value));
+        describeData.add(new DefaultSingleValueDescribeData(this.dataName,value));
+        this.setDescibeData(uuid, describeData);
     }
 
 }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java	Fri Oct 23 08:50:50 2009 +0000
@@ -30,7 +30,7 @@
 
     public boolean validate();
 
-    public void describe(Document document, Node rootNode, CallMeta callMeta);
+    public void describe(Document document, Node rootNode, CallMeta callMeta, String uuid);
 
     public void setParent(Transition transition);
 
@@ -38,16 +38,13 @@
 
     public Collection<InputValue> getRequiredInputValues();
 
-    public void putInputData(Collection<InputData> inputData, String uuid)
-                                                                          throws TransitionException;
+    public void putInputData(Collection<InputData> inputData, 
+                             String uuid)
+                                         throws TransitionException;
 
     public Collection<InputData> getInputData() throws TransitionException;
 
     public void advance(String uuid, CallMeta callMeta)
                                                        throws TransitionException;
 
-    public Collection<Object> getDescibeData();
-
-    public void setDescibeData(Collection<Object> descibeData);
-
 }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Fri Oct 23 08:50:50 2009 +0000
@@ -23,6 +23,7 @@
 import de.intevation.artifactdatabase.Config;
 import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
+import de.intevation.gnv.artifacts.cache.CacheFactory;
 import de.intevation.gnv.artifacts.ressource.RessourceFactory;
 import de.intevation.gnv.geobackend.base.Result;
 import de.intevation.gnv.geobackend.base.query.QueryExecutor;
@@ -54,6 +55,8 @@
      * the logger, used to log exceptions and additonaly information
      */
     private static Logger log = Logger.getLogger(GNVArtifactBase.class);
+    
+    private final static String DESCRIBEDATAKEY = "_DESCRIBEDATA";
 
     private String id = null;
 
@@ -74,8 +77,7 @@
     private Transition parent = null;
 
     protected Map<String, InputData> inputData = null;
-
-    protected Collection<Object> descibeData = null;
+    
 
     /**
      * Constructor
@@ -205,7 +207,7 @@
                     boolean valid = iv.isInputValid(tmpItem.getValue(),
                             inputValue.getType());
                     if (valid) {
-                        this.setSelection(tmpItem);
+                        this.setSelection(tmpItem, uuid);
                         this.inputData.put(tmpItem.getName(), tmpItem);
                     } else {
                         String errMsg = "Wrong input for " + tmpItem.getValue()
@@ -227,10 +229,10 @@
         }
     }
 
-    private void setSelection(InputData inputData) {
+    private void setSelection(InputData inputData, String uuid) {
         log.debug("TransitionBase.setSelection");
 
-        Object o = this.getDescribeData(inputData.getName());
+        Object o = this.getDescribeData(inputData.getName(),uuid);
         if (o != null) {
             if (o instanceof Collection<?>) {
                 Collection<KeyValueDescibeData> values = (Collection<KeyValueDescibeData>) o;
@@ -264,10 +266,11 @@
         }
     }
 
-    private Object getDescribeData(String name) {
+    private Object getDescribeData(String name, String uuid) {
         log.debug("TransitionBase.getDescribeData");
-        if (this.descibeData != null) {
-            Iterator<Object> it = this.descibeData.iterator();
+        Collection<Object> descibeData = this.getDescibeData(uuid);
+        if (descibeData != null) {
+            Iterator<Object> it = descibeData.iterator();
             while (it.hasNext()) {
                 Object o = it.next();
                 if (o instanceof NamedCollection<?>) {
@@ -407,11 +410,13 @@
      */
     protected void purifyResult(Collection<Result> result, String uuid) {
         log.debug("TransitionBase.purifyResult");
-        if (this.descibeData == null) {
-            this.descibeData = new ArrayList<Object>();
+        Collection<Object> describeData = this.getDescibeData(uuid);
+        if (describeData == null) {
+            describeData = new ArrayList<Object>();
         }
         NamedCollection<KeyValueDescibeData> keyValueDescibeData = extractKVP(result, "KEY", "VALUE");
-        this.descibeData.add(keyValueDescibeData);
+        describeData.add(keyValueDescibeData); 
+        this.setDescibeData(uuid, describeData);
     }
 
     /**
@@ -436,13 +441,15 @@
 
     /**
      * @see de.intevation.gnv.transition.Transition#describe(org.w3c.dom.Document,
-     *      org.w3c.dom.Node, de.intevation.artifacts.CallMeta)
+     *      org.w3c.dom.Node, de.intevation.artifacts.CallMeta,
+     *      java.lang.String)
      */
-    public void describe(Document document, Node rootNode, CallMeta callMeta) {
+    public void describe(Document document, Node rootNode, CallMeta callMeta,String uuid) {
         log.debug("TransitionBase.describe");
-        if (this.descibeData != null) {
+        Collection<Object> descibeData = this.getDescibeData(uuid);
+        if (descibeData != null) {
             ArtifactXMLUtilities xmlutilities = new ArtifactXMLUtilities();
-            Iterator<Object> it = this.descibeData.iterator();
+            Iterator<Object> it = descibeData.iterator();
             Node staticNode = xmlutilities.createArtifactElement(document,
                     "static");
             Node dynamic = xmlutilities.createArtifactElement(document,
@@ -507,9 +514,9 @@
                     }
 
                 } else if (o instanceof MinMaxDescribeData) {
-                    MinMaxDescribeData descibeData = (MinMaxDescribeData) o;
-                    Object min = descibeData.getMinValue();
-                    Object max = descibeData.getMaxValue();
+                    MinMaxDescribeData minMaxDescibeData = (MinMaxDescribeData) o;
+                    Object min = minMaxDescibeData.getMinValue();
+                    Object max = minMaxDescibeData.getMaxValue();
                     if (min instanceof GregorianCalendar) {
                         Date d = ((GregorianCalendar) min).getTime();
                         min = DateUtils.getPatternedDateAmer(d);
@@ -522,14 +529,14 @@
                     
                     Element groupNode = xmlutilities.createXFormElement(
                             document, "group");
-                    groupNode.setAttribute("ref", descibeData.getMinName());
+                    groupNode.setAttribute("ref", minMaxDescibeData.getMinName());
                     Element groupNodeLableNode = xmlutilities
                             .createXFormElement(document, "label");
                     groupNodeLableNode.setTextContent(RessourceFactory
                             .getInstance().getRessource(
                                     callMeta.getLanguages(),
-                                    descibeData.getMinName(),
-                                    descibeData.getMinName()));
+                                    minMaxDescibeData.getMinName(),
+                                    minMaxDescibeData.getMinName()));
                     groupNode.appendChild(groupNodeLableNode);
 
                     Element inputMinNode = xmlutilities.createXFormElement(
@@ -617,16 +624,28 @@
     /**
      * @see de.intevation.gnv.transition.Transition#getDescibeData()
      */
-    public Collection<Object> getDescibeData() {
-        return this.descibeData;
+    protected Collection<Object> getDescibeData(String uuid) {
+        if (CacheFactory.getInstance().isInitialized()) {
+            String key = uuid + DESCRIBEDATAKEY;
+            log.debug("Hash for Queryelements: " + key);
+            net.sf.ehcache.Element value = CacheFactory.getInstance().getCache().get(key);
+            if (value != null) {
+                return (Collection<Object>) (value.getObjectValue());
+            }
+        }
+        return null;
     }
-
+    
     /**
-     * @see de.intevation.gnv.transition.Transition#setDescibeData(java.util.Collection)
+     * @see de.intevation.gnv.transition.Transition#getDescibeData()
      */
-    public void setDescibeData(Collection<Object> descibeData) {
-        this.descibeData = descibeData;
-
+    protected void setDescibeData(String uuid, Collection<Object> describeData) {
+        
+        if (CacheFactory.getInstance().isInitialized()) {
+            String key = uuid + DESCRIBEDATAKEY;
+            log.debug("Hash for Queryelements: " + key);
+            CacheFactory.getInstance().getCache().put(new net.sf.ehcache.Element(key, describeData));
+        }
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/NorthSouthEastWestTransition.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/NorthSouthEastWestTransition.java	Fri Oct 23 08:50:50 2009 +0000
@@ -47,8 +47,9 @@
     @Override
     public void advance(String uuid, CallMeta callMeta)
                                                        throws TransitionException {
-        if (this.descibeData == null) {
-            this.descibeData = new ArrayList<Object>();
+        Collection<Object> describeData = this.getDescibeData(uuid);
+        if (describeData == null) {
+            describeData = new ArrayList<Object>();
         }
         NamedCollection<KeyValueDescibeData> keyValueDescibeData = new NamedArrayList<KeyValueDescibeData>(
                 this.dataName, 2);
@@ -59,7 +60,7 @@
         keyValueDescibeData.add(new DefaultKeyValueDescribeData("JPOSITION",
                 RessourceFactory.getInstance().getRessource(
                         callMeta.getLanguages(), "jposition", "jposition")));
-        this.descibeData.add(keyValueDescibeData);
+        describeData.add(keyValueDescibeData);
     }
 
     @Override
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Fri Oct 23 08:50:50 2009 +0000
@@ -119,16 +119,13 @@
                     log.error(e, e);
                     throw new TransitionException(e);
                 }
-                Collection<KeyValueDescibeData> parameters = this
-                        .getParameters();
-                Collection<KeyValueDescibeData> measurements = this
-                        .getMeasurements();
-                Collection<KeyValueDescibeData> dates = this
-                .getDates();
+                Collection<KeyValueDescibeData> parameters = this.getParameters(uuid);
+                Collection<KeyValueDescibeData> measurements = this.getMeasurements(uuid);
+                Collection<KeyValueDescibeData> dates = this.getDates(uuid);
                 ChartStyle chartStyle = this
                         .creatStyle(chartWidth, chartHeight);
                 ChartLabels chartLables = new ChartLabels(this.getFisName(callMeta.getLanguages())+" "+this
-                        .getSelectedFeatureName(), this.domainLable);
+                        .getSelectedFeatureName(uuid), this.domainLable);
                 this.createChart(outputStream, parameters, measurements,dates,
                         chartStyle, chartLables, uuid);
             } else if (outputMode.equalsIgnoreCase("csv")) {
@@ -238,9 +235,9 @@
         return doc;
     }
 
-    protected String getSelectedFeatureName() {
+    protected String getSelectedFeatureName(String uuid) {
         Collection<KeyValueDescibeData> values = this
-                .getCollection(featureValuesName);
+                .getCollection(featureValuesName, uuid);
         if (values != null) {
             Iterator<KeyValueDescibeData> it = values.iterator();
             while (it.hasNext()) {
@@ -297,15 +294,15 @@
         return returnValue;
     }
 
-    protected Collection<KeyValueDescibeData> getParameters() {
-        return this.getCollection(parameterValuesName);
+    protected Collection<KeyValueDescibeData> getParameters(String uuid) {
+        return this.getCollection(parameterValuesName, uuid);
     }
 
-    protected Collection<KeyValueDescibeData> getMeasurements() {
-        return this.getCollection(measuremenValueName);
+    protected Collection<KeyValueDescibeData> getMeasurements(String uuid) {
+        return this.getCollection(measuremenValueName, uuid);
     }
-    protected Collection<KeyValueDescibeData> getDates() {
-        return this.getCollection(dateValueName);
+    protected Collection<KeyValueDescibeData> getDates(String uuid) {
+        return this.getCollection(dateValueName,uuid);
     }
 
     @Override
@@ -339,8 +336,9 @@
      * @return
      */
     protected Collection<KeyValueDescibeData> getCollection(
-                                                            String collectionName) {
-        Iterator<Object> it = this.descibeData.iterator();
+                                                            String collectionName, 
+                                                            String uuid) {
+        Iterator<Object> it = this.getDescibeData(uuid).iterator();
         while (it.hasNext()) {
 
             Object o = it.next();
--- a/gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_chart.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_chart.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="out" />
-	<art:uuid value="c06ab8cd-8be9-47cf-8af1-8eb3c00d6604" />
+	<art:uuid value="3637e455-944f-46ef-997d-8cd61d9ad2d3" />
 	<art:hash value="27021384" />
 	<art:out name="chart">
 		<art:out value="image/png" />
--- a/gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_csv.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_csv.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
     <art:type name="out" />
-    <art:uuid value="c06ab8cd-8be9-47cf-8af1-8eb3c00d6604" />
+    <art:uuid value="3637e455-944f-46ef-997d-8cd61d9ad2d3" />
     <art:hash value="27021384" />
     <art:out name="csv">
         <art:out value="text/plain" />
--- a/gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_statistics.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_statistics.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="out" />
-	<art:uuid value="c06ab8cd-8be9-47cf-8af1-8eb3c00d6604" />
+	<art:uuid value="3637e455-944f-46ef-997d-8cd61d9ad2d3" />
 	<art:hash value="27021384" />
 	<art:out name="statistics">
 		<art:out value="text/xml" />
--- a/gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_07_out_chart.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_07_out_chart.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="out" />
-	<art:uuid value="041fd0b2-5d77-49a8-b19f-5f3f553bda5d" />
+	<art:uuid value="1e9f6583-9073-4409-aac1-432ad06d7ce1" />
 	<art:hash value="31343478" />
 	<art:out name="chart">
 		<art:out value="image/png" />
--- a/gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_07_out_csv.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_07_out_csv.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="out" />
-	<art:uuid value="041fd0b2-5d77-49a8-b19f-5f3f553bda5d" />
+	<art:uuid value="1e9f6583-9073-4409-aac1-432ad06d7ce1" />
 	<art:hash value="31343478" />
 	<art:out name="csv">
 		<art:out value="text/plain" />
--- a/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_03_advance.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_03_advance.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="advance" />
-	<art:uuid value="b47ab4ca-ffa7-4e4d-8212-0769e39418a2" />
+	<art:uuid value="4319eb60-5419-4ce9-80b2-3ffac5b50146" />
 	<art:hash value="11096221" />
 	<art:target name="verticalprofile_calculate_results" />
 </art:action>
\ No newline at end of file
--- a/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="feed" />
-	<art:uuid value="b47ab4ca-ffa7-4e4d-8212-0769e39418a2" />
+	<art:uuid value="4319eb60-5419-4ce9-80b2-3ffac5b50146" />
 	<art:hash value="11096221" />
 	<art:data>
 		<art:input name="dateid" value="2008.12.09 00:00:00" />
--- a/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_chart.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_chart.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="out" />
-	<art:uuid value="b47ab4ca-ffa7-4e4d-8212-0769e39418a2" />
+	<art:uuid value="4319eb60-5419-4ce9-80b2-3ffac5b50146" />
 	<art:hash value="11096221" />
 	<art:out name="chart">
 		<art:out value="image/png" />
--- a/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_csv.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_csv.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="out" />
-    <art:uuid value="b47ab4ca-ffa7-4e4d-8212-0769e39418a2" />
+    <art:uuid value="4319eb60-5419-4ce9-80b2-3ffac5b50146" />
     <art:hash value="11096221" />
 	<art:out name="csv">
 		<art:out value="text/plain" />
--- a/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_statistics.xml	Fri Oct 23 07:37:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/verticalprofile/verticalprofile_step_04_out_statistics.xml	Fri Oct 23 08:50:50 2009 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <art:action xmlns:art="http://www.intevation.de/2009/artifacts">
 	<art:type name="out" />
-	<art:uuid value="b47ab4ca-ffa7-4e4d-8212-0769e39418a2" />
+	<art:uuid value="4319eb60-5419-4ce9-80b2-3ffac5b50146" />
 	<art:hash value="11096221" />
 	<art:out name="statistics">
 		<art:out value="text/xml" />

http://dive4elements.wald.intevation.org