annotate artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java @ 9801:1d7a72a50183 3.2.x tip

Assume Compose V2, consistently
author Tom Gottfried <tom@intevation.de>
date Thu, 23 Nov 2023 10:14:13 +0100
parents 0a5239a1e46e
children
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: 4497
diff changeset
9 package org.dive4elements.river.artifacts;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import java.util.ArrayList;
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 import java.util.List;
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8856
diff changeset
14 import org.apache.logging.log4j.Logger;
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8856
diff changeset
15 import org.apache.logging.log4j.LogManager;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 import org.w3c.dom.Document;
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
19 import org.dive4elements.artifactdatabase.state.Facet;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
21 import org.dive4elements.artifacts.Artifact;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
22 import org.dive4elements.artifacts.ArtifactFactory;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
23 import org.dive4elements.artifacts.CallMeta;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
24 import org.dive4elements.artifacts.CallContext;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
26 import org.dive4elements.river.artifacts.model.GaugeFinder;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
27 import org.dive4elements.river.artifacts.model.GaugeFinderFactory;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
28 import org.dive4elements.river.artifacts.model.GaugeRange;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
29 import org.dive4elements.river.artifacts.model.NamedDouble;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
31 import org.dive4elements.river.artifacts.services.FixingsKMChartService;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
33 import org.dive4elements.river.artifacts.states.DefaultState;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
34
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
35 import org.dive4elements.river.artifacts.resources.Resources;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38 /**
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39 * Artifact to produce sector markers.
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40 */
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41 public class QSectorArtifact
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
42 extends StaticD4EArtifact
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
44 /** The log for this class. */
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8856
diff changeset
45 private static Logger log = LogManager.getLogger(QSectorArtifact.class);
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 /** The name of the artifact. */
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48 public static final String ARTIFACT_NAME = "qsector";
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51 /**
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 * Trivial Constructor.
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53 */
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54 public QSectorArtifact() {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
55 log.debug("QSectorArtifact.QSectorArtifact()");
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
56 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
59 /**
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
60 * Gets called from factory, to set things up.
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
61 */
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
62 @Override
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
63 public void setup(
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
64 String identifier,
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
65 ArtifactFactory factory,
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
66 Object context,
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
67 CallMeta callMeta,
7842
8d5ca5175038 Updated signature of artifacts setup method; Removed unnecessary setup overrides.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
68 Document data,
8d5ca5175038 Updated signature of artifacts setup method; Removed unnecessary setup overrides.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
69 List<Class> loadFacets)
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
70 {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
71 log.debug("QSectorArtifact.setup");
7842
8d5ca5175038 Updated signature of artifacts setup method; Removed unnecessary setup overrides.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
72 super.setup(identifier, factory, context, callMeta, data, loadFacets);
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
73 initialize(null, context, callMeta);
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
74 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
75
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
76
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
77 /** Return the name of this artifact. */
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
78 public String getName() {
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
79 return ARTIFACT_NAME;
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
80 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
81
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
82
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
83 /** Get list of NamedDouble s (QSectors). */
3576
6442f317a0c7 i18n and renderering of qsectors in w/q diag.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3573
diff changeset
84 public Object getQSectors(double km, CallContext context) {
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
85
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
86 String river = getDataAsString("river");
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
87 List<NamedDouble> qsectors = new ArrayList<NamedDouble>();
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
88
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
89 GaugeFinderFactory ggf = GaugeFinderFactory.getInstance();
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
90 GaugeFinder gf = ggf.getGaugeFinder(river);
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
91
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
92 if (gf == null) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
93 log.warn("No gauge finder found for river '" + river + "'");
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
94 return null;
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
95 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
96
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
97 GaugeRange gr = gf.find(km);
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
98 if (gr == null) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
99 log.debug("No gauge range found for km "
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
100 + km + " on river " + river + ".");
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
101 return null;
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
102 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
103
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
104 if (log.isDebugEnabled()) {
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
105 log.debug(gr);
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
106 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
107
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
108 for (int i = 0;
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
109 i < FixingsKMChartService.I18N_Q_SECTOR_BOARDERS.length;
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
110 ++i
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
111 ) {
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
112 String key = FixingsKMChartService.I18N_Q_SECTOR_BOARDERS[i];
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
113 String def = FixingsKMChartService.DEFAULT_Q_SECTOR_BORDERS[i];
3576
6442f317a0c7 i18n and renderering of qsectors in w/q diag.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3573
diff changeset
114 String label = Resources.getMsg(context.getMeta(), key, def);
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
115
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
116 qsectors.add(new NamedDouble(label, gr.getSectorBorder(i)));
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
117 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
118
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
119 return qsectors;
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
120 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
121
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
122
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
123 /** Setup state and facet. */
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
124 @Override
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
125 protected void initialize(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
126 Artifact artifact,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
127 Object context,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
128 CallMeta meta
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
129 ) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
130 log.debug("QSectorArtifact.initialize");
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
131 List<Facet> fs = new ArrayList<Facet>();
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
132
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
133 D4EArtifact flys = (D4EArtifact) artifact;
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
134 importData(flys, "river");
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
135
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
136 DefaultState state = (DefaultState) getCurrentState(context);
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
137 state.computeInit(this, hash(), context, meta, fs);
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
138 if (!fs.isEmpty()) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
139 log.debug("Facets to add in QSectorArtifact.initialize .");
4497
a2735a4bf75e Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents: 3774
diff changeset
140 addFacets(getCurrentStateId(), fs);
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
141 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
142 else {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
143 log.debug("No facets to add in QSectorArtifact.initialize ("
3573
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
144 + state.getID() + ").");
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
145 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
146 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
147 }
374c2d70b982 Added stub of QSector-Artifact-infrastructure.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
148 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org