comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java @ 5831:bd047b71ab37

Repaired internal references
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:06:39 +0200
parents flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/FlowVelocityMeasurementFacet.java@b66285ece774
children
comparison
equal deleted inserted replaced
5830:160f53ee0870 5831:bd047b71ab37
1 package org.dive4elements.river.artifacts.model.minfo;
2
3 import org.dive4elements.artifacts.Artifact;
4 import org.dive4elements.artifacts.CallContext;
5 import org.dive4elements.river.artifacts.FlowVelocityMeasurementArtifact;
6 import org.dive4elements.river.artifacts.model.BlackboardDataFacet;
7 import org.dive4elements.river.artifacts.model.FacetTypes;
8
9
10 /** Facet to show measured flow velocity. */
11 public class FlowVelocityMeasurementFacet
12 extends BlackboardDataFacet
13 implements FacetTypes {
14
15 public FlowVelocityMeasurementFacet(String description) {
16 this(FLOW_VELOCITY_MEASUREMENT, description);
17 }
18
19
20 public FlowVelocityMeasurementFacet(String name, String description) {
21 this.name = name;
22 this.description = description;
23 this.index = 0;
24 }
25
26
27 /**
28 * Returns the data this facet requires.
29 *
30 * @param artifact the owner artifact.
31 * @param context the CallContext (ignored).
32 *
33 * @return the data.
34 */
35 @Override
36 public Object getData(Artifact artifact, CallContext context) {
37 FlowVelocityMeasurementArtifact staticData =
38 (FlowVelocityMeasurementArtifact) artifact;
39 return staticData.getFlowVelocityMeasurementValue();
40 }
41
42
43 /**
44 * Create a deep copy of this Facet.
45 * @return a deep copy.
46 */
47 @Override
48 public FlowVelocityMeasurementFacet deepCopy() {
49 FlowVelocityMeasurementFacet copy = new FlowVelocityMeasurementFacet(description);
50 copy.set(this);
51 return copy;
52 }
53 }
54 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org