changeset 117:ef157bd2fa92

LanguageSupport integrated gnv-artifacts/trunk@178 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 02 Oct 2009 14:24:47 +0000
parents 820238357bab
children 5ebc059064a6
files gnv-artifacts/Changelog gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/RessourceFactory.java gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages.properties gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages_de.properties gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages_de_DE.properties gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages_en_EN.properties 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/timeseries/TimeSeriesArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.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/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/ressource/RessourceFactoryTestCase.java gnv-artifacts/src/test/ressources/conf.xml gnv-artifacts/src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml gnv-artifacts/src/test/ressources/lang/artifactMessages.properties gnv-artifacts/src/test/ressources/lang/artifactMessages_de_DE.properties gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_02_feed.xml gnv-artifacts/src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_feed.xml
diffstat 26 files changed, 555 insertions(+), 177 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/Changelog	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/Changelog	Fri Oct 02 14:24:47 2009 +0000
@@ -1,3 +1,37 @@
+2009-10-02  Tim Englich  <tim.englich@intevation.de>
+
+    * src/test/java/de/intevation/gnv/artifacts/ressource/RessourceFactoryTestCase.java Added: 
+      TestCase for Testing the RessourceFactory
+      
+    * src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages*.properties Added, 
+      src/main/java/de/intevation/gnv/artifacts/ressource/RessourceFactory.java Added: 
+      Added Factory and Propertiesfiles for getting the localized Values
+    
+    * src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java Edited, 
+      src/main/java/de/intevation/gnv/transition/profile/horizontal/NorthSouthEastWestTransition.java Edited, 
+      src/main/java/de/intevation/gnv/transition/TransitionBase.java Edited, 
+      src/main/java/de/intevation/gnv/transition/Transition.java Edited,
+      src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java Edited,
+      src/main/java/de/intevation/gnv/transition/OutputTransition.java Edited,
+      src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java Edited,
+      src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java Edited,
+      src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java Edited, 
+      src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java Edited,  
+      src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Edited: 
+      LanguageSupport Integrated
+    
+    * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (createCallContext) Edited:
+      Extracted Method and Put CallMeta with Language German to the CallContext. Otherwise
+      TestCase will produce NPEs. 
+    * src/test/java/de/intevation/gnv/artifacts/TestCallContext.java Edited:
+      Added Real CallMeta to the Method for usage in Artifacts. Otherwise
+      TestCase will produce NPEs. 
+    * src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml Edited, 
+      src/test/ressources/timeseries_mesh/timeseries_step_02_feed.xml Edited, 
+      src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_feed.xml Edited, 
+      src/test/ressources/conf.xml Edited:
+      Changed som Identifiers for Localisation. 
+
 2009-10-02  Tim Englich  <tim.englich@intevation.de>
 
     * src/test/ressources/conf.xml Edited:
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Fri Oct 02 14:24:47 2009 +0000
@@ -24,6 +24,7 @@
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.artifacts.ArtifactNamespaceContext;
 import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.artifacts.context.GNVArtifactContext;
 import de.intevation.gnv.transition.DefaultInputData;
 import de.intevation.gnv.transition.InputData;
@@ -103,7 +104,7 @@
                         try {
                             Transition nextStep = this.transitions.get(transitionName);
                             // 2.Ergebnisse Berechnen
-                            this.current.advance(uuid);
+                            this.current.advance(uuid,context.getMeta());
                             // 3. Ergebnisse übergeben
                             nextStep.setDescibeData(this.current.getDescibeData());
                             nextStep.putInputData(this.current.getInputData(),uuid);
@@ -209,7 +210,7 @@
     }
     
     
-    protected Document createDescibeOutput(){
+    protected Document createDescibeOutput(CallMeta callMeta){
         log.debug("GNVArtifactBase.createDescibeOutput");
         Document document = XMLUtils.newDocument();
          Element rootNode = this.createRootNode(document);
@@ -218,7 +219,7 @@
         this.createCurrentState(rootNode, document);
         this.createReachableStates(rootNode, document);
         this.createModel(rootNode, document);
-        this.createUserInterface(rootNode, document);
+        this.createUserInterface(rootNode, document,callMeta);
         return document;
     }
     
@@ -284,11 +285,11 @@
         parent.appendChild(modelNode);
     }
     
