Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.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 | 0a5239a1e46e |
children |
comparison
equal
deleted
inserted
replaced
9750:432934cda171 | 9751:308a0d822d18 |
---|---|
294 * | 294 * |
295 * @return the directory for WSPLEN data. | 295 * @return the directory for WSPLEN data. |
296 */ | 296 */ |
297 protected File getDirectory(D4EArtifact artifact) { | 297 protected File getDirectory(D4EArtifact artifact) { |
298 String shapePath = RiverUtils.getXPathString( | 298 String shapePath = RiverUtils.getXPathString( |
299 RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR); | 299 RiverUtils.XPATH_MAPFILES_PATH); |
300 | 300 |
301 File artifactDir = FileTools.getDirectory( | 301 File artifactDir = FileTools.getDirectory( |
302 shapePath, artifact.identifier()); | 302 shapePath, artifact.identifier()); |
303 | 303 |
304 return artifactDir; | 304 return artifactDir; |
309 * Removes directory and all its content where the required data and the | 309 * Removes directory and all its content where the required data and the |
310 * results of WSPLGEN are stored. Should be called in endOfLife(). | 310 * results of WSPLGEN are stored. Should be called in endOfLife(). |
311 */ | 311 */ |
312 protected void removeDirectory(D4EArtifact artifact) { | 312 protected void removeDirectory(D4EArtifact artifact) { |
313 String shapePath = RiverUtils.getXPathString( | 313 String shapePath = RiverUtils.getXPathString( |
314 RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR); | 314 RiverUtils.XPATH_MAPFILES_PATH); |
315 | 315 |
316 File artifactDir = new File(shapePath, artifact.identifier()); | 316 File artifactDir = new File(shapePath, artifact.identifier()); |
317 | 317 |
318 if (artifactDir.exists()) { | 318 if (artifactDir.exists()) { |
319 log.info("Delete directory: " + artifactDir.getAbsolutePath()); | 319 log.info("Delete directory: " + artifactDir.getAbsolutePath()); |