Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightFacet.java @ 4739:5014a84c0c7d
Add "maptype" parameter to MapInfoService.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 02 Jan 2013 15:24:18 +0100 |
parents | cd44d28d0fbc |
children | a3dc382bc1ca |
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); 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 :