Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java @ 7471:fff862f4ef76
Experimental caching of datacage recommendations. The respective hook is called a lot and running the datacage over and over again when loading data can be expensive. So the generated recommendations are cached for some time.
Hopefully this improves the overall speed of loading data from the datacage.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 30 Oct 2013 15:26:21 +0100 |
parents | 8ba53c5b86a7 |
children | 20b1cfa1e005 |
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:
4497
diff
changeset
|
9 package org.dive4elements.river.artifacts; |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 |
6944
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
11 import java.text.DateFormat; |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
12 |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 import java.util.ArrayList; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 import java.util.List; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
15 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 import org.apache.log4j.Logger; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 import org.w3c.dom.Document; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
19 import org.dive4elements.artifactdatabase.state.DefaultOutput; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
20 import org.dive4elements.artifactdatabase.state.Facet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
21 import org.dive4elements.artifactdatabase.state.FacetActivity; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
22 import org.dive4elements.artifactdatabase.state.State; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
23 import org.dive4elements.artifacts.Artifact; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
24 import org.dive4elements.artifacts.ArtifactFactory; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
25 import org.dive4elements.artifacts.CallMeta; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
26 import org.dive4elements.artifacts.common.utils.XMLUtils; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
27 import org.dive4elements.river.model.FlowVelocityMeasurementValue; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
28 import org.dive4elements.river.artifacts.model.minfo.FlowVelocityMeasurementFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
29 import org.dive4elements.river.artifacts.model.minfo.FlowVelocityMeasurementFactory; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
30 import org.dive4elements.river.artifacts.states.StaticState; |
7397
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
31 import org.dive4elements.river.artifacts.states.FlowVelocityState; |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4497
diff
changeset
|
33 import org.dive4elements.river.artifacts.model.FacetTypes; |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 |
7397
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
35 import org.dive4elements.river.artifacts.resources.Resources; |
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
36 |
6944
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
37 import org.dive4elements.river.utils.Formatter; |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
38 |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
39 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
40 /** Artefact to access flow velocity measurements. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 public class FlowVelocityMeasurementArtifact |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
42 extends StaticD4EArtifact |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 implements FacetTypes |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 /** The logger for this class. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
46 private static Logger logger = |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
47 Logger.getLogger(FlowVelocityMeasurementArtifact.class); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
48 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 /** Artifact key name. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
50 private static final String NAME = "flowvelocitymeasurement"; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
51 |
7397
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
52 public static final String I18N_WATERLEVEL_FACET = |
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
53 "facet.flow_velocity.waterlevel"; |
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
54 |
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
55 public static final String I18N_VELOCITY_FACET = |
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
56 "facet.flow_velocity.velocity"; |
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
57 |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 /** Spawn only inactive facets. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 static { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
60 // TODO: Move to configuration. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
61 FacetActivity.Registry.getInstance() |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
62 .register(NAME, FacetActivity.INACTIVE); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
63 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
64 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
65 /** Need to give the state an id. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
66 public static final String STATIC_STATE_NAME = |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
67 "state.flowvelocitymeasurement.static"; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
68 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
69 /** One and only state to be in. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
70 protected transient State state = null; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
71 |
4464
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
72 protected String DATA_NAME = "ID"; |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
73 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
74 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
75 * Trivial Constructor. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
76 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
77 public FlowVelocityMeasurementArtifact() { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
78 logger.debug("FlowVelocityMeasurementArtifact.FlowVelocityMeasurementArtifact"); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
79 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
80 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
81 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
82 /** Get artifact key name. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
83 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
84 public String getName() { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
85 return NAME; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
86 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
87 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
88 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
89 /** Create a new state with bogus output. */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
90 protected State spawnState() { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
91 state = new StaticState(STATIC_STATE_NAME); |
4497
a2735a4bf75e
Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4483
diff
changeset
|
92 List<Facet> fs = getFacets(STATIC_STATE_NAME); |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
93 DefaultOutput output = new DefaultOutput( |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
94 "general", |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
95 "general", |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
96 "image/png", |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
97 fs, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
98 "chart"); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
99 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
100 state.getOutputs().add(output); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
101 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
102 return state; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
103 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
104 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
105 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
106 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
107 * Gets called from factory, to set things up. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
108 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
109 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
110 public void setup( |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
111 String identifier, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
112 ArtifactFactory factory, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
113 Object context, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
114 CallMeta callMeta, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
115 Document data) |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
116 { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
117 logger.debug("FlowVelocityMeasurementArtifact.setup"); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
118 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
119 state = new StaticState(STATIC_STATE_NAME); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
120 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
121 if (logger.isDebugEnabled()) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
122 logger.debug(XMLUtils.toString(data)); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
123 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
124 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
125 List<Facet> fs = new ArrayList<Facet>(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
126 String code = getDatacageIDValue(data); |
6944
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
127 DateFormat dateFormatter = Formatter.getDateFormatter( |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
128 callMeta, "dd.MM.yyy HH:mm"); |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
129 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
130 if (code != null) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
131 // parse code, interact with factory, add real facets. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
132 // store relevant parts of code as data. |
6944
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
133 FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
134 flowVelocityMeasurement = |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
135 FlowVelocityMeasurementFactory.getFlowVelocityMeasurement( |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
136 Integer.parseInt(code)); |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
137 String name = flowVelocityMeasurement.getDescription(); |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
138 logger.debug ("datetime " + flowVelocityMeasurement.getDatetime()); |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
139 name += " - " + dateFormatter.format( |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
140 flowVelocityMeasurement.getDatetime()); |
602dac32a996
issue957: Better name for flowvelocity measured values facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6942
diff
changeset
|
141 |
7290
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
142 Facet vFacet = new FlowVelocityMeasurementFacet( |
4464
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
143 FLOW_VELOCITY_MEASUREMENT, |
7397
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
144 Resources.getMsg(callMeta, I18N_WATERLEVEL_FACET, FlowVelocityState.I18N_TAU_FACET, new Object[] { name})); |
7290
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
145 fs.add(vFacet); |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
146 |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
147 Facet qFacet = new FlowVelocityMeasurementFacet( |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
148 FLOW_VELOCITY_DISCHARGE, |
7397
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
149 Resources.getMsg(callMeta, FlowVelocityState.I18N_DISCHARGE_FACET, FlowVelocityState.I18N_DISCHARGE_FACET, new Object[] { name})); |
7290
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
150 fs.add(qFacet); |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
151 |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
152 Facet wFacet = new FlowVelocityMeasurementFacet( |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
153 FLOW_VELOCITY_WATERLEVEL, |
7397
8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7366
diff
changeset
|
154 Resources.getMsg(callMeta, I18N_VELOCITY_FACET, FlowVelocityState.I18N_TAU_FACET, new Object[] { name})); |
7290
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
155 fs.add(wFacet); |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
156 |
4497
a2735a4bf75e
Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4483
diff
changeset
|
157 addFacets(state.getID(), fs); |
4464
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
158 addStringData(DATA_NAME, code); |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
159 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
160 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
161 spawnState(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
162 super.setup(identifier, factory, context, callMeta, data); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
163 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
164 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
165 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
166 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
167 * Get a list containing the one and only State. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
168 * @param context ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
169 * @return list with one and only state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
170 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
171 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
172 protected List<State> getStates(Object context) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
173 ArrayList<State> states = new ArrayList<State>(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
174 states.add(getState()); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
175 return states; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
176 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
177 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
178 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
179 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
180 * Get the "current" state (there is but one). |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
181 * @param cc ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
182 * @return the "current" (only possible) state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
183 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
184 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
185 public State getCurrentState(Object cc) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
186 return getState(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
187 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
188 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
189 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
190 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
191 * Get the only possible state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
192 * @return the state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
193 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
194 protected State getState() { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
195 return getState(null, null); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
196 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
197 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
198 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
199 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
200 * Get the state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
201 * @param context ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
202 * @param stateID ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
203 * @return the state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
204 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
205 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
206 protected State getState(Object context, String stateID) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
207 return (state != null) |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
208 ? state |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
209 : spawnState(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
210 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
211 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
212 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
213 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
214 * Called via setup. Overridden to avoid cloning all data. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
215 * |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
216 * @param artifact The master-artifact. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
217 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
218 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
219 protected void initialize( |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
220 Artifact artifact, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
221 Object context, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
222 CallMeta meta) |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
223 { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
224 logger.debug("initialize"); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
225 } |
4464
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
226 |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
227 |
7366
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
228 /** |
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
229 * Get the db-unbound flow velocity measurement value with given |
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
230 * id. |
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
231 */ |
4464
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
232 public FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
233 getFlowVelocityMeasurementValue() |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
234 { |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
235 return FlowVelocityMeasurementFactory.getFlowVelocityMeasurement( |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
236 Integer.parseInt(getDataAsString(DATA_NAME))); |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4452
diff
changeset
|
237 } |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
238 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
239 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |