Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FunctionSelect.java @ 5380:75371c9ef472
I1174: Changed label for some themes in fix analysis.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 11:55:14 +0100 |
parents | 8e66293c5369 |
children |
rev | line source |
---|---|
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states.fixation; |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
2698
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
3 import java.util.Collection; |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
4 |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 import org.w3c.dom.Element; |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.Artifact; |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifacts.CallContext; |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifacts.common.utils.XMLUtils; |
2698
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
10 import de.intevation.flys.artifacts.math.fitting.Function; |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
11 import de.intevation.flys.artifacts.math.fitting.FunctionFactory; |
3785
a5f65e8983be
Merged revisions 5501-5502,5504-5508,5511-5513,5516-5519 via svnmerge from
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3594
diff
changeset
|
12 import de.intevation.flys.artifacts.states.DefaultState; |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 /** |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 */ |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 public class FunctionSelect extends DefaultState { |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 /** |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 * The default constructor that initializes an empty State object. |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 */ |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 public FunctionSelect() { |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 } |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 |
3785
a5f65e8983be
Merged revisions 5501-5502,5504-5508,5511-5513,5516-5519 via svnmerge from
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3594
diff
changeset
|
25 @Override |
3594
ff3ccd84f96a
FixA: Added getter for ui provider in function select state.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2699
diff
changeset
|
26 public String getUIProvider() { |
ff3ccd84f96a
FixA: Added getter for ui provider in function select state.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2699
diff
changeset
|
27 return "fix.functionselect"; |
ff3ccd84f96a
FixA: Added getter for ui provider in function select state.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2699
diff
changeset
|
28 } |
2698
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
29 |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
30 @Override |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
31 protected Element[] createItems( |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
32 XMLUtils.ElementCreator ec, |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
33 Artifact artifact, |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
34 String name, |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
35 CallContext context) |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
36 { |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
37 FunctionFactory ff = FunctionFactory.getInstance(); |
3785
a5f65e8983be
Merged revisions 5501-5502,5504-5508,5511-5513,5516-5519 via svnmerge from
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3594
diff
changeset
|
38 Collection<Function> fc = ff.getFunctions(); |
2698
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
39 Element[] functions = new Element[fc.size()]; |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
40 |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
41 int j = 0; |
4049
8e66293c5369
Removed dead code
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4043
diff
changeset
|
42 for (Function f: fc) { |
2698
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
43 String n = f.getName(); |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
44 String d = f.getDescription(); |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
45 functions[j] = createItem(ec, new String[] {d, n}); |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
46 j++; |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
47 } |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
48 |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
49 return functions; |
15523818eae4
Implemented states for fix-analysis.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2651
diff
changeset
|
50 } |
2651
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 } |
9e9eb9d97548
Initial transition configuration and artifact/state stubs for fixation
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |