Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/GaugeDischargeState.java @ 2732:7311d0336600
Adjusted dc conf.
flys-artifacts/trunk@4465 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 22 May 2012 19:42:54 +0000 |
parents | 5ce5abd173b9 |
children | 89731cb8c385 |
rev | line source |
---|---|
2723
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
3 import java.util.List; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
4 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 import org.apache.log4j.Logger; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.CallMeta; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
8 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifactdatabase.state.Facet; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.artifacts.FLYSArtifact; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 import de.intevation.flys.artifacts.model.GaugeDischargeFacet; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.flys.artifacts.model.FacetTypes; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.flys.artifacts.resources.Resources; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 /** |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 * The only state for an GaugeDischargeState (River and km known). |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
21 */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 public class GaugeDischargeState |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 extends DefaultState |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
24 implements FacetTypes |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 { |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 /** Developer-centric description of facet. */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 public static final String I18N_DESCRIPTION = "facet.discharge.curve"; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 /** The logger that is used in this state. */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 private static final Logger logger = Logger.getLogger(GaugeDischargeState.class); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 /** |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 * Add an GaugeDischargeFacet to list of Facets. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 * |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
36 * @param artifact Ignored. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
37 * @param hash Ignored. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
38 * @param context Ignored. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
39 * @param meta CallMeta to be used for internationalization. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
40 * @param facets List to add AnnotationFacet to. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 * |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
42 * @return null. |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 */ |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 @Override |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 public Object computeInit( |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
46 FLYSArtifact artifact, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
47 String hash, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
48 Object context, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 CallMeta meta, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
50 List<Facet> facets |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
51 ) { |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
52 logger.debug("GaugeDischargeState.computeInit()"); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
53 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
54 // TODO caching, / CalculationResultusage |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
55 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
56 GaugeDischargeFacet facet = new GaugeDischargeFacet( |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
57 0, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 DISCHARGE_CURVE, |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 DISCHARGE_CURVE); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
60 //Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION)); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
61 facets.add(facet); |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
62 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
63 return null; |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
64 } |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
65 // computeAdvance |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
66 //WINFOArtifact#getDischargeCurveData |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
67 |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
68 } |
5ce5abd173b9
Added skeleton for gauge discharge curves.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
69 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |