comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java @ 4656:442fbb290fa8

Introduce river mapfile generation (WARNING: Changes in config xml files required!). On startup the RiverMapfileGeneratorStarter is called by the server app. The starter invokes a call to RiverMapfileGenerator.generate() which reads all available rivers from the database and generates layers for each river (in theory...uncompleted) in a river.map file. The old MapfileGenerator which generates layers that have artifact dependencies is now in ArtifactMapfileGenerator.
author Christian Lins <christian.lins@intevation.de>
date Tue, 11 Dec 2012 15:24:24 +0100
parents 861c47e0a8a0
children c53b3fdc9821
comparison
equal deleted inserted replaced
4655:cd44d28d0fbc 4656:442fbb290fa8
225 * 225 *
226 * @return the directory for WSPLEN data. 226 * @return the directory for WSPLEN data.
227 */ 227 */
228 protected File getDirectory(FLYSArtifact artifact) { 228 protected File getDirectory(FLYSArtifact artifact) {
229 String shapePath = FLYSUtils.getXPathString( 229 String shapePath = FLYSUtils.getXPathString(
230 FLYSUtils.XPATH_SHAPEFILE_DIR); 230 FLYSUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
231 231
232 File artifactDir = FileTools.getDirectory( 232 File artifactDir = FileTools.getDirectory(
233 shapePath, artifact.identifier()); 233 shapePath, artifact.identifier());
234 234
235 return artifactDir; 235 return artifactDir;
240 * Removes the directory and all its content where the required data and the 240 * Removes the directory and all its content where the required data and the
241 * results of WSPLGEN are stored. Should be called in endOfLife(). 241 * results of WSPLGEN are stored. Should be called in endOfLife().
242 */ 242 */
243 protected void removeDirectory(FLYSArtifact artifact) { 243 protected void removeDirectory(FLYSArtifact artifact) {
244 String shapePath = FLYSUtils.getXPathString( 244 String shapePath = FLYSUtils.getXPathString(
245 FLYSUtils.XPATH_SHAPEFILE_DIR); 245 FLYSUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
246 246
247 File artifactDir = new File(shapePath, artifact.identifier()); 247 File artifactDir = new File(shapePath, artifact.identifier());
248 248
249 if (artifactDir.exists()) { 249 if (artifactDir.exists()) {
250 logger.info("Delete directory: " + artifactDir.getAbsolutePath()); 250 logger.info("Delete directory: " + artifactDir.getAbsolutePath());
251 boolean success = FileTools.deleteRecursive(artifactDir); 251 if (!FileTools.deleteRecursive(artifactDir)) {
252 logger.warn("Could not delete directory: "
253 + artifactDir.getAbsolutePath());
254 }
252 } 255 }
253 else { 256 else {
254 logger.debug("There is no directory to remove."); 257 logger.debug("There is no directory to remove.");
255 } 258 }
256 } 259 }

http://dive4elements.wald.intevation.org