Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java @ 9751:308a0d822d18 3.2.x
Keep configuration and data in distinct directories
This allows having distinct volumes for configuration and data
(artifact database, generated mapfiles and shapefiles, etc.).
While at it, cleanup MapServer configuration a little bit.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 11 Oct 2022 11:42:09 +0200 |
parents | afad1fac70fb |
children |
comparison
equal
deleted
inserted
replaced
9750:432934cda171 | 9751:308a0d822d18 |
---|---|
35 public class ArtifactMapfileGenerator extends MapfileGenerator { | 35 public class ArtifactMapfileGenerator extends MapfileGenerator { |
36 | 36 |
37 private static Logger log = LogManager.getLogger( | 37 private static Logger log = LogManager.getLogger( |
38 ArtifactMapfileGenerator.class); | 38 ArtifactMapfileGenerator.class); |
39 | 39 |
40 private static final String XPATH_FLOODMAP_VELOCITY_LOGFILE = | |
41 "/artifact-database/floodmap/velocity/logfile/@path"; | |
42 | |
43 private static final String XPATH_FLOODMAP_MAPFILE_TEMPLATE = | |
44 "/artifact-database/floodmap/map-template/@path"; | |
45 | |
46 private static final String XPATH_FLOODMAP_MAPFILE_PATH = | |
47 "/artifact-database/floodmap/mapfile/@path"; | |
48 | |
40 public static final String FLOODMAP_UESK_KEY = | 49 public static final String FLOODMAP_UESK_KEY = |
41 "floodmap.uesk"; | 50 "floodmap.uesk"; |
42 | 51 |
43 public static final String FLOODMAP_UESK_DEF = | 52 public static final String FLOODMAP_UESK_DEF = |
44 "Floodmap: {0}-km {1,number,####} - {2,number,####} - {3}"; | 53 "Floodmap: {0}-km {1,number,####} - {2,number,####} - {3}"; |
45 | 54 |
46 @Override | 55 @Override |
47 protected String getVelocityLogfile() { | 56 protected String getVelocityLogfile() { |
48 return RiverUtils.getXPathString( | 57 return RiverUtils.getXPathString(XPATH_FLOODMAP_VELOCITY_LOGFILE); |
49 RiverUtils.XPATH_FLOODMAP_VELOCITY_LOGFILE); | |
50 } | |
51 | |
52 @Override | |
53 protected String getMapserverTemplatePath() { | |
54 return RiverUtils.getXPathString( | |
55 RiverUtils.XPATH_FLOODMAP_MAPSERVER_TEMPLATE_PATH); | |
56 } | 58 } |
57 | 59 |
58 /** | 60 /** |
59 * Method which starts searching for meta information file and mapfile | 61 * Method which starts searching for meta information file and mapfile |
60 * generation. | 62 * generation. |
261 } | 263 } |
262 } | 264 } |
263 | 265 |
264 @Override | 266 @Override |
265 protected String getMapfilePath() { | 267 protected String getMapfilePath() { |
266 return RiverUtils.getXPathString( | 268 return RiverUtils.getXPathString(RiverUtils.XPATH_MAPFILES_PATH) |
267 RiverUtils.XPATH_FLOODMAP_MAPFILE_PATH); | 269 + "/" + RiverUtils.getXPathString(XPATH_FLOODMAP_MAPFILE_PATH); |
268 } | 270 } |
269 | 271 |
270 @Override | 272 @Override |
271 protected String getMapfileTemplate() { | 273 protected String getMapfileTemplate() { |
272 return RiverUtils.getXPathString( | 274 return RiverUtils.getXPathString(XPATH_FLOODMAP_MAPFILE_TEMPLATE); |
273 RiverUtils.XPATH_FLOODMAP_MAPFILE_TEMPLATE); | |
274 } | 275 } |
275 } | 276 } |