Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.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 |
---|---|
276 * results of WSPLGEN are stored. Should be called in endOfLife(). | 276 * results of WSPLGEN are stored. Should be called in endOfLife(). |
277 */ | 277 */ |
278 // FIXME: I've seen this code somewhere else... | 278 // FIXME: I've seen this code somewhere else... |
279 protected void removeDirectory(D4EArtifact artifact) { | 279 protected void removeDirectory(D4EArtifact artifact) { |
280 String shapePath = RiverUtils.getXPathString( | 280 String shapePath = RiverUtils.getXPathString( |
281 RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR); | 281 RiverUtils.XPATH_MAPFILES_PATH); |
282 | 282 |
283 File artifactDir = new File(shapePath, artifact.identifier()); | 283 File artifactDir = new File(shapePath, artifact.identifier()); |
284 | 284 |
285 if (artifactDir.exists()) { | 285 if (artifactDir.exists()) { |
286 log.debug("Delete directory: " + artifactDir.getAbsolutePath()); | 286 log.debug("Delete directory: " + artifactDir.getAbsolutePath()); |
302 * | 302 * |
303 * @return the directory for WSPLEN data. | 303 * @return the directory for WSPLEN data. |
304 */ | 304 */ |
305 protected File getDirectory(D4EArtifact artifact) { | 305 protected File getDirectory(D4EArtifact artifact) { |
306 String shapePath = RiverUtils.getXPathString( | 306 String shapePath = RiverUtils.getXPathString( |
307 RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR); | 307 RiverUtils.XPATH_MAPFILES_PATH); |
308 | 308 |
309 File artifactDir = FileTools.getDirectory( | 309 File artifactDir = FileTools.getDirectory( |
310 shapePath, artifact.identifier()); | 310 shapePath, artifact.identifier()); |
311 | 311 |
312 return artifactDir; | 312 return artifactDir; |