Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightFacet.java @ 4635:53fa4d5c9fb2
Deprecate FLYSUtils
FLYSUtils should not be used anymore. Instead use/create a Access class hirarchy
to provide a data "view" of an artifact.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 04 Dec 2012 14:40:54 +0100 |
parents | 1619f80eb62e |
children | cd44d28d0fbc |
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.BedHeightsArtifact; import de.intevation.flys.artifacts.model.BlackboardDataFacet; import de.intevation.flys.artifacts.model.FacetTypes; public class BedHeightFacet extends BlackboardDataFacet implements FacetTypes { private String type; public BedHeightFacet(String name, String description, String type) { this.name = name; this.description = description; this.type = type; 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) { BedHeightsArtifact staticData = (BedHeightsArtifact) artifact; if (type.equals("singlevalues")) { return staticData.getSingleValues(); } return staticData.getHeight(); } /** * Create a deep copy of this Facet. * @return a deep copy. */ @Override public BedHeightFacet deepCopy() { BedHeightFacet copy = new BedHeightFacet(name, description, type); copy.set(this); return copy; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :