Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 217:3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
gnv-artifacts/trunk@275 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Thu, 29 Oct 2009 15:58:47 +0000 |
parents | a33d59f5791a |
children | ee2d4134d0b3 |
comparison
equal
deleted
inserted
replaced
216:9db263ee2678 | 217:3dcd2b0b456e |
---|---|
170 Element configurationNode = (Element)Config.getNodeXPath(document, xpathQuery); | 170 Element configurationNode = (Element)Config.getNodeXPath(document, xpathQuery); |
171 | 171 |
172 String link = configurationNode.getAttribute("xlink:href"); | 172 String link = configurationNode.getAttribute("xlink:href"); |
173 if (link != null ){ | 173 if (link != null ){ |
174 String absolutFileName = Config.replaceConfigDir(link); | 174 String absolutFileName = Config.replaceConfigDir(link); |
175 configurationNode = (Element)this.readConfiguration(absolutFileName); | 175 configurationNode = (Element)new ArtifactXMLUtilities().readConfiguration(absolutFileName); |
176 } | 176 } |
177 | 177 |
178 return configurationNode; | 178 return configurationNode; |
179 } | |
180 | |
181 | |
182 private Node readConfiguration(String fileName){ | |
183 try { | |
184 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | |
185 factory.setValidating(false); | |
186 return factory.newDocumentBuilder().parse(fileName).getChildNodes().item(0); | |
187 } catch (SAXException e) { | |
188 log.error(e,e); | |
189 return null; | |
190 } catch (IOException e) { | |
191 log.error(e,e); | |
192 return null; | |
193 } catch (ParserConfigurationException e) { | |
194 log.error(e,e); | |
195 return null; | |
196 } | |
197 } | 179 } |
198 | 180 |
199 /** | 181 /** |
200 * @see de.intevation.artifactdatabase.DefaultArtifact#feed(org.w3c.dom.Document, | 182 * @see de.intevation.artifactdatabase.DefaultArtifact#feed(org.w3c.dom.Document, |
201 * de.intevation.artifacts.CallContext) | 183 * de.intevation.artifacts.CallContext) |