annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelPairSelectState.java @ 1173:2490d6ef394e

Extended WDifferences bracnh of WINFO to have calculation in dedicated, new state. flys-artifacts/trunk@2753 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 15 Sep 2011 07:39:36 +0000
parents
children 70b8ac64404b
rev   line source
1173
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.states;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 import java.util.List;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
5 import org.apache.log4j.Logger;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
6
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 import de.intevation.artifacts.CallContext;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
8
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9 import de.intevation.artifactdatabase.state.Facet;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import de.intevation.flys.artifacts.FLYSArtifact;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 import de.intevation.flys.artifacts.WINFOArtifact;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14 import de.intevation.flys.artifacts.math.WKmsOperation;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16 import de.intevation.flys.artifacts.model.FacetTypes;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 import de.intevation.flys.artifacts.model.WKms;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18 import de.intevation.flys.artifacts.model.WQKms;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20 import de.intevation.flys.artifacts.model.DataFacet;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21 import de.intevation.flys.artifacts.model.WaterlevelFacet;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23 import de.intevation.flys.utils.FLYSUtils;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25 import net.sf.json.JSONObject;
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
26
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27 public class WaterlevelPairSelectState
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
28 extends DefaultState
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
29 implements FacetTypes
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30 {
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31 /** The logger that is used in this state. */
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32 private static Logger logger = Logger.getLogger(WaterlevelPairSelectState.class);
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34 public WaterlevelPairSelectState() {
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 }
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38 /** Specify to display a datacage_twin_panel. */
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39 @Override
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40 protected String getUIProvider() {
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41 return "datacage_twin_panel";
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42 }
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 @Override
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46 public Object computeAdvance(
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 FLYSArtifact artifact,
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48 String hash,
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49 CallContext context,
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50 List<Facet> facets,
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51 Object old
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 ) {
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53 //Get data and do stuff, do not calculate
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54 //JSONObject jsonObject = new JSONObject().accumulate("string", 2.0f);
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
55 return "";
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
56 }
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57 }
2490d6ef394e Extended WDifferences bracnh of WINFO to have calculation in dedicated,
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org