annotate gnv-artifacts/src/main/java/de/intevation/gnv/state/PreSettingsTransferCoordinateSelectionState.java @ 778:9a828e5a2390

Removed trailing whitespace gnv-artifacts/trunk@851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 29 Mar 2010 07:58:51 +0000
parents a5e860f17a52
children b1f5f2a8840f
rev   line source
747
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 *
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 */
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 package de.intevation.gnv.state;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
6 import java.util.ArrayList;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 import java.util.Collection;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 import java.util.Map;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 import org.w3c.dom.Element;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 import org.w3c.dom.Node;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 import de.intevation.artifactdatabase.Config;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 import de.intevation.artifacts.CallContext;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 import de.intevation.gnv.state.exception.StateException;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 /**
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 * @author Tim Englich <tim.englich@intevation.de>
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 *
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 */
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 public class PreSettingsTransferCoordinateSelectionState extends CoordinateSelectionState {
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 /**
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 * The UID of this Class.
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 */
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 private static final long serialVersionUID = -3972304838976884048L;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 private String transferPreSettingsName = null;
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 747
diff changeset
30
747
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31 private String transferInputDataname = null;
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 /**
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 * Constructor
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 */
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 public PreSettingsTransferCoordinateSelectionState() {
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 super();
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 }
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 /**
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 * @see de.intevation.gnv.state.StateBase#initialize(java.lang.String, de.intevation.artifacts.CallContext)
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 */
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 @Override
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 public void initialize(String uuid, CallContext context)
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 throws StateException {
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 Map<String, InputData> preSettings = this.getPreSettings();
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 if (preSettings != null){
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 InputData ip = preSettings.get(transferPreSettingsName);
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 if (ip != null){
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 Collection<InputData> localInputdata = new ArrayList<InputData>(1);
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 localInputdata.add(new DefaultInputData(transferInputDataname,
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 ip.getValue()));
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 this.putInputData(localInputdata, uuid);
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 }
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 }
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 747
diff changeset
55
747
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56 super.initialize(uuid, context);
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 }
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59 /**
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
60 * @see de.intevation.gnv.state.StateBase#setup(org.w3c.dom.Node)
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
61 */
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
62 @Override
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63 public void setup(Node configuration) {
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 747
diff changeset
64
747
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65 Element preSettingsNode = (Element)Config.getNodeXPath(configuration,
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
66 "presettings-transfer");
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
67 if (preSettingsNode != null){
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68 this.transferPreSettingsName = preSettingsNode.getAttribute("presetting");
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69 this.transferInputDataname = preSettingsNode.getAttribute("inputvalue");
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
70 }
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
71 super.setup(configuration);
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
72 }
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 747
diff changeset
73
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 747
diff changeset
74
747
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
75
a5e860f17a52 Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 }

http://dive4elements.wald.intevation.org