Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightFacet.java @ 5138:fc0cdcae8f07
New facet types and renaming for infoldings.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 28 Feb 2013 13:09:26 +0100 |
parents | a3dc382bc1ca |
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.FLYSArtifact; import de.intevation.flys.artifacts.access.BedHeightAccess; 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) { BedHeightAccess access = new BedHeightAccess((FLYSArtifact)artifact, context); if (type.equals("singlevalues")) { return access.getSingleValues(); } return access.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 :