annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReferenceCurveFacet.java @ 4693:a91d3bde7255

Change parameters of updateCollectionName
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 17 Dec 2012 16:15:05 +0100
parents 5642a83420f2
children
rev   line source
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
3 import java.util.ArrayList;
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
4 import java.util.List;
2407
dce0cc856357 'Bezugslinien': Added axis labels matching the displayed data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2405
diff changeset
5 import java.util.Collections;
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
6
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 import de.intevation.artifactdatabase.state.Facet;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 import de.intevation.artifacts.Artifact;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 import de.intevation.artifacts.CallContext;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 import de.intevation.flys.artifacts.FLYSArtifact;
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
13 import de.intevation.flys.artifacts.WINFOArtifact;
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 import org.apache.log4j.Logger;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
19
2221
fdeb6d61c24c Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2198
diff changeset
20 /** Facet for W-over-Ws. */
3076
5642a83420f2 FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2756
diff changeset
21 public class ReferenceCurveFacet
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 extends DataFacet
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 {
2407
dce0cc856357 'Bezugslinien': Added axis labels matching the displayed data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2405
diff changeset
24 private static Logger log = Logger.getLogger(ReferenceCurveFacet.class);
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
25
2407
dce0cc856357 'Bezugslinien': Added axis labels matching the displayed data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2405
diff changeset
26 public static final String CONTEXT_KEY = "reference.curve.axis.scale";
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
28 /** Blackboard data provider key for reference curves start km. */
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
29 public static final String BB_REFERENCECURVE_STARTKM =
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
30 "reference_curve.startkm";
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
31
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
32 /** Blackboard data provider key for reference curves end kms. */
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
33 public static final String BB_REFERENCECURVE_ENDKMS =
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
34 "reference_curve.endkms";
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
35
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
36
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37 public ReferenceCurveFacet() {
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38 }
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
40
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 public ReferenceCurveFacet(int index, String name, String description) {
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42 super(index, name, description, ComputeType.ADVANCE, null, null);
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
43 }
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
44
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
45
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46 public ReferenceCurveFacet(
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
47 int index,
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
48 String name,
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
49 String description,
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
50 ComputeType type,
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
51 String stateID,
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
52 String hash
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
53 ) {
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
54 super(index, name, description, type, hash, stateID);
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
55 }
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
56
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
57
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
58 public Object getData(Artifact artifact, CallContext context) {
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
59
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
60 if (log.isDebugEnabled()) {
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
61 log.debug("Get data for reference curve at index: " + index +
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
62 " /stateId: " + stateId);
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
63 }
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
64
2283
d4330439be3a Let reference curve calculation result in wwqq.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2256
diff changeset
65 return getWWQQ(artifact, context);
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
66 }
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
67
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
68
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
69 /**
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
70 * Can provide parameters of reference curve
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
71 * @param key will respond on BB_REFERENCECURVE START/ENDKMS
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
72 * @param param ignored
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
73 * @param context ignored
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
74 * @return whatever parameters for reference curve
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
75 */
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
76 @Override
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
77 public Object provideBlackboardData(Artifact artifact,
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
78 Object key,
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
79 Object param,
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
80 CallContext context
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
81 ) {
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
82 WINFOArtifact winfo = (WINFOArtifact) artifact;
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
83 if (key.equals(BB_REFERENCECURVE_STARTKM)) {
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
84 return winfo.getReferenceStartKm();
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
85 }
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
86 else if (key.equals(BB_REFERENCECURVE_ENDKMS)) {
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
87 return winfo.getReferenceEndKms();
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
88 }
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
89 else {
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
90 return null;
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
91 }
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
92 }
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
93
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
94
2283
d4330439be3a Let reference curve calculation result in wwqq.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2256
diff changeset
95 protected WWQQ getWWQQ(Artifact artifact, CallContext context) {
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
96 FLYSArtifact winfo = (FLYSArtifact)artifact;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
97
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
98 CalculationResult res = (CalculationResult)
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
99 winfo.compute(context, hash, stateId, type, false);
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
100
2283
d4330439be3a Let reference curve calculation result in wwqq.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2256
diff changeset
101 return ((WWQQ [])res.getData())[index];
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
102 }
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
103
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
104
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
105 @Override
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
106 public void set(Facet other) {
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
107 super.set(other);
2405
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
108 ReferenceCurveFacet o = (ReferenceCurveFacet)other;
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
109 type = o.type;
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
110 hash = o.hash;
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
111 stateId = o.stateId;
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
112 }
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
113
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
114
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
115 /** Copy deeply. */
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
116 @Override
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
117 public Facet deepCopy() {
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
118 ReferenceCurveFacet copy = new ReferenceCurveFacet();
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
119 copy.set(this);
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
120 return copy;
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
121 }
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
122
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
123
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
124 @Override
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
125 public List getStaticDataProviderKeys(Artifact art) {
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
126 List list = new ArrayList();
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
127 list.add(BB_REFERENCECURVE_STARTKM);
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
128 list.add(BB_REFERENCECURVE_ENDKMS);
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
129 return list;
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
130 }
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
131
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
132
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
133 @Override
2405
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
134 public List getDataProviderKeys(Artifact art, CallContext context) {
2407
dce0cc856357 'Bezugslinien': Added axis labels matching the displayed data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2405
diff changeset
135
2405
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
136 // compute / get data
2407
dce0cc856357 'Bezugslinien': Added axis labels matching the displayed data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2405
diff changeset
137 Object obj = context.getContextValue(CONTEXT_KEY);
2405
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
138
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
139 if (!(obj instanceof WWAxisTypes)) {
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
140 obj = new WWAxisTypes(getWWQQ(art, context));
2407
dce0cc856357 'Bezugslinien': Added axis labels matching the displayed data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2405
diff changeset
141 context.putContextValue(CONTEXT_KEY, obj);
2405
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
142 }
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
143 else {
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
144 ((WWAxisTypes)obj).classify(getWWQQ(art, context));
f008c3335a77 Towards fixe of flys/issue495.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2402
diff changeset
145 }
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
146
2756
ba15eb120a02 Expose reference curve parameters via blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2407
diff changeset
147 return getStaticDataProviderKeys(art);//Collections.emptyList();
2256
dd93a8e1377a First steps to serve the data in cm if we are are gauges only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2221
diff changeset
148 }
2196
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
149 }
5f3726f31f00 "Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
150 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org