changeset 53:e464d9f9d967

Added getDescription to a Transition gnv-artifacts/trunk@35 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 08 Sep 2009 09:03:48 +0000
parents 4d6a82b96059
children 09b4bf848c7b
files gnv-artifacts/Changelog 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/test/ressources/GNVArtifactsTestCase_Configuration.xml
diffstat 4 files changed, 25 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/Changelog	Mon Sep 07 15:29:24 2009 +0000
+++ b/gnv-artifacts/Changelog	Tue Sep 08 09:03:48 2009 +0000
@@ -1,3 +1,10 @@
+2009-09-08  Tim Englich  <tim.englich@intevation.de>
+
+    * src/test/ressources/GNVArtifactsTestCase_Configuration.xml, 
+      src/main/java/de/intevation/gnv/transition/Transition.java (getDescription), 
+      src/main/java/de/intevation/gnv/transition/TransitionBase.java (setup), (getDescription): 
+      Added Description to a Transition
+      
 2009-09-07  Tim Englich  <tim.englich@intevation.de>
 
     * src/test/ressources/GNVArtifactsTestCase_Configuration.xml, 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java	Mon Sep 07 15:29:24 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java	Tue Sep 08 09:03:48 2009 +0000
@@ -20,6 +20,8 @@
     
     public String getID();
     
+    public String getDescription();
+    
     public boolean validate();
     
     public Document describe();
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Mon Sep 07 15:29:24 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Tue Sep 08 09:03:48 2009 +0000
@@ -26,6 +26,10 @@
     
     private String id = null;
     
+    private String description = null;
+    
+
+
     protected String queryID = null;
     
     private Collection<String> reachableTransitions = null;
@@ -44,7 +48,14 @@
     public String getID() {
         return this.id;
     }
-
+    
+    /**
+     * @see de.intevation.gnv.transition.Transition#getDescription()
+     */
+    public String getDescription() {
+        return this.description;
+    }
+    
     /**
      * @see de.intevation.gnv.transition.Transition#reachableTransitions()
      */
@@ -58,6 +69,8 @@
     public void setup(Node configuration) {
         
         this.id = Config.getStringXPath(configuration,"@id");
+        this.description = Config.getStringXPath(configuration,"@descriptionb");
+        
         log.info("Transition-ID = "+ this.id);
         NodeList nodes = Config.getNodeSetXPath(configuration,"reachableTransitions/transition");
         this.reachableTransitions = new ArrayList<String>(nodes.getLength());
--- a/gnv-artifacts/src/test/ressources/GNVArtifactsTestCase_Configuration.xml	Mon Sep 07 15:29:24 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/GNVArtifactsTestCase_Configuration.xml	Tue Sep 08 09:03:48 2009 +0000
@@ -11,13 +11,13 @@
     <artifacts>
         <artifact name="timeSeries">
             <transitions>
-                <transition id="timeSeries.start" transition="de.intevation.gnv.transition.DefaultTransition">
+                <transition id="timeSeries.start" description="timeSeries.start.description" transition="de.intevation.gnv.transition.DefaultTransition">
                     <queryID>mesh</queryID>
                     <reachableTransitions>
                         <transition>timeSeries.end</transition>
                     </reachableTransitions>
                 </transition>
-                <transition id="timeSeries.end" transition="de.intevation.gnv.transition.DefaultTransition">
+                <transition id="timeSeries.end" description="timeSeries.end.description" transition="de.intevation.gnv.transition.DefaultTransition">
                     <queryID>mesh</queryID>
                 </transition>
             </transitions>

http://dive4elements.wald.intevation.org