Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java @ 780:c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
gnv-artifacts/trunk@857 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 09:35:44 +0000 |
parents | b1f5f2a8840f |
children | df6d980c5418 |
rev | line source |
---|---|
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.state.profile.horizontal; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
493
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
3 import de.intevation.artifacts.CallContext; |
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
4 import de.intevation.artifacts.CallMeta; |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.gnv.artifacts.ressource.RessourceFactory; |
493
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
7 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.gnv.geobackend.base.Result; |
493
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
9 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.gnv.state.StateBase; |
493
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
11 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 import de.intevation.gnv.state.describedata.KeyValueDescibeData; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.gnv.state.describedata.NamedArrayList; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 import de.intevation.gnv.state.describedata.NamedCollection; |
493
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
16 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 import de.intevation.gnv.state.exception.StateException; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 |
493
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
19 import java.util.ArrayList; |
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
20 import java.util.Collection; |
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:
493
diff
changeset
|
21 import java.util.List; |
493
cef17cc90fd0
Changed some method signatures of the State interface. Use CallContext objects instead of CallMeta objects which are a subset of CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
335
diff
changeset
|
22 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 /** |
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:
779
diff
changeset
|
24 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
638
diff
changeset
|
25 * |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 public class NorthSouthEastWestState extends StateBase { |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
638
diff
changeset
|
29 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 /** |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 * The UID of this Class |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 private static final long serialVersionUID = -7989531326553305293L; |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 |
638
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
35 protected String ipos; |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
36 protected String jpos; |
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:
493
diff
changeset
|
37 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 /** |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 * Constructor |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 public NorthSouthEastWestState() { |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 } |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 /** |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 * @see de.intevation.gnv.state.StateBase#purifyResult(java.util.Collection, java.lang.String) |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 */ |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 @Override |
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:
493
diff
changeset
|
48 protected List<Object> purifyResult(Collection<Result> result, String uuid) { |
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:
493
diff
changeset
|
49 List<Object> describeData = new ArrayList<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:
493
diff
changeset
|
50 |
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:
493
diff
changeset
|
51 NamedCollection<KeyValueDescibeData> keyValueDescibeData = |
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:
493
diff
changeset
|
52 new NamedArrayList<KeyValueDescibeData>(dataName, 2); |
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:
493
diff
changeset
|
53 |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 keyValueDescibeData.setMultiSelect(super.dataMultiSelect); |
638
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
55 keyValueDescibeData.add(new DefaultKeyValueDescribeData( |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
56 "IPOSITION", ipos)); |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
57 keyValueDescibeData.add(new DefaultKeyValueDescribeData( |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
58 "JPOSITION", jpos)); |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 describeData.add(keyValueDescibeData); |
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:
493
diff
changeset
|
60 |
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:
493
diff
changeset
|
61 return describeData; |
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:
493
diff
changeset
|
62 } |
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:
493
diff
changeset
|
63 |
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:
493
diff
changeset
|
64 /** |
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:
493
diff
changeset
|
65 * @see de.intevation.gnv.state.StateBase#initialize(java.lang.String, de.intevation.artifacts.CallMeta) |
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:
493
diff
changeset
|
66 */ |
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:
493
diff
changeset
|
67 @Override |
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:
493
diff
changeset
|
68 public void initialize(String uuid, CallContext context) |
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:
493
diff
changeset
|
69 throws StateException |
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:
493
diff
changeset
|
70 { |
638
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
71 CallMeta callMeta = context.getMeta(); |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
72 RessourceFactory factory = RessourceFactory.getInstance(); |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
73 |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
74 // XXX Workarround - we need these strings in purifyResult, but have no |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
638
diff
changeset
|
75 // CallMeta object there which is necessary to get resources from |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
638
diff
changeset
|
76 // RessourceFactory. Storing the strings here is not nice, because the |
638
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
77 // Locale object could change! |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
78 ipos = factory.getRessource( |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
79 callMeta.getLanguages(), "iposition", "iposition"); |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
80 jpos = factory.getRessource( |
c580666a843f
Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
607
diff
changeset
|
81 callMeta.getLanguages(), "jposition", "jposition"); |
335
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
82 } |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
83 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
84 |
e964a3d8f7bc
Some Refactoring work done.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
85 } |