Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultInputData.java @ 799:feeaf5aec552
ISSUE213: Wrong Geometrytype used for the generation of an Layer with Multipolygon-Geometries
gnv-artifacts/trunk@881 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 06 Apr 2010 11:56:53 +0000 |
parents | a5526908f92f |
children | feae2f9d6c6f |
rev | line source |
---|---|
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.state; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
3 import java.util.HashMap; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
4 import java.util.Map; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
5 |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
6 import org.apache.log4j.Logger; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
7 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 /** |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
9 * The default implementation of <code>InputData</code>. This object stores |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
10 * multiple values separated by {@link #VALUE_SEPARATOR} for a specific key. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
11 * |
780
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
634
diff
changeset
|
12 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
634
diff
changeset
|
13 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 public class DefaultInputData implements InputData { |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 /** |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 * |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 private static final long serialVersionUID = 4308041648698108066L; |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
21 |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
22 private static final Logger logger = Logger.getLogger(DefaultInputData.class); |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
23 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
24 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
25 * The character used to separate the different values. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
26 */ |
785
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
27 public final static String VALUE_SEPARATOR = " , "; |
598
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
28 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
29 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
30 * The key/name of this object. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
31 */ |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
32 protected String name; |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
33 |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
34 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
35 * Values separated by {@link #VALUE_SEPARATOR}. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
36 */ |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
37 protected String value; |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
38 |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
39 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
40 * Descriptions for values used for user interface creation. Each value |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
41 * should have an own description in this map. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
42 */ |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
43 protected Map description; |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
44 |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
45 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
46 * An extra object. Might be everything. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
47 */ |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
48 protected Object object; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
49 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 /** |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 * Constructor |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
53 * @param name |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
54 * @param value |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 public DefaultInputData(String name, String value) { |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 this.name = name; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 this.value = value; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 } |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
61 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
62 * |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
63 * @param name |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
64 * @param object |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
65 */ |
607
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
66 public DefaultInputData(String name, Object object) { |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
67 this.name = name; |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
68 this.object = object; |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
69 } |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
70 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
71 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
72 * |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
73 * @param name |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
74 * @param value |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
75 * @param object |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
76 */ |
785
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
77 public DefaultInputData( |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
78 String name, |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
79 String value, |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
80 Object object) |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
81 { |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
82 this.name = name; |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
83 this.object = object; |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
84 this.value = value; |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
85 } |
e764cab8c885
Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
780
diff
changeset
|
86 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
87 /** |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
88 * @return |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
89 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
90 public String getName() { |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
91 return this.name; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
92 } |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
93 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
94 /** |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
95 * @return |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
96 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
97 public String getValue() { |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
98 return this.value; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
99 } |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
100 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
101 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
102 * |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
103 * @param object |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
104 */ |
607
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
105 public void setObject(Object object) { |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
106 this.object = object; |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
107 } |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
108 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
109 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
110 * |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
111 * @return |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
112 */ |
607
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
113 public Object getObject() { |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
114 return object; |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
115 } |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
116 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
117 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
118 * |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
119 * @param key Key needs to be a single value of {@link #value}. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
120 * @return the description. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
121 */ |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
122 public String getDescription(String key) { |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
123 if (description == null) |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
124 return null; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
125 |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
126 return (String) description.get(key); |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
127 } |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
128 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
129 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
130 * Return all descriptions as array. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
131 * |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
132 * @return descriptions as array. |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
133 */ |
615
01054ddccb0f
Repaired multi parameter selection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
134 public String[] getDescription() { |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
135 String[] values = splitValue(); |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
136 int length = values.length; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
137 |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
138 String[] description = new String[length]; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
139 for (int i = 0; i < length; i++) { |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
140 description[i] = (String) this.description.get(values[i]); |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
141 } |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
142 |
607
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
143 return description; |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
144 } |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
145 |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
146 /** |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
147 * |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
148 * @param description |
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
149 */ |
615
01054ddccb0f
Repaired multi parameter selection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
150 public void setDescription(String[] description) { |
634
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
151 if (this.description == null) |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
152 this.description = new HashMap(); |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
153 |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
154 String[] values = splitValue(); |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
155 |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
156 int length = values.length; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
157 int descLength = description.length; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
158 |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
159 for (int i = 0; i < length; i++) { |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
160 if (i < descLength) { |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
161 this.description.put(values[i], description[i]); |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
162 } |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
163 else { |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
164 break; |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
165 } |
58c32df1a44d
Improved the describe document so that we are able to render a measurement-parameter-matrix with these data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
615
diff
changeset
|
166 } |
607
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
167 } |
292fbcd5e9ac
Parted the cache blob into pieces and changed the way how user input is stored on each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
168 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
169 /** |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
170 * @return |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
171 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
172 @Override |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
173 public String toString() { |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
174 return this.name + "==> " + this.value; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
175 } |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
176 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
177 /** |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
178 * @param value |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
179 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
180 public void concartValue(String value) { |
598
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
181 this.value = this.value + VALUE_SEPARATOR + value; |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
182 } |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
183 |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
184 /** |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
185 * @return |
598
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
186 */ |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
187 public String[] splitValue() { |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
188 if (this.value != null){ |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
189 return this.value.split(VALUE_SEPARATOR); |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
190 } |
9681ac6b6527
Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts.
Tim Englich <tim.englich@intevation.de>
parents:
335
diff
changeset
|
191 return null; |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
192 } |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
193 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
194 } |
796
a5526908f92f
Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
195 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |