[PATCH] VegetationZone removed from Uinfo-Ü'Dauern Workflow

Wald Commits scm-commit at wald.intevation.org
Wed Oct 24 12:00:51 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1540375249 -7200
# Node ID 709a73badd48b1a50907f0ad744da132d9321f84
# Parent  145895212b3c7edc960f05beb0176ef1e84ccea8
VegetationZone removed from Uinfo-Ü'Dauern Workflow

diff -r 145895212b3c -r 709a73badd48 artifacts/doc/conf/artifacts/uinfo.xml
--- a/artifacts/doc/conf/artifacts/uinfo.xml	Tue Oct 23 16:27:11 2018 +0200
+++ b/artifacts/doc/conf/artifacts/uinfo.xml	Wed Oct 24 12:00:49 2018 +0200
@@ -251,24 +251,26 @@
 
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.uinfo.inundation.use_scenario" />
-      <to state="state.uinfo.inundation.vegetation" />
+       <to state="state.uinfo.inundation_duration" />
       <condition data="use_scenario" value="false" operator="equal" />
     </transition>
 
     <state id="state.uinfo.inundation.load.scenario" description="state.uinfo.inundation.load.scenario" state="org.dive4elements.river.artifacts.uinfo.inundationduration.LoadScenarioSelect" helpText="help.state.uinfo.inundation.scenario">
       <data name="sedimentheight" type="String" /> <!-- mittelwasserlage in cm! -->
     </state>
-
+  
+  <!-- this state is unused and can be deleted: -->
     <state id="state.uinfo.inundation.vegetation" description="state.uinfo.inundation.vegetation" state="org.dive4elements.river.artifacts.uinfo.vegetationzones.VegetationZonesTableState" helpText="help.state.uinfo.inundation.vegetation">
       <data name="vegzones" type="String" />
     </state>
 
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.uinfo.inundation.load.scenario" />
-      <to state="state.uinfo.inundation.vegetation" />
+      <to state="state.uinfo.inundation_duration" />
       <condition data="calculation_mode" value="uinfo_inundation_duration" operator="equal" />
     </transition>
 
+<!-- this transition is unused and can be deleted -->
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.uinfo.inundation.vegetation" />
       <to state="state.uinfo.inundation_duration" />
diff -r 145895212b3c -r 709a73badd48 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationCalculation.java	Tue Oct 23 16:27:11 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationCalculation.java	Wed Oct 24 12:00:49 2018 +0200
@@ -10,7 +10,6 @@
 package org.dive4elements.river.artifacts.uinfo.inundationduration;
 
 import java.io.IOException;
-import java.util.List;
 
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.river.artifacts.model.Calculation;
@@ -19,7 +18,6 @@
 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact;
 import org.dive4elements.river.artifacts.uinfo.inundationduration.InundationDurationAccess.WmsClassification;
 import org.dive4elements.river.artifacts.uinfo.inundationduration.InundationDurationCalculationResult.WmsLayer;
-import org.dive4elements.river.artifacts.uinfo.vegetationzones.VegetationZoneServerClientXChange;
 
 /**
  * @author Domenico Nardi Tironi
@@ -39,8 +37,9 @@
         try {
             final InundationDurationAccess indurax = new InundationDurationAccess(uinfo);
 
-            final String zonesRaw = indurax.getVegZones();
-            final List<VegetationZoneServerClientXChange> zones = VegetationZoneServerClientXChange.parse(zonesRaw);
+            // VegetationZones have been removed - these two lines should be deleted
+            // final String zonesRaw = indurax.getVegZones();
+            // final List<VegetationZoneServerClientXChange> zones = VegetationZoneServerClientXChange.parse(zonesRaw);
             // FIXME: instead find out a-uuid of referenced vegetations
             // FIXME:
             final String vegZoneId = "unknown";
diff -r 145895212b3c -r 709a73badd48 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesTableState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesTableState.java	Tue Oct 23 16:27:11 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesTableState.java	Wed Oct 24 12:00:49 2018 +0200
@@ -24,6 +24,8 @@
  */
 public class VegetationZonesTableState extends DefaultState {
 
+    /* THIS STATE IS UNUSED AN SHOULD BE DELETED */
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -41,7 +43,8 @@
             final Element value = ProtocolUtils.createArtNode(cr, "value", null, null);
             final D4EArtifact flys = (D4EArtifact) artifact;
             final River river = new RiverAccess(flys).getRiver();
-            final String s = flys.getDataAsString(datakey) == null ? VegetationZoneServerClientXChange.parseListToDataString(VegetationZoneServerClientXChange.getStandardList(river, context))
+            final String s = flys.getDataAsString(datakey) == null
+                    ? VegetationZoneServerClientXChange.parseListToDataString(VegetationZoneServerClientXChange.getStandardList(river, context))
                     : flys.getDataAsString(datakey);
 
             value.setTextContent(s);
diff -r 145895212b3c -r 709a73badd48 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java	Tue Oct 23 16:27:11 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java	Wed Oct 24 12:00:49 2018 +0200
@@ -100,6 +100,7 @@
         } else if (uiProvider.equals("uinfo.vegetationzones.table.edit")) {
             return new VegetationzonesTableEditPanel();
         } else if (uiProvider.equals("uinfo.vegetationzones.table")) {
+            // THIS CASE IS UNUSED AND SHOULD BE DELETED
             return new VegetationzonesTablePanel(user);
         } else if (uiProvider.equals("wsp_datacage_panel")) {
             return new WspDatacagePanel(user);


More information about the Dive4Elements-commits mailing list