Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DataFacet.java @ 708:757ff56b43b3
Added calculation "am Pegel" version to the "Wasserspiegellage" calculation.
flys-artifacts/trunk@2161 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 18 Jun 2011 20:20:34 +0000 |
parents | 853dceead0f4 |
children | c09c9e05ecfa |
line wrap: on
line source
package de.intevation.flys.artifacts.model; import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; import de.intevation.artifactdatabase.state.DefaultFacet; import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.states.DefaultState.ComputeType; public class DataFacet extends DefaultFacet { protected ComputeType type; protected String hash; public DataFacet(String name, String description) { this(name, description, ComputeType.ADVANCE); } public DataFacet(String name, String description, ComputeType type) { this(name, description, type, null); } public DataFacet( String name, String description, ComputeType type, String hash ) { super(name, description); this.type = type; this.hash = hash; } public Object getData(Artifact artifact, CallContext context) { FLYSArtifact flys = (FLYSArtifact)artifact; return flys.compute( context, hash != null ? hash : flys.hash(), type, false); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :