Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java @ 463:07672838fa5f
Make ground interpolation for vertical cross section configurable.
gnv-artifacts/trunk@522 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 09 Jan 2010 16:58:53 +0000 |
parents | 85f48e287fb3 |
children | 7ba4c7222265 |
comparison
equal
deleted
inserted
replaced
462:912797826099 | 463:07672838fa5f |
---|---|
75 public final static String VERTICAL_CROSS_SECTION_SAMPLES = | 75 public final static String VERTICAL_CROSS_SECTION_SAMPLES = |
76 "/artifact-database/gnv/vertical-cross-section/samples"; | 76 "/artifact-database/gnv/vertical-cross-section/samples"; |
77 | 77 |
78 public final static String VERTICAL_CROSS_SECTION_FILTERS = | 78 public final static String VERTICAL_CROSS_SECTION_FILTERS = |
79 "/artifact-database/gnv/vertical-cross-section/filters/filter"; | 79 "/artifact-database/gnv/vertical-cross-section/filters/filter"; |
80 | |
81 public final static String VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION = | |
82 "/artifact-database/gnv/vertical-cross-section/ground/@interpolation"; | |
80 | 83 |
81 /** | 84 /** |
82 * Constructor | 85 * Constructor |
83 */ | 86 */ |
84 public GNVArtifactContextFactory() { | 87 public GNVArtifactContextFactory() { |
147 GNVArtifactContext context | 150 GNVArtifactContext context |
148 ) { | 151 ) { |
149 log.info("configuration of vertical cross section"); | 152 log.info("configuration of vertical cross section"); |
150 configureVerticalCrossSectionSamples(config, context); | 153 configureVerticalCrossSectionSamples(config, context); |
151 configureVerticalCrossSectionFilters(config, context); | 154 configureVerticalCrossSectionFilters(config, context); |
155 configureVerticalCrossSectionGroundInterpolation(config, context); | |
156 } | |
157 | |
158 protected void configureVerticalCrossSectionGroundInterpolation( | |
159 Document config, | |
160 GNVArtifactContext context | |
161 ) { | |
162 log.info("configuration of vertical cross section ground interpolation"); | |
163 String interpolation = Config.getStringXPath( | |
164 config, | |
165 VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION); | |
166 | |
167 if (interpolation == null | |
168 || (interpolation = interpolation.trim()).length() == 0) { | |
169 interpolation = GNVArtifactContext | |
170 .DEFAULT_VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION; | |
171 } | |
172 | |
173 log.info("ground interpolation: " + interpolation); | |
174 | |
175 context.put( | |
176 GNVArtifactContext | |
177 .VERTICAL_CROSS_SECTION_GROUND_INTERPOLATION_KEY, | |
178 interpolation); | |
152 } | 179 } |
153 | 180 |
154 protected void configureVerticalCrossSectionFilters( | 181 protected void configureVerticalCrossSectionFilters( |
155 Document config, | 182 Document config, |
156 GNVArtifactContext context | 183 GNVArtifactContext context |