Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.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 org.w3c.dom.Element; import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; import de.intevation.artifacts.common.utils.XMLUtils; 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; public class WaterlevelState extends DefaultState { /** The logger that is used in this state.*/ private static Logger logger = Logger.getLogger(WaterlevelState.class); protected Element[] createItems( XMLUtils.ElementCreator cr, Artifact artifact, String name, CallContext context) { logger.debug("WaterlevelState.createItems"); return null; } @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.getWaterlevelData(); } }; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :