Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java @ 1956:a5f87f8dbe57
Modified prefix constants for Mapserver layers.
flys-artifacts/trunk@3354 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 05 Dec 2011 10:40:14 +0000 |
parents | 71139016cd0f |
children | 27cc95e65f18 |
comparison
equal
deleted
inserted
replaced
1955:ccf2235035d6 | 1956:a5f87f8dbe57 |
---|---|
39 public static final String WSPLGEN_POLYGONS_SHAPE = "barrier_polygons.shp"; | 39 public static final String WSPLGEN_POLYGONS_SHAPE = "barrier_polygons.shp"; |
40 | 40 |
41 public static final String SHP_LAYER_TEMPLATE = "shapefile_layer.vm"; | 41 public static final String SHP_LAYER_TEMPLATE = "shapefile_layer.vm"; |
42 public static final String DB_LAYER_TEMPLATE = "db_layer.vm"; | 42 public static final String DB_LAYER_TEMPLATE = "db_layer.vm"; |
43 | 43 |
44 public static final String MS_WSPLGEN_POSTFIX = "-wsplgen"; | 44 public static final String MS_WSPLGEN_PREFIX = "wsplgen-"; |
45 public static final String MS_BARRIERS_POSTFIX = "-barriers"; | 45 public static final String MS_BARRIERS_PREFIX = "barriers-"; |
46 public static final String MS_LINE_POSTFIX = "-lines"; | 46 public static final String MS_LINE_PREFIX = "lines-"; |
47 public static final String MS_POLYGONS_POSTFIX = "-polygons"; | 47 public static final String MS_POLYGONS_PREFIX = "polygons-"; |
48 public static final String MS_LAYER_PREFIX = "ms_layer-"; | 48 public static final String MS_LAYER_PREFIX = "ms_layer-"; |
49 | 49 |
50 protected static final long SLEEPTIME = 10 * 1000L; // 10 seconds | 50 protected static final long SLEEPTIME = 10 * 1000L; // 10 seconds |
51 | 51 |
52 private static Logger logger = Logger.getLogger(MapfileGenerator.class); | 52 private static Logger logger = Logger.getLogger(MapfileGenerator.class); |
53 | 53 |
368 throws FileNotFoundException, IOException | 368 throws FileNotFoundException, IOException |
369 { | 369 { |
370 logger.debug("createUeskLayer"); | 370 logger.debug("createUeskLayer"); |
371 | 371 |
372 LayerInfo layerinfo = new LayerInfo(); | 372 LayerInfo layerinfo = new LayerInfo(); |
373 layerinfo.setName(MS_WSPLGEN_POSTFIX + flys.identifier()); | 373 layerinfo.setName(MS_WSPLGEN_PREFIX + flys.identifier()); |
374 layerinfo.setType("POLYGON"); | 374 layerinfo.setType("POLYGON"); |
375 layerinfo.setDirectory(flys.identifier()); | 375 layerinfo.setDirectory(flys.identifier()); |
376 layerinfo.setData(WSPLGEN_RESULT_SHAPE); | 376 layerinfo.setData(WSPLGEN_RESULT_SHAPE); |
377 layerinfo.setTitle("I18N_WSPLGEN_RESULT"); | 377 layerinfo.setTitle("I18N_WSPLGEN_RESULT"); |
378 | 378 |
420 WMSLayerFacet wms | 420 WMSLayerFacet wms |
421 ) | 421 ) |
422 throws FileNotFoundException, IOException | 422 throws FileNotFoundException, IOException |
423 { | 423 { |
424 String uuid = flys.identifier(); | 424 String uuid = flys.identifier(); |
425 String group = uuid + MS_BARRIERS_POSTFIX; | 425 String group = MS_BARRIERS_PREFIX + uuid; |
426 String groupTitle = "I18N_BARRIERS_TITLE"; | 426 String groupTitle = "I18N_BARRIERS_TITLE"; |
427 | 427 |
428 File dir = new File(getShapefileBaseDir(), uuid); | 428 File dir = new File(getShapefileBaseDir(), uuid); |
429 File test = new File(dir, WSPLGEN_LINES_SHAPE); | 429 File test = new File(dir, WSPLGEN_LINES_SHAPE); |
430 | 430 |
432 logger.debug("No barrier line layer existing."); | 432 logger.debug("No barrier line layer existing."); |
433 return; | 433 return; |
434 } | 434 } |
435 | 435 |
436 LayerInfo lineInfo = new LayerInfo(); | 436 LayerInfo lineInfo = new LayerInfo(); |
437 lineInfo.setName(MS_LINE_POSTFIX + uuid); | 437 lineInfo.setName(MS_LINE_PREFIX + uuid); |
438 lineInfo.setType("LINE"); | 438 lineInfo.setType("LINE"); |
439 lineInfo.setDirectory(uuid); | 439 lineInfo.setDirectory(uuid); |
440 lineInfo.setData(WSPLGEN_LINES_SHAPE); | 440 lineInfo.setData(WSPLGEN_LINES_SHAPE); |
441 lineInfo.setTitle("I18N_LINE_SHAPE"); | 441 lineInfo.setTitle("I18N_LINE_SHAPE"); |
442 lineInfo.setGroup(group); | 442 lineInfo.setGroup(group); |
465 WMSLayerFacet wms | 465 WMSLayerFacet wms |
466 ) | 466 ) |
467 throws FileNotFoundException, IOException | 467 throws FileNotFoundException, IOException |
468 { | 468 { |
469 String uuid = flys.identifier(); | 469 String uuid = flys.identifier(); |
470 String group = uuid + MS_BARRIERS_POSTFIX; | 470 String group = uuid + MS_BARRIERS_PREFIX; |
471 String groupTitle = "I18N_BARRIERS_TITLE"; | 471 String groupTitle = "I18N_BARRIERS_TITLE"; |
472 | 472 |
473 File dir = new File(getShapefileBaseDir(), uuid); | 473 File dir = new File(getShapefileBaseDir(), uuid); |
474 File test = new File(dir, WSPLGEN_POLYGONS_SHAPE); | 474 File test = new File(dir, WSPLGEN_POLYGONS_SHAPE); |
475 | 475 |
477 logger.debug("No barrier line layer existing."); | 477 logger.debug("No barrier line layer existing."); |
478 return; | 478 return; |
479 } | 479 } |
480 | 480 |
481 LayerInfo polygonInfo = new LayerInfo(); | 481 LayerInfo polygonInfo = new LayerInfo(); |
482 polygonInfo.setName(MS_POLYGONS_POSTFIX + uuid); | 482 polygonInfo.setName(MS_POLYGONS_PREFIX + uuid); |
483 polygonInfo.setType("POLYGON"); | 483 polygonInfo.setType("POLYGON"); |
484 polygonInfo.setDirectory(uuid); | 484 polygonInfo.setDirectory(uuid); |
485 polygonInfo.setData(WSPLGEN_POLYGONS_SHAPE); | 485 polygonInfo.setData(WSPLGEN_POLYGONS_SHAPE); |
486 polygonInfo.setTitle("I18N_POLYGON_SHAPE"); | 486 polygonInfo.setTitle("I18N_POLYGON_SHAPE"); |
487 polygonInfo.setGroup(group); | 487 polygonInfo.setGroup(group); |