Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java @ 3902:da48e33f4241
Removed trailing whitespace.
flys-artifacts/trunk@5567 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 22 Sep 2012 07:47:12 +0000 |
parents | deeda39ef01b |
children | de6e2b933f33 |
rev | line source |
---|---|
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
2196
5f3726f31f00
"Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2125
diff
changeset
|
3 import de.intevation.artifactdatabase.state.Facet; |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import de.intevation.artifacts.Artifact; |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.artifacts.CallContext; |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
2122
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
8 import de.intevation.flys.artifacts.FLYSArtifact; |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 |
697
b972eba2ed8a
Removed ComputeCallback because this was thought too complicated. Fixed issue with facets not be re-generated if same state is entered again.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
696
diff
changeset
|
10 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
3596
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
11 import de.intevation.flys.artifacts.math.Linear; |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
2196
5f3726f31f00
"Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2125
diff
changeset
|
13 import org.apache.log4j.Logger; |
2017
e384d78ff78b
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1721
diff
changeset
|
14 |
1721
eb35570df0e8
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1136
diff
changeset
|
15 /** |
eb35570df0e8
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1136
diff
changeset
|
16 * Facet of a Waterlevel (WQKms). |
eb35570df0e8
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1136
diff
changeset
|
17 */ |
2122
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
18 public class WaterlevelFacet extends DataFacet { |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 private static Logger logger = Logger.getLogger(WaterlevelFacet.class); |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 public WaterlevelFacet(int index, String name, String description) { |
2122
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
23 super(index, name, description, ComputeType.ADVANCE, null, null); |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 } |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
722
4800230fba8a
Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
709
diff
changeset
|
26 public WaterlevelFacet( |
742
c09c9e05ecfa
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
722
diff
changeset
|
27 int index, |
c09c9e05ecfa
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
722
diff
changeset
|
28 String name, |
722
4800230fba8a
Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
709
diff
changeset
|
29 String description, |
4800230fba8a
Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
709
diff
changeset
|
30 ComputeType type, |
4800230fba8a
Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
709
diff
changeset
|
31 String stateID, |
4800230fba8a
Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
709
diff
changeset
|
32 String hash |
4800230fba8a
Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
709
diff
changeset
|
33 ) { |
2125
7a8f52267a5c
Fix stateId/hash assignment in WaterlevelFacet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2122
diff
changeset
|
34 super(index, name, description, type, hash, stateID); |
2122
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
35 } |
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
36 |
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
37 public WaterlevelFacet() { |
722
4800230fba8a
Improved situtation on rendering "Abflusskurve am Pegel". Not fully working, yet.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
709
diff
changeset
|
38 } |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 |
3461
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3455
diff
changeset
|
40 protected WQKms [] getWQKms(CalculationResult res) { |
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3455
diff
changeset
|
41 return (WQKms [])res.getData(); |
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3455
diff
changeset
|
42 } |
1136
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
43 |
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
44 /** |
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
45 * Get waterlevel data. |
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
46 * @return a WQKms at given index. |
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
47 */ |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 public Object getData(Artifact artifact, CallContext context) { |
2196
5f3726f31f00
"Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2125
diff
changeset
|
49 |
5f3726f31f00
"Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2125
diff
changeset
|
50 if (logger.isDebugEnabled()) { |
5f3726f31f00
"Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2125
diff
changeset
|
51 logger.debug("Get data for waterlevels at index: " + index + |
5f3726f31f00
"Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2125
diff
changeset
|
52 " /stateId: " + stateId); |
5f3726f31f00
"Bezugslinienverfahren": Added facet classes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2125
diff
changeset
|
53 } |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
3455
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
55 FLYSArtifact winfo = (FLYSArtifact) artifact; |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
709
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
705
diff
changeset
|
57 CalculationResult res = (CalculationResult) |
2122
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
58 winfo.compute(context, hash, stateId, type, false); |
709
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
705
diff
changeset
|
59 |
3455
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
60 if (res == null) { |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
61 logger.error("WaterlevelFacet.getData: null result"); |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
62 return null; |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
63 } |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
64 |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
65 if (winfo == null) { |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
66 logger.error("WaterlevelFacet.getData: artifact is null"); |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
67 return null; |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
68 } |
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
69 |
3461
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3455
diff
changeset
|
70 WQKms [] wqkms = getWQKms(res); |
3597
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
71 Object KM = context.getContextValue("currentKm"); |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
72 if (KM != null) { |
3596
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
73 logger.debug("interpolate at given km"); |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
74 // TODO handle exact match. |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
75 |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
76 WQKms wqkmsI = wqkms[index]; |
3597
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
77 double km = (Double)KM; |
3596
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
78 |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
79 // TODO employ DataUtils interface to TDoubleArraList |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
80 int size = wqkmsI.size(); |
3597
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
81 boolean kmIncreasing = wqkmsI.getKm(0) < wqkmsI.getKm(size-1); |
3596
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
82 int mod = kmIncreasing ? +1 : -1; |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
83 int idx = 0; |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
84 if (!kmIncreasing) { |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
85 while (idx < size && wqkmsI.getKm(idx) < km) { |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
86 idx++; |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
87 } |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
88 } |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
89 else { |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
90 idx = size-1; |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
91 while (idx > 0 && wqkmsI.getKm(idx) > km) { |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
92 idx--; |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
93 } |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
94 } |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
95 WQKms resultWQKms = new WQKms(); |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
96 if (idx != -1 && idx < size) { |
3597
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
97 double inW = Linear.linear( |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
98 km, |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
99 wqkmsI.getKm(idx), wqkmsI.getKm(idx-mod), |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
100 wqkmsI.getW(idx), wqkmsI.getW(idx-mod)); |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
101 double inQ = Linear.linear( |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
102 km, |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
103 wqkmsI.getKm(idx), wqkmsI.getKm(idx-mod), |
deeda39ef01b
Shortend overlong line. Simplified code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3596
diff
changeset
|
104 wqkmsI.getQ(idx), wqkmsI.getQ(idx-mod)); |
3596
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
105 resultWQKms.add(inW, inQ, km); |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
106 } |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
107 return resultWQKms; |
6aea625190da
Handle former W calculations in fixA W/Q out.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3461
diff
changeset
|
108 } |
3455
1de62ac261f7
Let WaterlevelFacet handle FixationArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2196
diff
changeset
|
109 |
3461
1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3455
diff
changeset
|
110 return wqkms != null ? wqkms[index] : null; |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 } |
1061
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
742
diff
changeset
|
112 |
1136
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
113 |
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
114 /** Copy deeply. */ |
8da5f5a9ed3c
Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1117
diff
changeset
|
115 @Override |
1061
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
742
diff
changeset
|
116 public Facet deepCopy() { |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
742
diff
changeset
|
117 WaterlevelFacet copy = new WaterlevelFacet(); |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
742
diff
changeset
|
118 copy.set(this); |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
742
diff
changeset
|
119 copy.type = type; |
2125
7a8f52267a5c
Fix stateId/hash assignment in WaterlevelFacet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2122
diff
changeset
|
120 copy.hash = hash; |
2122
81312f84689a
Refactored to easier enjoy benefits of caching.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2026
diff
changeset
|
121 copy.stateId = stateId; |
1061
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
742
diff
changeset
|
122 return copy; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
742
diff
changeset
|
123 } |
696
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 } |
708b270dfd30
OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |