Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/mapserver/RiverMapfileGeneratorStarter.java @ 5379:61bf64b102bc mapgenfix
Merge with default branch
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 11:25:54 +0100 |
parents | a9243df307b1 |
children |
rev | line source |
---|---|
5022
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.mapserver; |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
2 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
3 import de.intevation.artifactdatabase.LifetimeListener; |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
4 import de.intevation.artifacts.GlobalContext; |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
5 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
6 import org.apache.log4j.Logger; |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
7 import org.w3c.dom.Document; |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
8 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
9 /** |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
10 * LifetimeListener that creates a Mapfile containing river axis layers. |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
11 * The listener is called when the server has completed its startup. |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
12 * |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
13 * @author <a href="mailto:christian.lins@intevation.de">Christian Lins</a> |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
14 */ |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
15 public class RiverMapfileGeneratorStarter implements LifetimeListener { |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
16 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
17 private static Logger logger = Logger.getLogger(RiverMapfileGeneratorStarter.class); |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
18 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
19 @Override |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
20 public void setup(Document document) { |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
21 // Nothing to setup here |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
22 } |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
23 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
24 /** |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
25 * Calls RiverMapfileGenerator.generate(). |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
26 */ |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
27 @Override |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
28 public void systemUp(GlobalContext globalContext) { |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
29 logger.debug("systemUp()"); |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
30 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
31 RiverMapfileGenerator fmfg = new RiverMapfileGenerator(); |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
32 fmfg.generate(); |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
33 } |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
34 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
35 @Override |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
36 public void systemDown(GlobalContext globalContext) { |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
37 // No, we're not cleaning up our generated mapfile |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
38 } |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
39 |
a9243df307b1
Move all classes of mapfile generation to de.intevation.flys.mapserver package.
Christian Lins <christian.lins@intevation.de>
parents:
diff
changeset
|
40 } |