Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java @ 646:c8749d83d9b6
Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter.
gnv-artifacts/trunk@733 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 04 Mar 2010 16:23:24 +0000 |
parents | a72ecacccc91 |
children | 9a828e5a2390 |
comparison
equal
deleted
inserted
replaced
645:0cf162fa4334 | 646:c8749d83d9b6 |
---|---|
93 public final static String VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION = | 93 public final static String VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION = |
94 "/artifact-database/gnv/vertical-cross-section/ground/@interpolation"; | 94 "/artifact-database/gnv/vertical-cross-section/ground/@interpolation"; |
95 | 95 |
96 public final static String VERTICAL_CROSS_SECTION_GROUND_FILL_COLOR = | 96 public final static String VERTICAL_CROSS_SECTION_GROUND_FILL_COLOR = |
97 "/artifact-database/gnv/vertical-cross-section/ground/@fill-color"; | 97 "/artifact-database/gnv/vertical-cross-section/ground/@fill-color"; |
98 | |
99 public final static String XPATH_MAPSERVER_PATH = | |
100 "/artifact-database/mapserver/server/@path"; | |
101 | |
102 public final static String XPATH_MAP_PATH = | |
103 "/artifact-database/mapserver/map/@path"; | |
98 | 104 |
99 /** | 105 /** |
100 * Constructor | 106 * Constructor |
101 */ | 107 */ |
102 public GNVArtifactContextFactory() { | 108 public GNVArtifactContextFactory() { |
143 | 149 |
144 configureHorizontalCrossSection(config,returnValue); | 150 configureHorizontalCrossSection(config,returnValue); |
145 | 151 |
146 configureVerticalCrossSection(config, returnValue); | 152 configureVerticalCrossSection(config, returnValue); |
147 | 153 |
154 configureMapserver(config, returnValue); | |
155 | |
148 } catch (FileNotFoundException e) { | 156 } catch (FileNotFoundException e) { |
149 log.error(e, e); | 157 log.error(e, e); |
150 } catch (IOException e) { | 158 } catch (IOException e) { |
151 log.error(e, e); | 159 log.error(e, e); |
152 } catch (QueryContainerException e) { | 160 } catch (QueryContainerException e) { |
601 } | 609 } |
602 } // for all palettes | 610 } // for all palettes |
603 } | 611 } |
604 | 612 |
605 context.put(GNVArtifactContext.PALETTES_KEY, palettes); | 613 context.put(GNVArtifactContext.PALETTES_KEY, palettes); |
614 } | |
615 | |
616 | |
617 protected void configureMapserver( | |
618 Document config, | |
619 GNVArtifactContext context | |
620 ) { | |
621 log.info("read configuration of mapserver."); | |
622 | |
623 String serverPath = (String) Config.getStringXPath( | |
624 config, XPATH_MAPSERVER_PATH); | |
625 | |
626 String mapPath = (String) Config.getStringXPath( | |
627 config, XPATH_MAP_PATH); | |
628 | |
629 if (serverPath != null && mapPath != null) { | |
630 context.put(GNVArtifactContext.MAPSERVER_SERVER_PATH_KEY,serverPath); | |
631 context.put(GNVArtifactContext.MAPSERVER_MAP_PATH_KEY, mapPath); | |
632 } | |
606 } | 633 } |
607 | 634 |
608 /** | 635 /** |
609 * @param filePath | 636 * @param filePath |
610 * @return | 637 * @return |