Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java @ 5838:5aa05a7a34b7
Rename modules to more fitting names.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 15:23:37 +0200 |
parents | flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java@bd047b71ab37 |
children | 4897a58c8746 |
comparison
equal
deleted
inserted
replaced
5837:d9901a08d0a6 | 5838:5aa05a7a34b7 |
---|---|
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 : |