Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/FlowVelocityMeasurementFacet.java @ 5094:6da542572ab1 dami
Use HWSLines data for HWS and Lines.
This is a quick fix to keep compatibility. Both Artifacts will
be replaced by a HWSLineArtifact.
Patch provided by Raimund Renkert <rrenkert@intevation.de>
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 25 Feb 2013 12:38:55 +0100 |
parents | b66285ece774 |
children |
line wrap: on
line source
package de.intevation.flys.artifacts.model.minfo; import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; import de.intevation.flys.artifacts.FlowVelocityMeasurementArtifact; import de.intevation.flys.artifacts.model.BlackboardDataFacet; import de.intevation.flys.artifacts.model.FacetTypes; /** Facet to show measured flow velocity. */ public class FlowVelocityMeasurementFacet extends BlackboardDataFacet implements FacetTypes { public FlowVelocityMeasurementFacet(String description) { this(FLOW_VELOCITY_MEASUREMENT, description); } public FlowVelocityMeasurementFacet(String name, String description) { this.name = name; this.description = description; this.index = 0; } /** * Returns the data this facet requires. * * @param artifact the owner artifact. * @param context the CallContext (ignored). * * @return the data. */ @Override public Object getData(Artifact artifact, CallContext context) { FlowVelocityMeasurementArtifact staticData = (FlowVelocityMeasurementArtifact) artifact; return staticData.getFlowVelocityMeasurementValue(); } /** * Create a deep copy of this Facet. * @return a deep copy. */ @Override public FlowVelocityMeasurementFacet deepCopy() { FlowVelocityMeasurementFacet copy = new FlowVelocityMeasurementFacet(description); copy.set(this); return copy; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :