annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/FlowVelocityMeasurementFacet.java @ 4464:b66285ece774

For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 09 Nov 2012 10:27:17 +0100
parents bdf321802d3d
children
rev   line source
4452
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model.minfo;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 import de.intevation.artifacts.Artifact;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4 import de.intevation.artifacts.CallContext;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
5 import de.intevation.flys.artifacts.FlowVelocityMeasurementArtifact;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
6 import de.intevation.flys.artifacts.model.BlackboardDataFacet;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 import de.intevation.flys.artifacts.model.FacetTypes;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
8
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10 /** Facet to show measured flow velocity. */
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 public class FlowVelocityMeasurementFacet
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 extends BlackboardDataFacet
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13 implements FacetTypes {
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 public FlowVelocityMeasurementFacet(String description) {
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16 this(FLOW_VELOCITY_MEASUREMENT, description);
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 }
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20 public FlowVelocityMeasurementFacet(String name, String description) {
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21 this.name = name;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22 this.description = description;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23 this.index = 0;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24 }
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
26
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27 /**
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
28 * Returns the data this facet requires.
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
29 *
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30 * @param artifact the owner artifact.
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31 * @param context the CallContext (ignored).
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32 *
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33 * @return the data.
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34 */
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 @Override
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36 public Object getData(Artifact artifact, CallContext context) {
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37 FlowVelocityMeasurementArtifact staticData =
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38 (FlowVelocityMeasurementArtifact) artifact;
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
39 return staticData.getFlowVelocityMeasurementValue();
4452
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40 }
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 /**
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44 * Create a deep copy of this Facet.
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 * @return a deep copy.
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46 */
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 @Override
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48 public FlowVelocityMeasurementFacet deepCopy() {
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49 FlowVelocityMeasurementFacet copy = new FlowVelocityMeasurementFacet(description);
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50 copy.set(this);
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51 return copy;
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 }
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53 }
bdf321802d3d Add FlowVelocityMeasurementArtifact and -facet. Yet dummies.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org