-    protected void createUserInterface(Element parent, Document document){
+    protected void createUserInterface(Element parent, Document document, CallMeta callMeta){
         Element uiNode = xmlUtilities.createArtifactElement(document,"ui");
         
         if (this.current != null){
-            this.current.describe(document, uiNode);
+            this.current.describe(document, uiNode,callMeta);
         }
         
         parent.appendChild(uiNode);
@@ -364,21 +365,25 @@
 
     
     /**
-     * @see de.intevation.artifactdatabase.DefaultArtifact#out(org.w3c.dom.Document, java.io.OutputStream, de.intevation.artifacts.CallContext)
+     * @see de.intevation.artifactdatabase.DefaultArtifact#out(org.w3c.dom.Document,
+     *      java.io.OutputStream, de.intevation.artifacts.CallContext)
      */
     @Override
-    public void out(Document format, OutputStream outputStream, CallContext context)
-            throws IOException {
+    public void out(Document format, OutputStream outputStream,
+                    CallContext context) throws IOException {
         log.debug("TGNVArtifactBase.out");
         try {
-            
-            if (current != null && current instanceof OutputTransition){
-                String uuid = Config.getStringXPath(format, "action/uuid/@value");
-              ((OutputTransition)current).out(this.readOutputType(format),this.parseInputData(format, "/action/out/params/input"), outputStream,uuid);
-               //context.afterCall(CallContext.STORE); // TODO: FIXME Schmutzige Lösung: Besser einen weiteren Transitionsschritt zwischenschalten.
+
+            if (current != null && current instanceof OutputTransition) {
+                String uuid = Config.getStringXPath(format,
+                        "action/uuid/@value");
+                ((OutputTransition) current)
+                        .out(this.readOutputType(format), this.parseInputData(
+                                format, "/action/out/params/input"),
+                                outputStream, uuid, context.getMeta());
             }
         } catch (TransitionException e) {
-            log.error(e,e);
+            log.error(e, e);
             throw new IOException(e.getMessage());
         }
     }
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java	Fri Oct 02 14:24:47 2009 +0000
@@ -9,6 +9,7 @@
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.log4j.Logger;
@@ -23,10 +24,12 @@
 import de.intevation.artifacts.Artifact;
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
 import de.intevation.gnv.artifacts.context.GNVArtifactContext;
 import de.intevation.gnv.artifacts.fis.product.DefaultProduct;
 import de.intevation.gnv.artifacts.fis.product.Product;
+import de.intevation.gnv.artifacts.ressource.RessourceFactory;
 import de.intevation.gnv.transition.DefaultInputData;
 import de.intevation.gnv.transition.InputData;
 import de.intevation.gnv.utils.ArtifactFactoryUtilities;
@@ -168,13 +171,13 @@
     @Override
     public Document describe(CallContext context) {
         if (this.productArtifact == null){
-            return this.createDescibeOutput();
+            return this.createDescibeOutput(context.getMeta());
         }else{
             Document document = this.productArtifact.describe(context);
             document = new ArtifactXMLUtilities().reInitDocument(document);
             Node staticNode = Config.getNodeXPath(document, "/result/ui/static");
             if (staticNode != null){
-                Node staticUI = this.createSelectBox(document);
+                Node staticUI = this.createSelectBox(document, context.getMeta());
                 staticNode.insertBefore(staticUI, staticNode.getFirstChild());
             }
             return document;
@@ -268,7 +271,7 @@
         return Config.getNodeXPath(document,xpathQuery);
     }
     
-    protected Document createDescibeOutput(){
+    protected Document createDescibeOutput(CallMeta callMeta){
         log.debug("GNVArtifactBase.createDescibeOutput");
         Document document = XMLUtils.newDocument();
         Element rootNode = this.createRootNode(document);
@@ -277,7 +280,7 @@
         this.createCurrentState(rootNode, document);
         this.createReachableStates(rootNode, document);
         this.createModel(rootNode, document);
-        this.createUserInterface(rootNode, document);
+        this.createUserInterface(rootNode, document, callMeta);
         
         return document;
     }
@@ -337,13 +340,13 @@
         parent.appendChild(modelNode);
     }
     
-    protected void createUserInterface(Element parent, Document document){
+    protected void createUserInterface(Element parent, Document document, CallMeta callMeta){
         Element uiNode = xmlUtilities.createArtifactElement(document,"ui");
         ArtifactXMLUtilities xmlUtilities = new ArtifactXMLUtilities();
         Node dynamic = xmlUtilities.createArtifactElement(document, "dynamic"); 
         uiNode.appendChild(dynamic);
         if (this.products != null && !this.products.isEmpty()){
-            Element selectNode = createSelectBox(document);
+            Element selectNode = createSelectBox(document,callMeta);
  
             dynamic.appendChild(selectNode);
         }
@@ -355,7 +358,8 @@
      * @param xmlUtilities
      * @return
      */
-    private Element createSelectBox(Document document) {
+    private Element createSelectBox(Document document, CallMeta callMeta) {
+        Locale locale = callMeta.getPreferredLocale(RessourceFactory.getInstance().getSupportedLocales());
         ArtifactXMLUtilities xmlUtilities = new ArtifactXMLUtilities();
         String selectboxName = "product";
         Iterator<Product> it = this.products.values().iterator();
@@ -364,7 +368,7 @@
         
         
         Element lableNode = xmlUtilities.createXFormElement(document, "label");
-        lableNode.setTextContent(selectboxName);
+        lableNode.setTextContent(RessourceFactory.getInstance().getRessource(locale, selectboxName, selectboxName));
         selectNode.appendChild(lableNode);
         Element choiceNode = xmlUtilities.createXFormElement(document, "choices");
         selectNode.appendChild(choiceNode);
@@ -377,7 +381,7 @@
             }
             
             Element choiceLableNode = xmlUtilities.createXFormElement(document, "label");
-            choiceLableNode.setTextContent(p.getName());
+            choiceLableNode.setTextContent(RessourceFactory.getInstance().getRessource(locale, p.getName(), p.getName()));
             itemNode.appendChild(choiceLableNode);
             
             Element choicValueNode = xmlUtilities.createXFormElement(document, "value");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/RessourceFactory.java	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,78 @@
+/**
+ *
+ */
+package de.intevation.gnv.artifacts.ressource;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class RessourceFactory {
+
+    /**
+     * the logger, used to log exceptions and additonaly information
+     */
+    private static Logger log = Logger.getLogger(RessourceFactory.class);
+    
+    /**
+     * The singleton Instance of this Factory.
+     */
+    private static RessourceFactory instance = null;
+
+    private static String RESSOURCE_BASE_ID = "artifact.ressource.dir";
+    
+    private static String ressourceName = "artifactMessages";
+    
+    private String ressourceDir = null;
+    
+    private Locale[] supportedLocales = null;
+    /**
+     * Basic-Constructor of this Class
+     */
+    private RessourceFactory() {
+        super();
+        ressourceDir = System.getProperty(RESSOURCE_BASE_ID);
+        if (ressourceDir == null){
+            ressourceDir = "de/intevation/gnv/artifacts/ressource";
+        }
+        supportedLocales =  new Locale[1];
+        supportedLocales[0] = Locale.GERMAN;
+    }
+
+    /**
+     * This Method provides an singleton Instance of this Class.
+     * @return an singleton Instance of this Class
+     */
+    public static RessourceFactory getInstance(){
+        if (instance == null){
+            instance = new RessourceFactory();
+        }
+        return instance;
+    }
+    
+    /**
+     * Deliveres the translated Value for an Key to an given Language
+     * @param locale The choosen locale
+     * @param key the key
+     * @param defaultValue the Value that should be returned.
+     * @return the translated Value
+     */
+    public String getRessource(Locale locale, String key, String defaultValue){
+        ResourceBundle rb = ResourceBundle.getBundle(ressourceDir+"/"+ressourceName, locale);
+        try {
+            return rb.getString(key);
+        } catch (Exception e) {
+            log.warn(e.getMessage());
+            return defaultValue;
+        }
+    }
+    
+    public Locale[] getSupportedLocales(){
+      return supportedLocales;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages.properties	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,26 @@
+fis_marnet = Marnet
+fis_imis = IMIS
+fis_staun = STAUN
+fis_modeldata = Modeldata
+fis_delphin = Delphin
+fis_thermosalinograph = Thermosalinograph
+fis_chemusurvey = Chemusurvey
+meshid= Mesh
+product= Product
+timeSeries= Timeseries
+verticalProfile = Verticalprofile
+horizontalProfile = Horizontalprofile
+featureid = Object
+mesh_coordinate = Coordinate Value (x y)
+mesh_point = Meshpoint
+measurementid = Measurement depth
+parameterid = Parameter
+minvalue = Minvalue
+maxvalue = Maxvalue
+dateid = Measurement date
+vehicleid = Ship
+cruiseid = Cruise
+trackid = Track
+surveyid = Survey Info
+axisid = Axis
+depthid = Depth
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages_de.properties	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,27 @@
+fis_marnet = Marnet
+fis_imis = IMIS
+fis_staun = STAUN
+fis_modeldata = Modeldaten
+fis_delphin = Delphin
+fis_thermosalinograph = Thermosalinograph
+fis_chemusurvey = Chemusurvey
+
+product= Produkt
+timeSeries= Zeitserie
+verticalProfile = Vertikalprofil
+horizontalProfile = Horizontalprofil
+featureid = Station
+meshid= Netz
+mesh_coordinate = Koordinaten Wert (x y)
+mesh_point = Messpunkt
+measurementid = Messtiefe
+parameterid = Parameter
+minvalue = Minimalwert
+maxvalue = Maximalwert
+dateid = Messdatum
+vehicleid = Schiff
+cruiseid = Reise
+trackid = Track
+surveyid = Messinformation
+axisid = Achse
+depthid = Tiefe
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages_de_DE.properties	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,27 @@
+fis_marnet = Marnet
+fis_imis = IMIS
+fis_staun = STAUN
+fis_modeldata = Modeldaten
+fis_delphin = Delphin
+fis_thermosalinograph = Thermosalinograph
+fis_chemusurvey = Chemusurvey
+
+product= Produkt
+timeSeries= Zeitserie
+verticalProfile = Vertikalprofil
+horizontalProfile = Horizontalprofil
+featureid = Station
+meshid= Netz
+mesh_coordinate = Koordinaten Wert (x y)
+mesh_point = Messpunkt
+measurementid = Messtiefe
+parameterid = Parameter
+minvalue = Minimalwert
+maxvalue = Maximalwert
+dateid = Messdatum
+vehicleid = Schiff
+cruiseid = Reise
+trackid = Track
+surveyid = Messinformation
+axisid = Achse
+depthid = Tiefe
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/ressource/artifactMessages_en_EN.properties	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,26 @@
+fis_marnet = Marnet
+fis_imis = IMIS
+fis_staun = STAUN
+fis_modeldata = Modeldata
+fis_delphin = Delphin
+fis_thermosalinograph = Thermosalinograph
+fis_chemusurvey = Chemusurvey
+meshid= Mesh
+product= Product
+timeSeries= Timeseries
+verticalProfile = Verticalprofile
+horizontalProfile = Horizontalprofile
+featureid = Object
+mesh_coordinate = Coordinate Value (x y)
+mesh_point = Meshpoint
+measurementid = Measurement depth
+parameterid = Parameter
+minvalue = Minvalue
+maxvalue = Maxvalue
+dateid = Measurement date
+vehicleid = Ship
+cruiseid = Cruise
+trackid = Track
+surveyid = Survey Info
+axisid = Axis
+depthid = Depth
\ No newline at end of file
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/horizontal/HorizontalProfileArtifact.java	Fri Oct 02 14:24:47 2009 +0000
@@ -40,7 +40,7 @@
     @Override
     public Document describe(CallContext context) {
         log.debug("HorizontalProfileArtifact.describe");
-        return super.createDescibeOutput();
+        return super.createDescibeOutput(context.getMeta());
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileArtifact.java	Fri Oct 02 14:24:47 2009 +0000
@@ -41,7 +41,7 @@
     @Override
     public Document describe(CallContext context) {
         log.debug("VerticalProfileArtifact.describe");
-        return super.createDescibeOutput();
+        return super.createDescibeOutput(context.getMeta());
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java	Fri Oct 02 14:24:47 2009 +0000
@@ -41,7 +41,7 @@
     @Override
     public Document describe(CallContext context) {
         log.debug("TimeSeriesArtifact.describe");
-        return super.createDescibeOutput();
+        return super.createDescibeOutput(context.getMeta());
     }
 
     /**
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransition.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransition.java	Fri Oct 02 14:24:47 2009 +0000
@@ -6,24 +6,30 @@
 import java.io.OutputStream;
 import java.util.Collection;
 
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.transition.exception.TransitionException;
 
 /**
  * @author Tim Englich <tim.englich@intevation.de>
- *
+ * 
  */
 public interface OutputTransition extends Transition {
 
     /**
      * Returns the Rendered Result of an Transition.
-     * @param outputMode The Mode that should be produces (Chart, Map, ...)
+     * 
+     * @param outputMode
+     *            The Mode that should be produces (Chart, Map, ...)
      * @return The Bytecode of the Result
      * @throws TransitionException
      */
-    public void out( String outputMode, Collection<InputData> inputData, OutputStream outputStream, String uuid) throws TransitionException;
-    
+    public void out(String outputMode, Collection<InputData> inputData,
+                    OutputStream outputStream, String uuid, CallMeta callMeta)
+                   throws TransitionException;
+
     /**
      * Delivers the provided OutputModes of an Transition
+     * 
      * @return the provided OutputModes of an Transition
      */
     public Collection<OutputMode> getOutputModes();
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java	Fri Oct 02 14:24:47 2009 +0000
@@ -14,6 +14,7 @@
 import org.w3c.dom.NodeList;
 
 import de.intevation.artifactdatabase.Config;
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.artifacts.cache.CacheFactory;
 import de.intevation.gnv.geobackend.base.Result;
 import de.intevation.gnv.transition.exception.TransitionException;
@@ -108,10 +109,10 @@
      * @see de.intevation.gnv.transition.TransitionBase#advance()
      */
     @Override
-    public void advance(String uuid) throws TransitionException {
+    public void advance(String uuid, CallMeta callMeta) throws TransitionException {
         log.debug("OutputTransitionBase.advance");
         if (this.getChartResult(uuid) == null){
-            super.advance(uuid);
+            super.advance(uuid, callMeta);
         }
     }
 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java	Fri Oct 02 14:24:47 2009 +0000
@@ -9,6 +9,7 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.transition.exception.TransitionException;
 
 /**
@@ -29,7 +30,7 @@
     
     public boolean validate();
     
-    public void describe(Document document, Node rootNode);
+    public void describe(Document document, Node rootNode, CallMeta callMeta);
     
     public void setParent(Transition transition);
     
@@ -41,7 +42,7 @@
     
     public Collection<InputData> getInputData() throws TransitionException;
     
-    public void advance(String uuid) throws TransitionException;
+    public void advance(String uuid, CallMeta callMeta) throws TransitionException;
     
     
     public Collection<Object> getDescibeData();
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Fri Oct 02 14:24:47 2009 +0000
@@ -11,6 +11,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -21,7 +22,9 @@
 import org.w3c.dom.NodeList;
 
 import de.intevation.artifactdatabase.Config;
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.artifacts.GNVArtifactBase;
+import de.intevation.gnv.artifacts.ressource.RessourceFactory;
 import de.intevation.gnv.geobackend.base.Result;
 import de.intevation.gnv.geobackend.base.query.QueryExecutor;
 import de.intevation.gnv.geobackend.base.query.QueryExecutorFactory;
@@ -291,9 +294,9 @@
     }
 
     /**
-     * @see de.intevation.gnv.transition.Transition#advance()
+     * @see de.intevation.gnv.transition.Transition#advance(java.lang.String, de.intevation.artifacts.CallMeta)
      */
-    public void advance(String uuid) throws TransitionException {
+    public void advance(String uuid, CallMeta callMeta) throws TransitionException {
         log.debug("TransitionBase.advance");
         try {
             List<String> list = new ArrayList<String>();
@@ -386,10 +389,11 @@
     }
     
     /**
-     * @see de.intevation.gnv.transition.Transition#describe(org.w3c.dom.Document, org.w3c.dom.Node)
+     * @see de.intevation.gnv.transition.Transition#describe(org.w3c.dom.Document, org.w3c.dom.Node, de.intevation.artifacts.CallMeta)
      */
-    public void describe(Document document, Node rootNode) {
+    public void describe(Document document, Node rootNode, CallMeta callMeta) {
         
+        Locale locale = callMeta.getPreferredLocale(RessourceFactory.getInstance().getSupportedLocales());
         if(this.descibeData != null){
             ArtifactXMLUtilities xmlutilities = new ArtifactXMLUtilities();
             Iterator<Object> it = this.descibeData.iterator();
@@ -417,7 +421,7 @@
                         selectNode.setAttribute("ref", name);
                         
                         Element lableNode = xmlutilities.createXFormElement(document, "label");
-                        lableNode.setTextContent(name);
+                        lableNode.setTextContent(RessourceFactory.getInstance().getRessource(locale, name, name));
                         Element choiceNode = xmlutilities.createXFormElement(document, "choices");
                         
                         Collection<KeyValueDescibeData> values = (Collection<KeyValueDescibeData>)o;
@@ -466,7 +470,7 @@
                         Element inputMinNode = xmlutilities.createXFormElement(document, "input");
                         inputMinNode.setAttribute("ref", "minvalue");
                         Element inputMinLableNode = xmlutilities.createXFormElement(document, "label");
-                        inputMinLableNode.setTextContent("minvalue");
+                        inputMinLableNode.setTextContent(RessourceFactory.getInstance().getRessource(locale, "minvalue", "minvalue"));
                         inputMinNode.appendChild(inputMinLableNode);
                         
                         Element inputMinValueNode = xmlutilities.createXFormElement(document, "value");
@@ -476,7 +480,7 @@
                         Element inputMaxNode = xmlutilities.createXFormElement(document, "input");
                         inputMaxNode.setAttribute("ref", "maxvalue");
                         Element inputMaxLableNode = xmlutilities.createXFormElement(document, "label");
-                        inputMaxLableNode.setTextContent("maxvalue");
+                        inputMaxLableNode.setTextContent(RessourceFactory.getInstance().getRessource(locale, "maxvalue", "maxvalue"));
                         inputMaxNode.appendChild(inputMaxLableNode);
                         
                         Element inputMaxValueNode = xmlutilities.createXFormElement(document, "value");
@@ -499,7 +503,7 @@
                         inputNode.setAttribute("ref", svdb.getName());
                         
                         Element inputLableNode = xmlutilities.createXFormElement(document, "label");
-                        inputLableNode.setTextContent(svdb.getName());
+                        inputLableNode.setTextContent(RessourceFactory.getInstance().getRessource(locale, svdb.getName(), svdb.getName()));
                         inputNode.appendChild(inputLableNode);
                         
                         Element inputValueNode = xmlutilities.createXFormElement(document, "value");
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/NorthSouthEastWestTransition.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/profile/horizontal/NorthSouthEastWestTransition.java	Fri Oct 02 14:24:47 2009 +0000
@@ -6,6 +6,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.geobackend.base.Result;
 import de.intevation.gnv.transition.TransitionBase;
 import de.intevation.gnv.transition.describedata.DefaultKeyValueDescribeData;
@@ -37,12 +38,12 @@
     public boolean validate() {
         return true;
     }
-
-    
     
-    
+    /**
+     * @see de.intevation.gnv.transition.TransitionBase#advance(java.lang.String, de.intevation.artifacts.CallMeta)
+     */
     @Override
-    public void advance(String uuid) throws TransitionException {
+    public void advance(String uuid,CallMeta callMeta) throws TransitionException {
         this.purifyResult(null, uuid);
     }
 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java	Fri Oct 02 14:24:47 2009 +0000
@@ -26,6 +26,7 @@
 
 import au.com.bytecode.opencsv.CSVWriter;
 import de.intevation.artifactdatabase.XMLUtils;
+import de.intevation.artifacts.CallMeta;
 import de.intevation.gnv.chart.ChartFactory;
 import de.intevation.gnv.chart.ChartLabels;
 import de.intevation.gnv.chart.ChartStyle;
@@ -44,22 +45,23 @@
 
 /**
  * @author Tim Englich <tim.englich@intevation.de>
- *
+ * 
  */
-public class TimeSeriesOutputTransition extends OutputTransitionBase{
+public class TimeSeriesOutputTransition extends OutputTransitionBase {
 
     /**
      * The UID of this Class
      */
     private static final long serialVersionUID = 4178407570503098858L;
-    
+
     /**
      * the logger, used to log exceptions and additonaly information
      */
-    private static Logger log = Logger.getLogger(TimeSeriesOutputTransition.class);
-    
-    protected String domainLable = "Zeit [UTC]"; 
-    
+    private static Logger log = Logger
+            .getLogger(TimeSeriesOutputTransition.class);
+
+    protected String domainLable = "Zeit [UTC]";
+
     /**
      * Constructor
      */
@@ -74,47 +76,61 @@
         return true;
     }
 
-   /**
-    * @see de.intevation.gnv.transition.OutputTransition#out(java.lang.String, java.util.Collection, java.io.OutputStream)
-    */
-    public void out(String outputMode, Collection<InputData> inputData, OutputStream outputStream, String uuid) throws TransitionException {
+    /**
+     * @see de.intevation.gnv.transition.OutputTransition#out(java.lang.String,
+     *      java.util.Collection, java.io.OutputStream, java.lang.String,
+     *      de.intevation.artifacts.CallMeta)
+     */
+    public void out(String outputMode, Collection<InputData> inputData,
+                    OutputStream outputStream, String uuid, CallMeta callMeta)
+                                                                              throws TransitionException {
         log.debug("TimeSeriesOutputTransition.out");
         try {
-       
-            this.advance(uuid);
-            Collection<Result> chartResult = this.getChartResult(uuid); 
-            if (outputMode.equalsIgnoreCase("chart")){
+
+            this.advance(uuid, callMeta);
+            Collection<Result> chartResult = this.getChartResult(uuid);
+            if (outputMode.equalsIgnoreCase("chart")) {
                 log.debug("Chart will be generated.");
                 int chartWidth = 600;
                 int chartHeight = 400;
                 try {
-                    if (inputData != null){
+                    if (inputData != null) {
                         Iterator<InputData> it = inputData.iterator();
-                        while (it.hasNext()){
+                        while (it.hasNext()) {
                             InputData ip = it.next();
-                            if (ip.getName().equalsIgnoreCase("width")){
+                            if (ip.getName().equalsIgnoreCase("width")) {
                                 chartWidth = Integer.parseInt(ip.getValue());
-                            }else if (ip.getName().equalsIgnoreCase("height")){
+                            } else if (ip.getName().equalsIgnoreCase("height")) {
                                 chartHeight = Integer.parseInt(ip.getValue());
                             }
                         }
                     }
                 } catch (NumberFormatException e) {
-                    log.error(e,e);
+                    log.error(e, e);
                     throw new TransitionException(e);
                 }
-                Collection<KeyValueDescibeData> parameters = this.getParameters();
-                Collection<KeyValueDescibeData> measurements = this.getMeasurements();
-                ChartStyle chartStyle = this.creatStyle(chartWidth,chartHeight);
-                ChartLabels chartLables = new ChartLabels(this.getSelectedFeatureName(),this.domainLable);
+                Collection<KeyValueDescibeData> parameters = this
+                        .getParameters();
+                Collection<KeyValueDescibeData> measurements = this
+                        .getMeasurements();
+                ChartStyle chartStyle = this
+                        .creatStyle(chartWidth, chartHeight);
+                ChartLabels chartLables = new ChartLabels(this
+                        .getSelectedFeatureName(), this.domainLable);
                 this.createChart(outputStream, parameters, measurements,
-                        chartStyle, chartLables,uuid);
-            }else if (outputMode.equalsIgnoreCase("csv")){
+                        chartStyle, chartLables, uuid);
+            } else if (outputMode.equalsIgnoreCase("csv")) {
                 log.debug("CSV-File will be generated.");
-                if(chartResult != null){
-                    CSVWriter writer = new CSVWriter(new OutputStreamWriter(outputStream,"ISO-8859-1"), ','); // USE THIS ENCODING BECAUSE OF PROBLEMS WITH EXCEL AND UTF-8
-                    Iterator<Result>it = chartResult.iterator();
-                    while (it.hasNext()){
+                if (chartResult != null) {
+                    CSVWriter writer = new CSVWriter(new OutputStreamWriter(
+                            outputStream, "ISO-8859-1"), ','); // USE THIS
+                                                               // ENCODING
+                                                               // BECAUSE OF
+                                                               // PROBLEMS WITH
+                                                               // EXCEL AND
+                                                               // UTF-8
+                    Iterator<Result> it = chartResult.iterator();
+                    while (it.hasNext()) {
                         Result result = it.next();
                         int i = 0;
                         String[] entries = new String[5];
@@ -126,25 +142,27 @@
                         writer.writeNext(entries);
                     }
                     writer.close();
-                }else{
+                } else {
                     log.error("No Data given for generation an CSV-File.");
-                    throw new TransitionException("No Data given for generation an CSV-File.");
+                    throw new TransitionException(
+                            "No Data given for generation an CSV-File.");
                 }
-            }else if (outputMode.equalsIgnoreCase("statistics")){
+            } else if (outputMode.equalsIgnoreCase("statistics")) {
                 log.debug("Statistics will be generated.");
                 Statistics s = getStatisticsGenerator();
-                Collection<Statistic> statistics = s.calculateStatistics(chartResult);
+                Collection<Statistic> statistics = s
+                        .calculateStatistics(chartResult);
                 Document doc = this.writeStatistics2XML(statistics);
                 this.writeDocument2OutputStream(doc, outputStream);
             }
         } catch (IOException e) {
-            log.error(e,e);
+            log.error(e, e);
             throw new TransitionException(e);
         } catch (TechnicalChartException e) {
-            log.error(e,e);
+            log.error(e, e);
             throw new TransitionException(e);
-        }catch (StatisticsException e) {
-            log.error(e,e);
+        } catch (StatisticsException e) {
+            log.error(e, e);
             throw new TransitionException(e);
         }
     }
@@ -156,58 +174,62 @@
         Statistics s = new TimeseriesStatistics();
         return s;
     }
-    
-    protected void writeDocument2OutputStream(Document document, OutputStream os){
-        
+
+    protected void writeDocument2OutputStream(Document document, OutputStream os) {
+
         try {
-            TransformerFactory transformerFactory = TransformerFactory.newInstance();
+            TransformerFactory transformerFactory = TransformerFactory
+                    .newInstance();
             Transformer transformer = transformerFactory.newTransformer();
             DOMSource source = new DOMSource(document);
-            StreamResult result =  new StreamResult(os);
+            StreamResult result = new StreamResult(os);
             transformer.transform(source, result);
         } catch (TransformerConfigurationException e) {
-            log.error(e,e);
+            log.error(e, e);
         } catch (TransformerFactoryConfigurationError e) {
-            log.error(e,e);
-        }catch (TransformerException e) {
-            log.error(e,e);
+            log.error(e, e);
+        } catch (TransformerException e) {
+            log.error(e, e);
         }
     }
-    
-    protected Document writeStatistics2XML(Collection<Statistic> statistic){
+
+    protected Document writeStatistics2XML(Collection<Statistic> statistic) {
         ArtifactXMLUtilities xmlUtilities = new ArtifactXMLUtilities();
         Document doc = XMLUtils.newDocument();
-        if (statistic != null){
-            Node statisticResults = xmlUtilities.createArtifactElement(doc, "statistic-values");
+        if (statistic != null) {
+            Node statisticResults = xmlUtilities.createArtifactElement(doc,
+                    "statistic-values");
             doc.appendChild(statisticResults);
             Iterator<Statistic> it = statistic.iterator();
-            while (it.hasNext()){
+            while (it.hasNext()) {
                 Statistic s = it.next();
-                Element result = xmlUtilities.createArtifactElement(doc, "statistic");
+                Element result = xmlUtilities.createArtifactElement(doc,
+                        "statistic");
                 result.setAttribute("name", s.getKey());
                 result.setAttribute("value", s.getStringValue());
                 statisticResults.appendChild(result);
             }
-        
+
         }
         return doc;
     }
 
-    
-    protected String getSelectedFeatureName(){
+    protected String getSelectedFeatureName() {
         String collectionName = "featureid"; // TODO: Konfigurierbar machen
-        Collection<KeyValueDescibeData> values =  this.getCollection(collectionName);
-        if (values != null){
+        Collection<KeyValueDescibeData> values = this
+                .getCollection(collectionName);
+        if (values != null) {
             Iterator<KeyValueDescibeData> it = values.iterator();
-            while(it.hasNext()){
+            while (it.hasNext()) {
                 KeyValueDescibeData data = it.next();
-                if (data.isSelected()){
+                if (data.isSelected()) {
                     return data.getValue();
                 }
             }
         }
         return null;
     }
+
     /**
      * @param outputStream
      * @param parameters
@@ -219,29 +241,32 @@
      * @throws TechnicalChartException
      */
     protected void createChart(OutputStream outputStream,
-            Collection<KeyValueDescibeData> parameters,
-            Collection<KeyValueDescibeData> measurements,
-            ChartStyle chartStyle, ChartLabels chartLables, String uuid) throws IOException,
-            TechnicalChartException {
+                               Collection<KeyValueDescibeData> parameters,
+                               Collection<KeyValueDescibeData> measurements,
+                               ChartStyle chartStyle, ChartLabels chartLables,
+                               String uuid) throws IOException,
+                                           TechnicalChartException {
         ChartFactory chartFactory = new ChartFactory();
         chartFactory.createSimpleTimeSeriesChart(chartLables, chartStyle,
-                                                 parameters, measurements, 
-                                                 outputStream, this.getChartResult(uuid));
+                parameters, measurements, outputStream, this
+                        .getChartResult(uuid));
     }
-    
-    protected ChartStyle creatStyle(int witdh, int height){
+
+    protected ChartStyle creatStyle(int witdh, int height) {
         // TODO Konfigurierbar machen
-        de.intevation.gnv.chart.Insets lInsets = new de.intevation.gnv.chart.Insets(5d, 5d, 5d, 5d);
+        de.intevation.gnv.chart.Insets lInsets = new de.intevation.gnv.chart.Insets(
+                5d, 5d, 5d, 5d);
         Dimension lChartSize = new Dimension(witdh, height);
-        return new ChartStyle(Color.white, new Color(230, 230, 230), Color.white, Color.white, true, true, lInsets, lChartSize);
+        return new ChartStyle(Color.white, new Color(230, 230, 230),
+                Color.white, Color.white, true, true, lInsets, lChartSize);
     }
-    
-    protected Collection<KeyValueDescibeData> getParameters(){
+
+    protected Collection<KeyValueDescibeData> getParameters() {
         String collectionName = "parameterid"; // TODO: Konfigurierbar machen
         return this.getCollection(collectionName);
     }
-    
-    protected Collection<KeyValueDescibeData> getMeasurements(){
+
+    protected Collection<KeyValueDescibeData> getMeasurements() {
         String collectionName = "measurementid"; // TODO: Konfigurierbar machen
         return this.getCollection(collectionName);
     }
@@ -251,18 +276,18 @@
      * @return
      */
     protected Collection<KeyValueDescibeData> getCollection(
-            String collectionName) {
+                                                            String collectionName) {
         Iterator<Object> it = this.descibeData.iterator();
-        while (it.hasNext()){
-           
-           Object o = it.next();
-           
-           if (o instanceof NamedCollection<?>){
-               NamedCollection<KeyValueDescibeData> nc = (NamedCollection<KeyValueDescibeData>)o;
-               if (nc.getName().equals(collectionName)){
-                   return nc;
-               }
-           }
+        while (it.hasNext()) {
+
+            Object o = it.next();
+
+            if (o instanceof NamedCollection<?>) {
+                NamedCollection<KeyValueDescibeData> nc = (NamedCollection<KeyValueDescibeData>) o;
+                if (nc.getName().equals(collectionName)) {
+                    return nc;
+                }
+            }
         }
         return null;
     }
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Fri Oct 02 14:24:47 2009 +0000
@@ -21,10 +21,14 @@
 import org.xml.sax.SAXException;
 
 import de.intevation.artifactdatabase.Config;
+import de.intevation.artifactdatabase.DefaultCallMeta;
+import de.intevation.artifactdatabase.DefaultPreferredLocale;
 import de.intevation.artifactdatabase.FactoryBootstrap;
 import de.intevation.artifacts.Artifact;
 import de.intevation.artifacts.ArtifactFactory;
 import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.CallMeta;
+import de.intevation.artifacts.PreferredLocale;
 import de.intevation.gnv.artifacts.context.GNVArtifactContext;
 import de.intevation.gnv.utils.ArtifactXMLUtilities;
 
@@ -79,8 +83,7 @@
             assertNotNull(artifact);
             log.debug("TimeSeries-Artifact is available");
             
-            
-            CallContext cc = new TestCallContext(bootstrap.getContext());
+            CallContext cc = createCallContext();
             
             // Erster Schritt
             
@@ -105,7 +108,7 @@
             
             Document outputData;
             // Fünfter Schritt
-            outputData = artifact.describe(null);
+            outputData = artifact.describe(cc);
             FileOutputStream fos = null;
             try{
                 fos = new FileOutputStream("src/test/results/timeseriesdiagramm"+System.currentTimeMillis()+".png");
@@ -129,18 +132,29 @@
     }
 
     /**
+     * @return
+     */
+    private CallContext createCallContext() {
+        CallMeta callMeta = new DefaultCallMeta(new PreferredLocale[]{new DefaultPreferredLocale("de_DE", 1.0f)});
+        CallContext cc = new TestCallContext(bootstrap.getContext(),callMeta);
+        return cc;
+    }
+
+    /**
      * @param artifact
      * @param cc
      * @throws Exception
      */
     private void doNextStep(Artifact artifact, CallContext cc, String feedDocument, String advanceDocument) throws Exception {
-        Document outputData = artifact.describe(null);
+        Document outputData = artifact.describe(cc);
         this.writeDocument2Log(outputData);
         outputData = artifact.feed(this.readDocument(feedDocument), cc);
         this.check4ExceptionReport(outputData);
         outputData = artifact.advance(this.readDocument(advanceDocument), cc);
         this.writeDocument2Log(outputData);
         this.check4ExceptionReport(outputData);
+        
+        
     }
     
     public void testTimeSeriesMeshArtifact(){
@@ -155,7 +169,7 @@
             log.debug("TimeSeriesMesh-Artifact is available");
             
             
-            CallContext cc = new TestCallContext(bootstrap.getContext());
+            CallContext cc = createCallContext();
             
             // Erster Schritt
             this.doNextStep(artifact, cc,
@@ -189,7 +203,7 @@
                     "src/test/ressources/timeseries_mesh/timeseries_step_06_advance.xml");
             
             // Siebter Schritt
-            Document outputData = artifact.describe(null);
+            Document outputData = artifact.describe(cc);
             FileOutputStream fos = null;
             FileOutputStream fos2 = null;
             FileOutputStream fos3 = null;
@@ -234,7 +248,7 @@
             log.debug("VerticalProfile-Artifact is available");
             
             
-            CallContext cc = new TestCallContext(bootstrap.getContext());
+            CallContext cc = createCallContext();
             
             // Erster Schritt
             this.doNextStep(artifact, cc,
@@ -255,7 +269,7 @@
             
             
             // Vierter Schritt
-            Document outputData = artifact.describe(null);
+            Document outputData = artifact.describe(cc);
             FileOutputStream fos = null;
             FileOutputStream fos2 = null;
             FileOutputStream fos3 = null;
@@ -300,7 +314,7 @@
             log.debug("VerticalProfile-Artifact is available");
             
             
-            CallContext cc = new TestCallContext(bootstrap.getContext());
+            CallContext cc = createCallContext();
             
             // Erster Schritt
             this.doNextStep(artifact, cc,
@@ -328,7 +342,7 @@
                     "src/test/ressources/verticalprofile_mesh/verticalprofile_step_05_advance.xml");
             
             // Sechster Schritt
-            Document outputData = artifact.describe(null);
+            Document outputData = artifact.describe(cc);
             FileOutputStream fos = null;
             FileOutputStream fos2 = null;
             FileOutputStream fos3 = null;
@@ -375,7 +389,7 @@
             log.debug("VerticalProfile-Artifact is available");
             
             
-            CallContext cc = new TestCallContext(bootstrap.getContext());
+            CallContext cc = createCallContext();
             
             // Erster Schritt
             this.doNextStep(artifact, cc,
@@ -393,7 +407,7 @@
                     "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_advance.xml");
             
             // Vierter Schritt
-            Document outputData = artifact.describe(null);
+            Document outputData = artifact.describe(cc);
             FileOutputStream fos = null;
             FileOutputStream fos2 = null;
             FileOutputStream fos3 = null;
@@ -438,7 +452,7 @@
             log.debug("VerticalProfile-Artifact is available");
             
             
-            CallContext cc = new TestCallContext(bootstrap.getContext());
+            CallContext cc = createCallContext();
             
             // Erster Schritt
             this.doNextStep(artifact, cc,
@@ -469,7 +483,7 @@
                     "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_05_advance.xml");
             
             
-            Document outputData = artifact.describe(null);
+            Document outputData = artifact.describe(cc);
             FileOutputStream fos = null;
             FileOutputStream fos2 = null;
             FileOutputStream fos3 = null;
@@ -514,7 +528,7 @@
             log.debug("VerticalProfile-Artifact is available");
             
             
-            CallContext cc = new TestCallContext(bootstrap.getContext());
+            CallContext cc = createCallContext();
             
              
             
@@ -550,7 +564,7 @@
                     "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_feed.xml",
                     "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_advance.xml");
             
-            Document outputData = artifact.describe(null);
+            Document outputData = artifact.describe(cc);
             FileOutputStream fos = null;
             FileOutputStream fos2 = null;
             FileOutputStream fos3 = null;
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java	Fri Oct 02 14:24:47 2009 +0000
@@ -13,11 +13,13 @@
 public class TestCallContext implements CallContext {
 
     private Object globalContext = null;
+    private CallMeta callMeta = null;
     /**
      * Constructor
      */
-    public TestCallContext(Object globalContext) {
+    public TestCallContext(Object globalContext, CallMeta callMeta) {
         this.globalContext = globalContext;
+        this.callMeta = callMeta;
     }
 
     /**
@@ -40,8 +42,7 @@
     }
 
     public CallMeta getMeta() {
-        
-        		return null;
+        return this.callMeta;
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/ressource/RessourceFactoryTestCase.java	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,48 @@
+package de.intevation.gnv.artifacts.ressource;
+
+import java.util.Locale;
+
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.Logger;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class RessourceFactoryTestCase extends TestCase {
+    /**
+     * the logger, used to log exceptions and additonaly information
+     */
+    private static Logger log = null;
+    
+    static {
+        BasicConfigurator.configure();
+        log = Logger.getLogger(RessourceFactoryTestCase.class);
+    }
+    /**
+     * Constructor
+     * @param name
+     */
+    public RessourceFactoryTestCase(String name) {
+        super(name);
+    }
+
+    /**
+     * @see junit.framework.TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+//        System.setProperty("artifact.ressource.dir", 
+//                           "src/test/ressources/lang");
+    }
+    
+    public void testRessurceFactoryTestCase(){
+        String value = RessourceFactory.getInstance().getRessource(new Locale ("de", "DE"), "fis_modeldata", "N/N");
+        log.debug(value);
+        value = RessourceFactory.getInstance().getRessource(new Locale ("en", "EN"), "fis_modeldata", "N/N");
+        log.debug(value);
+    }
+
+}
--- a/gnv-artifacts/src/test/ressources/conf.xml	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/conf.xml	Fri Oct 02 14:24:47 2009 +0000
@@ -78,7 +78,7 @@
         </artifact>
         <artifact name="fis_modeldata">
             <products>
-                <product name= "timeSeriesMesh">
+                <product name= "timeSeries">
                     <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>
@@ -146,7 +146,7 @@
                 
                 <transition id="timeseries_mesh" description="timeseries_mesh" transition="de.intevation.gnv.transition.DefaultTransition">
                     <queryID>timeseries_mesh</queryID>
-                    <dataname>featureid</dataname>
+                    <dataname>meshid</dataname>
                     <data-multiselect>false</data-multiselect>
                     <reachableTransitions>
                            <transition>timeseries_mesh_coordinate</transition>
@@ -162,7 +162,7 @@
                            <transition>timeseries_meshpoint</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                     </inputvalues>
                 </transition>
                 
@@ -174,7 +174,7 @@
                         <transition>timeseries_meshpoint_depth</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                          <inputvalue name="mesh_coordinate" type="Point" multiselect="false" usedinquery="0"/>
                     </inputvalues>
                 </transition>
@@ -187,7 +187,7 @@
                         <transition>timeseries_meshpoint_parameter</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                          <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/>
                     </inputvalues>
                 </transition>
@@ -200,7 +200,7 @@
                         <transition>timeseries_meshpoint_interval</transition>
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="meshid" 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>
@@ -214,7 +214,7 @@
                         <transition>timeseries_meshpoint_calculate_results</transition>
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="meshid" 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"/>
@@ -224,7 +224,7 @@
                 <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="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                          <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="1"/>
                          <inputvalue name="parameterid"   type="Integer" multiselect="true" usedinquery="1"/>
                          <inputvalue name="measurementid" type="Integer" multiselect="false" usedinquery="1"/>
@@ -386,7 +386,7 @@
             <transitions>
              <transition id="verticalprofile_mesh" description="verticalprofile_mesh" transition="de.intevation.gnv.transition.DefaultTransition">
                     <queryID>verticalprofile_mesh</queryID>
-                    <dataname>featureid</dataname>
+                    <dataname>meshid</dataname>
                     <data-multiselect>false</data-multiselect>
                     <reachableTransitions>
                            <transition>verticalprofile_mesh_coordinate</transition>
@@ -396,13 +396,13 @@
                 </transition>
                 
                 <transition id="verticalprofile_mesh_coordinate" description="verticalprofile_mesh_coordinate" transition="de.intevation.gnv.transition.SingleInputTransition">
-                    <dataname>verticalprofile_mesh_coordinate</dataname>
+                    <dataname>mesh_coordinate</dataname>
                     <data-multiselect>false</data-multiselect>
                     <reachableTransitions>
                            <transition>verticalprofile_mesh_point</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                     </inputvalues>
                 </transition>
                 
@@ -414,7 +414,7 @@
                         <transition>verticalprofile_meshpoint_parameter</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                          <inputvalue name="mesh_coordinate" type="Integer" multiselect="false"/>
                     </inputvalues>
                 </transition>
@@ -427,7 +427,7 @@
                         <transition>verticalprofile_mesh_date</transition>
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                          <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
                     </inputvalues>
                 </transition>
@@ -440,7 +440,7 @@
                          <transition>verticalprofile_mesh_calculate_results</transition>
                     </reachableTransitions>
                     <inputvalues>
-                        <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                        <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
                         <inputvalue name="parameterid" type="Integer" multiselect="true"/>
                     </inputvalues>
@@ -451,7 +451,7 @@
                     <inputvalues>
                         <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/>
                         <inputvalue name="dateid" type="Date" multiselect="true" usedinquery="1"/>
-                        <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/>
+                        <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="2"/>
                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/> 
                     </inputvalues>
                     <outputsModes>
@@ -626,7 +626,7 @@
             <transitions>
              <transition id="horizontalprofile_mesh" description="horizontalprofile_mesh" transition="de.intevation.gnv.transition.DefaultTransition">
                     <queryID>verticalprofile_mesh</queryID>
-                    <dataname>featureid</dataname>
+                    <dataname>meshid</dataname>
                     <data-multiselect>false</data-multiselect>
                     <reachableTransitions>
                            <transition>horizontalprofile_mesh_coordinate</transition>
@@ -636,13 +636,13 @@
                 </transition>
                 
                 <transition id="horizontalprofile_mesh_coordinate" description="horizontalprofile_mesh_coordinate" transition="de.intevation.gnv.transition.SingleInputTransition">
-                    <dataname>verticalprofile_mesh_coordinate</dataname>
+                    <dataname>mesh_coordinate</dataname>
                     <data-multiselect>false</data-multiselect>
                     <reachableTransitions>
                            <transition>horizontalprofile_mesh_point</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                     </inputvalues>
                 </transition>
                 
@@ -654,7 +654,7 @@
                         <transition>horizontalprofile_mesh_axis</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                          <inputvalue name="mesh_coordinate" type="Integer" multiselect="false"/>
                     </inputvalues>
                 </transition>
@@ -665,7 +665,7 @@
                         <transition>horizontalprofile_meshpoint_parameter</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false"/>
                          <inputvalue name="mesh_point" type="Integer" multiselect="false"/>
                     </inputvalues>
                 </transition>
@@ -677,7 +677,7 @@
                         <transition>horizontalprofile_meshpoint_depth</transition>
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                          <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
                          <inputvalue name="axisid" type="AttributeName" multiselect="false" usedinquery="0"/>
                     </inputvalues>
@@ -692,7 +692,7 @@
                         <transition>horizontalprofile_mesh_date</transition>v
                     </reachableTransitions>
                     <inputvalues>
-                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                          <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/>
                          <inputvalue name="axisid" type="AttributeName" multiselect="false" usedinquery="0"/>
                          <inputvalue name="parameterid" type="Integer" multiselect="true" useinquery="0"/>
@@ -707,7 +707,7 @@
                          <transition>horizontalprofile_mesh_calculate_results</transition>
                     </reachableTransitions>
                     <inputvalues>
-                        <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                        <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
                         <inputvalue name="axisid" type="AttributeName" multiselect="false" usedinquery="0"/>
                         <inputvalue name="parameterid" type="Integer" multiselect="true"  usedinquery="0"/>
@@ -720,7 +720,7 @@
                     <inputvalues>
                         <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/>
                         <inputvalue name="dateid" type="Date" multiselect="true" usedinquery="1"/>
-                        <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/>
+                        <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="2"/>
                         <inputvalue name="depthid" type="Integer" multiselect="true"  usedinquery="1"/>
                         <inputvalue name="axisid" type="AttributeName" multiselect="false" usedinquery="2"/>
                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="1"/> 
--- a/gnv-artifacts/src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml	Fri Oct 02 14:24:47 2009 +0000
@@ -4,6 +4,6 @@
 	<art:uuid value="1f6a63e2-c9d6-4ab1-830e-1effbc189d68" />
 	<art:hash value="29647319" />
 	<art:data>
-		<art:input name="featureid" value="3" />
+		<art:input name="meshid" value="3" />
 	</art:data>
 </art:action>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/lang/artifactMessages.properties	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,25 @@
+fis_marnet = Marnet
+fis_imis = IMIS
+fis_staun = STAUN
+fis_modeldata = Modeldata
+fis_delphin = Delphin
+fis_thermosalinograph = Thermosalinograph
+fis_chemusurvey = Chemusurvey
+
+timeSeries= Timeseries
+verticalProfile = Verticalprofile
+horizontalProfile = Horizontalprofile
+featureid = Object
+mesh_coordinate = Coordinate Value (x y)
+mesh_point = Meshpoint
+measurementid = Measurement depth
+parameterid = Parameter
+minvalue = Minvalue
+maxvalue = Maxvalue
+dateid = Measurement date
+vehicleid = Ship
+cruiseid = Cruise
+trackid = Track
+surveyid = Survey Info
+axisid = Axis
+depthid = Depth
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/lang/artifactMessages_de_DE.properties	Fri Oct 02 14:24:47 2009 +0000
@@ -0,0 +1,25 @@
+fis_marnet = Marnet
+fis_imis = IMIS
+fis_staun = STAUN
+fis_modeldata = Modeldaten
+fis_delphin = Delphin
+fis_thermosalinograph = Thermosalinograph
+fis_chemusurvey = Chemusurvey
+
+timeSeries= Zeitserie
+verticalProfile = Vertikalprofil
+horizontalProfile = Horizontalprofil
+featureid = ObjeKt
+mesh_coordinate = Koordinaten Wert (x y)
+mesh_point = Messpunkt
+measurementid = Messtiefe
+parameterid = Parameter
+minvalue = Minimalwert
+maxvalue = Maximalwert
+dateid = Messdatum
+vehicleid = Schiff
+cruiseid = Reise
+trackid = Track
+surveyid = Messinformation
+axisid = Achse
+depthid = Tiefe
\ No newline at end of file
--- a/gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_02_feed.xml	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_02_feed.xml	Fri Oct 02 14:24:47 2009 +0000
@@ -4,6 +4,6 @@
 	<art:uuid value="1e9f6583-9073-4409-aac1-432ad06d7ce1" />
 	<art:hash value="29913235" />
 	<art:data>
-		<art:input name="featureid" value="1" />
+		<art:input name="meshid" value="1" />
 	</art:data>
 </art:action>
\ No newline at end of file
--- a/gnv-artifacts/src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_feed.xml	Fri Oct 02 08:07:00 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_feed.xml	Fri Oct 02 14:24:47 2009 +0000
@@ -4,6 +4,6 @@
 	<art:uuid value="041fd0b2-5d77-49a8-b19f-5f3f553bda5d" />
 	<art:hash value="31343478" />
 	<art:data>
-		<art:input name="featureid" value="1" />
+		<art:input name="meshid" value="1" />
 	</art:data>
 </art:action>
\ No newline at end of file

http://dive4elements.wald.intevation.org