Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/StateFactory.java @ 9801:1d7a72a50183 3.2.x tip
Assume Compose V2, consistently
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 23 Nov 2023 10:14:13 +0100 |
parents | 0a5239a1e46e |
children |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3453
diff
changeset
|
9 package org.dive4elements.river.artifacts.states; |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import javax.xml.xpath.XPathConstants; |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
9726 | 13 import org.apache.logging.log4j.Logger; |
14 import org.apache.logging.log4j.LogManager; | |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 import org.w3c.dom.Node; |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
17 import org.w3c.dom.NodeList; |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3453
diff
changeset
|
19 import org.dive4elements.artifactdatabase.data.DefaultStateData; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3453
diff
changeset
|
20 import org.dive4elements.artifactdatabase.state.State; |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3453
diff
changeset
|
22 import org.dive4elements.artifacts.common.utils.XMLUtils; |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 /** |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 */ |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public class StateFactory { |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
30 /** The log used in this class */ |
9726 | 31 private static Logger log = LogManager.getLogger(StateFactory.class); |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 /** The XPath to the classname of the state */ |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 public static final String XPATH_STATE = "@state"; |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
36 /** The XPath to the data items of the state relative to the state node. */ |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
37 public static final String XPATH_DATA = "data"; |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
38 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
39 /** The XPath to the data name relative to the data node.*/ |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
40 public static final String XPATH_DATA_NAME = "@name"; |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
41 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
42 /** The XPath to the data type relative to the data node.*/ |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
43 public static final String XPATH_DATA_TYPE = "@type"; |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
44 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
45 /** The XPath to the data description relative to the data node.*/ |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
46 public static final String XPATH_DATA_DESCRIPTION = "@description"; |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
47 |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 /** |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 * Creates a new State based on the configured class provided by |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 * <code>stateConf</code>. |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 * |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 * @param stateConf The configuration of the state. |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 * |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 * @return a State. |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 */ |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 public static State createState(Node stateConf) { |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 String clazz = (String) XMLUtils.xpath( |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 stateConf, XPATH_STATE, XPathConstants.STRING); |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 State state = null; |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 try { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
64 log.debug("Create a new State for class: " + clazz); |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 state = (State) Class.forName(clazz).newInstance(); |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 state.setup(stateConf); |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
67 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
68 initializeStateData(state, stateConf); |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 } |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 catch (InstantiationException ie) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
71 log.error(ie, ie); |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 } |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 catch (IllegalAccessException iae) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
74 log.error(iae, iae); |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 } |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 catch (ClassNotFoundException cnfe) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
77 log.error(cnfe, cnfe); |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 } |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 return state; |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 } |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
82 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
83 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
84 /** |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
85 * This method extracts the configured input data of a state and adds new |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
86 * StateData objects to the State. |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
87 * |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
88 * @param state The state. |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
89 * @param stateConf The state configuration node. |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
90 */ |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
91 protected static void initializeStateData(State state, Node stateConf) { |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
92 NodeList dataList = (NodeList) XMLUtils.xpath( |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
93 stateConf, XPATH_DATA, XPathConstants.NODESET); |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
94 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
95 if (dataList == null || dataList.getLength() == 0) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
96 log.debug("The state has no input data configured."); |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
97 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
98 return; |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
99 } |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
100 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
101 int items = dataList.getLength(); |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
102 |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
103 log.debug("The state has " + items + " data items configured."); |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
104 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
105 for (int i = 0; i < items; i++) { |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
106 Node data = dataList.item(i); |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
107 |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
108 String name = (String) XMLUtils.xpath( |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
109 data, XPATH_DATA_NAME, XPathConstants.STRING); |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
110 String type = (String) XMLUtils.xpath( |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
111 data, XPATH_DATA_TYPE, XPathConstants.STRING); |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
112 String desc = (String) XMLUtils.xpath( |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
113 data, XPATH_DATA_DESCRIPTION, XPathConstants.STRING); |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
114 |
3453
e74e707ff650
Replace string comparison with empty string with length equals zero comparison
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2204
diff
changeset
|
115 if (name == null || name.length() == 0) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
116 log.warn("No name for data item at pos " + i + " found."); |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
117 continue; |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
118 } |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
119 |
3453
e74e707ff650
Replace string comparison with empty string with length equals zero comparison
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2204
diff
changeset
|
120 if (type == null || type.length() == 0) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
121 log.warn("No type for data item at pos " + i + " found."); |
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
122 log.warn("Default type 'string' used."); |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
123 type = "string"; |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
124 } |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
125 |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
126 log.debug("add StateData '" + name + "' (type '" + type + "')"); |
2204
45f7762767e2
Bugfix: use correct order of parameters to call DefaultStateData constructor.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
127 state.addData(name, new DefaultStateData(name, desc, type)); |
113
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
128 } |
f077df8ad54c
The input data items of a state are read from configuration after the state has been setup.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
108
diff
changeset
|
129 } |
108
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 } |
50273a391e53
Added missing StateFactory class of the last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |