Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/QSectorSingleState.java @ 4173:7d4480c0e68e
Allow users to select the current relevant discharge table in historical discharge table calculattion.
In addition to this, the discharge tables in the helper panel displayed in the client is ordered in time.
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 18 Oct 2012 12:13:48 +0200 |
parents | 6442f317a0c7 |
children | e8a4d2fd25cc |
line wrap: on
line source
package de.intevation.flys.artifacts.states; import java.util.List; import org.apache.log4j.Logger; import de.intevation.artifacts.CallMeta; import de.intevation.artifacts.CallContext; import de.intevation.artifactdatabase.state.Facet; import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.QSectorArtifact; import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.QSectorFacet; import de.intevation.flys.artifacts.resources.Resources; /** * The only state for an QSectorArtifact. */ public class QSectorSingleState extends DefaultState implements FacetTypes { /** Developer-centric description of facet. */ public static final String I18N_DESCRIPTION = "facet.qsector"; /** The logger that is used in this state. */ private static final Logger logger = Logger.getLogger(QSectorSingleState.class); /** * Add QSectorFacets to list of Facets. * * @param artifact Ignored. * @param hash Ignored. * @param meta CallMeta to be used for internationalization. * @param facets List to add QSectorFacet to. * * @return null. */ public Object compute( FLYSArtifact artifact, String hash, CallMeta meta, List<Facet> facets ) { logger.debug("QSectorSingleState.compute()"); QSectorArtifact points = (QSectorArtifact) artifact; QSectorFacet qfacet = new QSectorFacet( 0, QSECTOR, Resources.getMsg(meta, "qsectors", "Q Sectors")); facets.add(qfacet); return null; } /** Call compute. */ @Override public Object computeInit( FLYSArtifact artifact, String hash, Object context, CallMeta meta, List<Facet> facets ) { return compute(artifact, hash, meta, facets); } /** Call compute. */ @Override public Object computeFeed( FLYSArtifact artifact, String hash, CallContext context, List<Facet> facets, Object old ) { return compute(artifact, hash, context.getMeta(), facets); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :