annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java @ 9726:0a5239a1e46e 3.2.x

Upgrade to Log4j 2
author Tom Gottfried <tom@intevation.de>
date Wed, 02 Mar 2022 10:26:50 +0100
parents 9ab967eb2c51
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: 4826
diff changeset
9 package org.dive4elements.river.artifacts.states;
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
11 import java.util.ArrayList;
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import java.util.List;
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8295
diff changeset
14 import org.apache.logging.log4j.Logger;
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8295
diff changeset
15 import org.apache.logging.log4j.LogManager;
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4826
diff changeset
17 import org.dive4elements.artifacts.CallContext;
8292
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
18 import org.dive4elements.artifacts.Artifact;
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4826
diff changeset
20 import org.dive4elements.artifactdatabase.state.Facet;
8292
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
21 import org.dive4elements.artifactdatabase.state.FacetActivity;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4826
diff changeset
22
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
23 import org.dive4elements.river.artifacts.D4EArtifact;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4826
diff changeset
24 import org.dive4elements.river.artifacts.access.BedHeightAccess;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4826
diff changeset
25 import org.dive4elements.river.artifacts.model.CalculationResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4826
diff changeset
26 import org.dive4elements.river.artifacts.model.DataFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4826
diff changeset
27 import org.dive4elements.river.artifacts.model.FacetTypes;
7983
62befca02480 Moved MiddleBedHeight classes to minfo package. Facet now returns double[][] data.
Raimund Renkert <rrenkert@intevation.de>
parents: 6101
diff changeset
28 import org.dive4elements.river.artifacts.model.minfo.MiddleBedHeightCalculation;
62befca02480 Moved MiddleBedHeight classes to minfo package. Facet now returns double[][] data.
Raimund Renkert <rrenkert@intevation.de>
parents: 6101
diff changeset
29 import org.dive4elements.river.artifacts.model.minfo.MiddleBedHeightData;
62befca02480 Moved MiddleBedHeight classes to minfo package. Facet now returns double[][] data.
Raimund Renkert <rrenkert@intevation.de>
parents: 6101
diff changeset
30 import org.dive4elements.river.artifacts.model.minfo.MiddleBedHeightFacet;
7998
92c57cdbd94b Fixed i18n strings.
Raimund Renkert <rrenkert@intevation.de>
parents: 7989
diff changeset
31 import org.dive4elements.river.artifacts.resources.Resources;
7989
98e25342df73 Add units as meta data to middle bed height facets.
Raimund Renkert <rrenkert@intevation.de>
parents: 7983
diff changeset
32 import org.dive4elements.river.model.River;
98e25342df73 Add units as meta data to middle bed height facets.
Raimund Renkert <rrenkert@intevation.de>
parents: 7983
diff changeset
33 import org.dive4elements.river.model.Unit;
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35
4582
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3232
diff changeset
36 /** State in which Middle Bed Heights are generated. */
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
37 public class MiddleBedHeight extends DefaultState implements FacetTypes {
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8000
diff changeset
39 /** Private log. */
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8295
diff changeset
40 private static final Logger log = LogManager.getLogger(MiddleBedHeight.class);
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 @Override
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 public Object computeAdvance(
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
45 D4EArtifact artifact,
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 String hash,
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 CallContext context,
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 List<Facet> facets,
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 Object old
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 ) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8000
diff changeset
51 log.debug("MiddleBedHeight.computeAdvance");
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
53 List<Facet> newFacets = new ArrayList<Facet>();
3232
cdbc457e23e2 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3230
diff changeset
54
6101
a0078e5e3b39 Removed unused context from RangeAccess and subclasses leading to some dead code removal.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5997
diff changeset
55 BedHeightAccess access = new BedHeightAccess(artifact);
7989
98e25342df73 Add units as meta data to middle bed height facets.
Raimund Renkert <rrenkert@intevation.de>
parents: 7983
diff changeset
56 River river = access.getRiver();
98e25342df73 Add units as meta data to middle bed height facets.
Raimund Renkert <rrenkert@intevation.de>
parents: 7983
diff changeset
57 Unit u = river.getWstUnit();
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
59 CalculationResult res = old instanceof CalculationResult
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
60 ? (CalculationResult) old
3230
b888c5eb65b3 Added new *Access objects for bed height calculation and flow velocity calculation; removed methods for specific data access from MINFOArtifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2715
diff changeset
61 : new MiddleBedHeightCalculation().calculate(access);
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
62
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
63 if (facets == null || res == null) {
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
64 return res;
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
65 }
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
66
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
67 MiddleBedHeightData[] data = (MiddleBedHeightData[]) res.getData();
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
68
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8000
diff changeset
69 log.debug("Calculated " + data.length + " MiddleBedHeightData objects");
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
70
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
71 String id = getID();
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
72 int idx = 0;
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
73
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
74 for (MiddleBedHeightData d: data) {
8295
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
75 MiddleBedHeightFacet mf = new MiddleBedHeightFacet(
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
76 idx,
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
77 MIDDLE_BED_HEIGHT_SINGLE,
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
78 d.getDescription(),
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
79 ComputeType.ADVANCE,
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
80 id,
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
81 hash
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
82 );
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
83 mf.addMetaData(Resources.getMsg(
8000
928891df0173 Translate csv meta data lines in middle bed height chart export.
Raimund Renkert <rrenkert@intevation.de>
parents: 7998
diff changeset
84 context.getMeta(),
8267
99912f51468d A bit less chaos in i18n for bed heights.
"Tom Gottfried <tom@intevation.de>"
parents: 8202
diff changeset
85 "meta.bedheight.cur.elevation",
8000
928891df0173 Translate csv meta data lines in middle bed height chart export.
Raimund Renkert <rrenkert@intevation.de>
parents: 7998
diff changeset
86 "Current elevation model"),
8295
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
87 d.getCurElevationModel());
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
88 mf.addMetaData(Resources.getMsg(
8000
928891df0173 Translate csv meta data lines in middle bed height chart export.
Raimund Renkert <rrenkert@intevation.de>
parents: 7998
diff changeset
89 context.getMeta(),
8267
99912f51468d A bit less chaos in i18n for bed heights.
"Tom Gottfried <tom@intevation.de>"
parents: 8202
diff changeset
90 "meta.bedheight.old.elevation",
8000
928891df0173 Translate csv meta data lines in middle bed height chart export.
Raimund Renkert <rrenkert@intevation.de>
parents: 7998
diff changeset
91 "Old elevation model"),
8295
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
92 d.getOldElevationModel());
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
93 mf.addMetaData(Resources.getMsg(
8000
928891df0173 Translate csv meta data lines in middle bed height chart export.
Raimund Renkert <rrenkert@intevation.de>
parents: 7998
diff changeset
94 context.getMeta(),
8267
99912f51468d A bit less chaos in i18n for bed heights.
"Tom Gottfried <tom@intevation.de>"
parents: 8202
diff changeset
95 "meta.bedheight.river.elevation",
8000
928891df0173 Translate csv meta data lines in middle bed height chart export.
Raimund Renkert <rrenkert@intevation.de>
parents: 7998
diff changeset
96 "River elevation model"), u.getName());
8295
9ab967eb2c51 At least since rev eb052d759fcc, there are no bed height epochs anymore.
"Tom Gottfried <tom@intevation.de>"
parents: 8292
diff changeset
97 newFacets.add(mf);
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
98
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
99 idx++;
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
100 }
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
101
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
102 Facet csv = new DataFacet(
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
103 CSV, "CSV data", ComputeType.ADVANCE, hash, id);
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
104
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
105 // TODO ADD PDF FACET
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
106
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
107 newFacets.add(csv);
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
108
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 8000
diff changeset
109 log.debug("Created " + newFacets.size() + " new Facets.");
2713
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
110
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
111 facets.addAll(newFacets);
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
112
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
113 return res;
b60751cfdd6c Start MINFO middle bed height calculation in the relevant state and creates facets for chart and csv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2709
diff changeset
114 }
8292
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
115
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
116 static {
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
117 // Active/deactivate facets.
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
118 FacetActivity.Registry.getInstance().register(
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
119 "minfo",
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
120 new FacetActivity() {
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
121 @Override
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
122 public Boolean isInitialActive(
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
123 Artifact artifact,
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
124 Facet facet,
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
125 String output
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
126 ) {
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
127 if (facet.getName().equals(MIDDLE_BED_HEIGHT_SINGLE)) {
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
128 return Boolean.TRUE;
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
129 }
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
130 return null;
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
131 }
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
132 });
86e532106abb Set facet activity for middle bed height.
"Tom Gottfried <tom@intevation.de>"
parents: 8267
diff changeset
133 }
2709
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
134 }
cd6bcca17de6 Added states and improved transition model for MINFO middle bed height calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
135 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org