annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticWQKmsState.java @ 7584:c7638c971574

Renamed winfo variable to more fitting name artifact.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 19 Nov 2013 10:46:24 +0100
parents fe32a7f9655e
children e609722a1e86
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: 5799
diff changeset
9 package org.dive4elements.river.artifacts.states;
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import java.util.List;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12
7066
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
13 import gnu.trove.TDoubleArrayList;
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
14
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 import org.apache.log4j.Logger;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
17 import org.dive4elements.artifacts.CallContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
18 import org.dive4elements.artifacts.CallMeta;
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
20 import org.dive4elements.artifactdatabase.state.Facet;
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
22 import org.dive4elements.river.artifacts.D4EArtifact;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
23 import org.dive4elements.river.artifacts.StaticWQKmsArtifact;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
24
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
25 import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
26 import org.dive4elements.river.artifacts.model.FacetTypes;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
27 import org.dive4elements.river.artifacts.model.RelativePointFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
28 import org.dive4elements.river.artifacts.model.WQKms;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5799
diff changeset
29 import org.dive4elements.river.artifacts.model.WQKmsFacet;
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31 /**
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32 * Only state of WQKmsArtifact.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33 */
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34 public class StaticWQKmsState
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 extends DefaultState
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36 implements FacetTypes
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37 {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38 /** The logger that is used in this state. */
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39 private static Logger logger = Logger.getLogger(StaticWQKmsState.class);
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42 /**
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 * From this state can not be continued.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44 */
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 @Override
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46 protected String getUIProvider() {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 return "noinput";
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51 /**
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 * Compute, create Facets, do the same stuff as all the other states do.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53 */
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54 protected Object compute(
7584
c7638c971574 Renamed winfo variable to more fitting name artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7254
diff changeset
55 StaticWQKmsArtifact artifact,
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
56 CallMeta metaLocale,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57 String hash,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58 List<Facet> facets,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
59 Object old
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
60 ) {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
61 String id = getID();
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
62
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
63 WQKms res = old instanceof WQKms
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
64 ? (WQKms)old
7584
c7638c971574 Renamed winfo variable to more fitting name artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7254
diff changeset
65 : artifact.getWQKms();
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
66
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
67 WQKms wqkms = res;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
68
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
69 if (facets == null) {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
70 return res;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
71 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
72
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
73 /*
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
74 * TODO: re-enable HEIGHTMARKS_POINTS-thing
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
75
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
76 String name;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
77 if (parts[0].equals(HEIGHTMARKS_POINTS)) {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
78 name = HEIGHTMARKS_POINTS;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
79 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
80 else {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
81 name = STATIC_WQKMS;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
82 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
83 */
7066
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
84 // Spawn Q Facet only if at least one discharge value
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
85 // is != -1
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
86 boolean qEmpty = true;
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
87 TDoubleArrayList qs = wqkms.allQs();
7254
fe32a7f9655e Reduce usage of careless 'for (int i = 0; i < x.size(); i++)' pattern.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7066
diff changeset
88 for (int i = 0, Q = qs.size(); i < Q; i++) {
7066
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
89 if (qs.getQuick(i) != -1d) {
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
90 qEmpty = false;
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
91 break;
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
92 }
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
93 }
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
94
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
95 String wkmsName = wqkms.getName();
7066
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
96 if (!qEmpty) {
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
97 Facet qfacet = new WQKmsFacet(
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
98 STATIC_WQKMS_Q,
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
99 wkmsName
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
100 // TODO re-enable translations.
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
101 /*
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
102 Resources.getMsg(
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
103 metaLocale,
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
104 wkmsName,
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
105 wkmsName)*/);
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
106 facets.add(qfacet);
39237f4985a7 issue1494: Spawn Q facet only if Q data is there.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
107 }
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
108
5799
5a2c7d24fd29 StaticWQKmsState: Also spawn RelativePoint and CrossSectionFacet .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2126
diff changeset
109 Facet rpFacet = new RelativePointFacet(wkmsName);
5a2c7d24fd29 StaticWQKmsState: Also spawn RelativePoint and CrossSectionFacet .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2126
diff changeset
110 facets.add(rpFacet);
5a2c7d24fd29 StaticWQKmsState: Also spawn RelativePoint and CrossSectionFacet .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2126
diff changeset
111
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
112 wkmsName = "W (" + wkmsName + ")";
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
113
5799
5a2c7d24fd29 StaticWQKmsState: Also spawn RelativePoint and CrossSectionFacet .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2126
diff changeset
114 Facet csFacet = new CrossSectionWaterLineFacet(0,
5a2c7d24fd29 StaticWQKmsState: Also spawn RelativePoint and CrossSectionFacet .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2126
diff changeset
115 wkmsName);
5a2c7d24fd29 StaticWQKmsState: Also spawn RelativePoint and CrossSectionFacet .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2126
diff changeset
116 facets.add(csFacet);
5a2c7d24fd29 StaticWQKmsState: Also spawn RelativePoint and CrossSectionFacet .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2126
diff changeset
117
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
118 Facet wfacet = new WQKmsFacet(
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
119 STATIC_WQKMS_W,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
120 wkmsName
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
121 /*
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
122 // TODO re-enable translations.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
123 Resources.getMsg(
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
124 metaLocale,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
125 wkmsName,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
126 wkmsName)*/);
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
127 facets.add(wfacet);
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
128
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
129 return res;
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
130 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
131
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
132
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
133 /**
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
134 * Get data, create the facets.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
135 *
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
136 * @param context Ignored.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
137 */
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
138 @Override
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
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,
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
141 String hash,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
142 CallContext context,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
143 List<Facet> facets,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
144 Object old
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
145 ) {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
146 return compute((StaticWQKmsArtifact) artifact, context.getMeta(),
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
147 hash, facets, old);
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
148 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
149
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
150
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
151 /**
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
152 * Create the facets.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
153 * @param context Ignored.
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
154 */
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
155 @Override
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
156 public Object computeInit(
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
157 D4EArtifact artifact,
2124
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
158 String hash,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
159 Object context,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
160 CallMeta meta,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
161 List<Facet> facets
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
162 ) {
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
163 return compute((StaticWQKmsArtifact) artifact, meta, hash, facets,
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
164 null);
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
165 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
166 }
a202a9e048a5 Made StaticWQKmsArtifact a fully featured Artifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
167 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org