Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java @ 690:3481cd37e609 facets-slt
Use enums to dispatch computeFeed() and computeAdvance().
flys-artifacts/branches/facets-slt@2130 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 16 Jun 2011 08:57:05 +0000 |
parents | f8ac04b2dbd0 |
children | 22e4bffbe240 |
line wrap: on
line source
package de.intevation.flys.artifacts.states; import java.util.List; import org.apache.log4j.Logger; import de.intevation.artifactdatabase.state.Facet; import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.WINFOArtifact; import de.intevation.flys.artifacts.model.ComputeCallback; import de.intevation.flys.artifacts.model.ComputeCallbackAdapter; /** * The final state that will be reached after the discharge curve calculation * mode has been chosen. * * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class ComputedDischargeCurveState extends DefaultState { /** The logger that is used in this state.*/ private static Logger logger = Logger.getLogger(ComputedDischargeCurveState.class); public ComputedDischargeCurveState() { } @Override public ComputeCallback createComputeCallback( String hash, FLYSArtifact flys) { final WINFOArtifact winfo = (WINFOArtifact) flys; return new ComputeCallbackAdapter() { @Override public Object computeAdvance(List<Facet> facets) { return winfo.getComputedDischargeCurveData(); } }; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :