Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/ExtremeCurveFacet.java @ 4357:11cf29eb002c
FacetTypes: New type: exreme_wq_curve_base (for the Stuetz-Q-Poits).
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 02 Nov 2012 11:58:11 +0100 |
parents | b0173cdbbe51 |
children | 2f01b47aa5c2 |
rev | line source |
---|---|
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model.extreme; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
3 import de.intevation.artifacts.Artifact; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
4 import de.intevation.artifacts.CallContext; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.flys.artifacts.FLYSArtifact; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
8 import de.intevation.flys.artifacts.access.ExtremeAccess; |
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.flys.artifacts.model.CalculationResult; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.artifacts.model.DataFacet; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.flys.artifacts.model.FacetTypes; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.flys.utils.KMIndex; |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
17 import de.intevation.flys.utils.DoubleUtil; |
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 import org.apache.log4j.Logger; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
21 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 * Facet to show the W|Q values. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
24 public class ExtremeCurveFacet |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 extends DataFacet |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 implements FacetTypes { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 /** House logger. */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 private static Logger logger = Logger.getLogger(ExtremeCurveFacet.class); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 /** Trivial Constructor. */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 public ExtremeCurveFacet() { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
36 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
37 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
38 * @param description Description of the facet. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
39 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
40 public ExtremeCurveFacet(String description) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 super(0, EXTREME_WQ_CURVE, description, ComputeType.ADVANCE, null, null); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
42 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 public ExtremeCurveFacet(int index, String description) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
46 super(index, EXTREME_WQ_CURVE, description, ComputeType.ADVANCE, null, null); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
47 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
48 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
50 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
51 * Returns the data (a curve/function) this facet provides at km given in context. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
52 * |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
53 * @param artifact the owner artifact. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
54 * @param context the CallContext. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
55 * |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
56 * @return the data. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
57 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 @Override |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 public Object getData(Artifact artifact, CallContext context) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
60 logger.debug("ExtremeCurveFacet.getData"); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
61 if (artifact instanceof FLYSArtifact) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
62 FLYSArtifact flys = (FLYSArtifact)artifact; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
63 CalculationResult res = |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
64 (CalculationResult) flys.compute(context, |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
65 ComputeType.ADVANCE, |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
66 false); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
67 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
68 ExtremeResult result = (ExtremeResult) res.getData(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
69 double currentKm = |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
70 ((Double)context.getContextValue("currentKm")).doubleValue(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
71 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
72 KMIndex<Curve> curves = result.getCurves(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
73 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
74 KMIndex.Entry<Curve> curveEntry = curves.search(currentKm); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
75 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
76 if (curveEntry != null) { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
77 logger.debug("A curve at km = " + currentKm); |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
78 Curve c = curveEntry.getValue(); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
79 // Find segment in which the curr. km is located. |
4338
88064d351bcc
ExtremeCurveFacet: Moved allocation of Access object to where its needed.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4336
diff
changeset
|
80 ExtremeAccess access = new ExtremeAccess(flys); |
88064d351bcc
ExtremeCurveFacet: Moved allocation of Access object to where its needed.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4336
diff
changeset
|
81 |
4336
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
82 double[] ds = access.getValuesForRange(currentKm); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
83 |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
84 if (ds != null) { |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
85 double m = DoubleUtil.maxInArray(ds); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
86 // Add 5 percent. |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
87 m *= 1.05d; |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
88 c.setSuggestedMaxQ(m); |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
89 } |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
90 |
09993be04c5e
ExtremeCurveFacet: Set suggestedMaxQ in curve to be max value in segment + 5%.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4314
diff
changeset
|
91 return c; |
4314
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
92 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
93 else { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
94 logger.debug("No curve at km = " + currentKm); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
95 return null; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
96 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
97 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
98 else { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
99 logger.debug("Not an instance of FLYSArtifact / WINFOArtifact."); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
100 return null; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
101 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
102 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
103 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
104 |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
105 /** |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
106 * Create a deep copy of this Facet. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
107 * @return a deep copy. |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
108 */ |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
109 @Override |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
110 public ExtremeCurveFacet deepCopy() { |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
111 ExtremeCurveFacet copy = new ExtremeCurveFacet(); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
112 copy.set(this); |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
113 return copy; |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
114 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
115 } |
8132b1a53539
ExtremeCurveFacet: New Facet to access Extreme Curves at given km.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
116 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |