Mercurial > dive4elements > river
view artifacts/src/main/java/org/dive4elements/river/artifacts/map/RiverMapfileGeneratorStarter.java @ 6693:88bb0c794833
issue1391: Enable GaugeDischarge artifact to directly load a table by its ID
This allows us to use the GaugeDischargeArtifact for any discharge
tables that we have in our database. The name of the created facet
is taken from the ids string as is also usual in the WMS artifacts.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 29 Jul 2013 12:19:57 +0200 |
parents | af13ceeba52a |
children | e4606eae8ea5 |
line wrap: on
line source
/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde * Software engineering by Intevation GmbH * * This file is Free Software under the GNU AGPL (>=v3) * and comes with ABSOLUTELY NO WARRANTY! Check out the * documentation coming with Dive4Elements River for details. */ package org.dive4elements.river.artifacts.map; import org.dive4elements.artifactdatabase.LifetimeListener; import org.dive4elements.artifacts.GlobalContext; import org.dive4elements.river.utils.RiverMapfileGenerator; import org.apache.log4j.Logger; import org.w3c.dom.Document; /** * LifetimeListener that creates a Mapfile containing river axis layers. * The listener is called when the server has completed its startup. * * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a> */ public class RiverMapfileGeneratorStarter implements LifetimeListener { private static Logger logger = Logger.getLogger(RiverMapfileGeneratorStarter.class); @Override public void setup(Document document) { // Nothing to setup here } /** * Calls RiverMapfileGenerator.generate(). */ @Override public void systemUp(GlobalContext globalContext) { logger.debug("systemUp()"); RiverMapfileGenerator fmfg = new RiverMapfileGenerator(); fmfg.generate(); } @Override public void systemDown(GlobalContext globalContext) { // No, we're not cleaning up our generated mapfile } }