Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java @ 7676:da412a6c4f39
Cosmetics, doc.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 09 Dec 2013 10:31:24 +0100 |
parents | a338ad099c7a |
children | 8d5ca5175038 |
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, |
7533
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
144 Resources.getMsg(callMeta, |
7543
a338ad099c7a
issue1762: correct facet names.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7533
diff
changeset
|
145 I18N_VELOCITY_FACET, |
7533
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
146 FlowVelocityState.I18N_TAU_FACET, |
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
147 new Object[] { name })); |
7290
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
148 fs.add(vFacet); |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
149 |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
150 Facet qFacet = new FlowVelocityMeasurementFacet( |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
151 FLOW_VELOCITY_DISCHARGE, |
7533
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
152 Resources.getMsg(callMeta, |
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
153 FlowVelocityState.I18N_DISCHARGE_FACET, |
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
154 FlowVelocityState.I18N_DISCHARGE_FACET, |
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
155 new Object[] { name })); |
7290
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
156 fs.add(qFacet); |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
157 |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
158 Facet wFacet = new FlowVelocityMeasurementFacet( |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
159 FLOW_VELOCITY_WATERLEVEL, |
7533
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
160 Resources.getMsg(callMeta, |
7543
a338ad099c7a
issue1762: correct facet names.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7533
diff
changeset
|
161 I18N_WATERLEVEL_FACET, |
7533
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
162 FlowVelocityState.I18N_TAU_FACET, |
20b1cfa1e005
Cosmetics, break overlong lines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7397
diff
changeset
|
163 new Object[] { name })); |
7290
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
164 fs.add(wFacet); |
1843023549df
issue1512: spawn more facets for FlowVelocityMeasurementArtifact .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6944
diff
changeset
|
165 |
4497
a2735a4bf75e
Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4483
diff
changeset
|
166 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
|
167 addStringData(DATA_NAME, code); |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
168 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
169 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
170 spawnState(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
171 super.setup(identifier, factory, context, callMeta, data); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
172 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
173 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
174 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
175 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
176 * 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
|
177 * @param context ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
178 * @return list with one and only state. |
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 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
181 protected List<State> getStates(Object context) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
182 ArrayList<State> states = new ArrayList<State>(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
183 states.add(getState()); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
184 return states; |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
185 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
186 |
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 * Get the "current" state (there is but one). |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
190 * @param cc ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
191 * @return the "current" (only possible) state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
192 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
193 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
194 public State getCurrentState(Object cc) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
195 return getState(); |
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 only possible state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
201 * @return the state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
202 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
203 protected State getState() { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
204 return getState(null, null); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
205 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
206 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
207 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
208 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
209 * Get the state. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
210 * @param context ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
211 * @param stateID ignored. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
212 * @return the state. |
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 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
215 protected State getState(Object context, String stateID) { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
216 return (state != null) |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
217 ? state |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
218 : spawnState(); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
219 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
220 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
221 |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
222 /** |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
223 * 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
|
224 * |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
225 * @param artifact The master-artifact. |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
226 */ |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
227 @Override |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
228 protected void initialize( |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
229 Artifact artifact, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
230 Object context, |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
231 CallMeta meta) |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
232 { |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
233 logger.debug("initialize"); |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
234 } |
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
|
235 |
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 |
7366
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
237 /** |
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
238 * Get the db-unbound flow velocity measurement value with given |
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
239 * id. |
ea5da3e140ef
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
7290
diff
changeset
|
240 */ |
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
|
241 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
|
242 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
|
243 { |
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
|
244 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
|
245 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
|
246 } |
4452
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
247 } |
bdf321802d3d
Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
248 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |