Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java @ 8615:054d1b57ae4a
(issue1755) Clarify how default mecahnism works and remove unused config value.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 25 Mar 2015 11:41:36 +0100 |
parents | e4606eae8ea5 |
children | 5e38e2924c07 |
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:
5867
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:
5867
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:
4212
diff
changeset
|
9 package org.dive4elements.river.artifacts.states; |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 import java.util.List; |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 import org.apache.log4j.Logger; |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
14 import org.json.JSONArray; |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
15 import org.json.JSONException; |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
16 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
17 import org.dive4elements.artifactdatabase.state.Facet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
18 import org.dive4elements.artifacts.CallContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
19 import org.dive4elements.artifacts.CallMeta; |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
20 import org.dive4elements.river.artifacts.D4EArtifact; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
21 import org.dive4elements.river.artifacts.ManualPointsArtifact; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
22 import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
23 import org.dive4elements.river.artifacts.model.FacetTypes; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
24 import org.dive4elements.river.artifacts.model.ManualPointsFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4212
diff
changeset
|
25 import org.dive4elements.river.artifacts.resources.Resources; |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 /** |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 * The only state for an ManualPointArtifact. |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 */ |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 public class ManualPointsSingleState |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 extends DefaultState |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 implements FacetTypes |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 { |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 /** Developer-centric description of facet. */ |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
35 public static final String I18N_DESCRIPTION |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
36 = "facet.longitudinal_section.manualpoint"; |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
37 |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
38 /** Part of data key. */ |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
39 protected static final String DOT_DATA |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
40 = ".data"; |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
41 |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
42 /** Part of data key. */ |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
43 protected static final String DOT_LINES |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
44 = ".lines"; |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
46 /** The log that is used in this state. */ |
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
47 private static final Logger log = |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
48 Logger.getLogger(ManualPointsSingleState.class); |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
50 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
51 /** |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
52 * Add ManualPointsFacets to list of Facets. |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
53 * |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
54 * @param artifact Ignored. |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
55 * @param hash Ignored. |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
56 * @param meta CallMeta to be used for internationalization. |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
57 * @param facets List to add ManualPointsFacet to. |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 * |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 * @return null. |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
60 */ |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
61 public Object compute( |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
62 D4EArtifact artifact, |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
63 String hash, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
64 CallMeta meta, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
65 List<Facet> facets |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
66 ) { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
67 log.debug("ManualPointsSingleState.compute()"); |
2206
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
68 ManualPointsArtifact points = (ManualPointsArtifact) artifact; |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
69 |
2206
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
70 // Add Facet per Diagram type if data given. |
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
71 for (ChartType ct: ChartType.values()) { |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
72 // Handle points. |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
73 String pointData = points.getDataAsString(ct + "." + MANUALPOINTS + |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
74 DOT_DATA); |
3453
e74e707ff650
Replace string comparison with empty string with length equals zero comparison
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3198
diff
changeset
|
75 if (pointData != null && pointData.length() != 0 |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
76 && !pointData.equals("[]")) { |
2206
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
77 String fName = ct + "." + MANUALPOINTS; |
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
78 ManualPointsFacet facet = new ManualPointsFacet( |
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
79 0, |
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
80 fName, |
4212
fbaba8e1a3a2
Replaced use of string literal by static definition in FacetTypes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3917
diff
changeset
|
81 Resources.getMsg(meta, MANUALPOINTS, "Manual Points")); |
2206
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
82 facets.add(facet); |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
83 log.debug("compute(): ManualPointsFacet for " + ct + " created"); |
2206
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
84 } |
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
85 else { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
86 log.debug("compute(): No points for " + ct); |
2206
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
87 } |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
88 |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
89 // Handle lines. |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
90 String linesData = points.getDataAsString(ct + "." + MANUALPOINTS + |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
91 DOT_LINES); |
3453
e74e707ff650
Replace string comparison with empty string with length equals zero comparison
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3198
diff
changeset
|
92 if (linesData != null && linesData.length() != 0 |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
93 && !linesData.equals("[]")) { |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
94 try { |
3883
f858028dde5f
Manual points (work in progress)
Christian Lins <christian.lins@intevation.de>
parents:
3453
diff
changeset
|
95 JSONArray lines = new JSONArray(linesData); |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
96 for (int i = 0, P = lines.length(); i < P; i++) { |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
97 JSONArray array = lines.getJSONArray(i); |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
98 double y = array.getDouble(0); |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
99 String name = array.getString(1); |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
100 String fName = ct + "." + MANUALLINE; |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
101 log.debug("have facet: " + y + " / " + name + " -> " + fName); |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
102 CrossSectionWaterLineFacet facet = new CrossSectionWaterLineFacet( |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
103 i, |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
104 fName, |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
105 name); |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
106 |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
107 facets.add(facet); |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
108 } |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
109 } |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
110 catch(JSONException e){ |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
111 log.error("Could not decode json."); |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
112 } |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
113 |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
114 } |
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
115 else { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
116 //log.debug("No points for " + ct); |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
117 } |
2206
e2124ca11adb
Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2181
diff
changeset
|
118 } |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
119 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
120 return null; |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
121 } |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
122 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
123 |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
124 /** Call compute. */ |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
125 @Override |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
126 public Object computeInit( |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
127 D4EArtifact artifact, |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
128 String hash, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
129 Object context, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
130 CallMeta meta, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
131 List<Facet> facets |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
132 ) { |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
133 return compute(artifact, hash, meta, facets); |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
134 } |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
135 |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
136 |
3198
d35f28655fa6
Create and handle new manual line type facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3076
diff
changeset
|
137 /** Call compute. */ |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
138 @Override |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
139 public Object computeFeed( |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
140 D4EArtifact artifact, |
2172
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
141 String hash, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
142 CallContext context, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
143 List<Facet> facets, |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
144 Object old |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
145 ) { |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
146 return compute(artifact, hash, context.getMeta(), facets); |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
147 } |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
148 } |
3ecc76ef25a9
New, basic infrastructure for user-provided data ('manual points').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
149 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |