Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java @ 35:4405f31bbc30
CodeCleanUP
gnv/trunk@171 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 08:49:18 +0000 |
parents | 25fdec8b4c69 |
children | ad381cc47217 |
comparison
equal
deleted
inserted
replaced
34:25fdec8b4c69 | 35:4405f31bbc30 |
---|---|
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 | 209 |
210 private ArtifactObject getArtifact(Document document){ | 210 private ArtifactObject getArtifact(Document document){ |
211 XMLUtils xmlUtils = new XMLUtils(); | 211 XMLUtils xmlUtils = new XMLUtils(); |
212 String uuid = xmlUtils.getStringXPath(document, "/result/uuid/@value"); | 212 String uuid = xmlUtils.getStringXPath(document, "/result/uuid/@value"); |
213 String hash = xmlUtils.getStringXPath(document, "/result/hash/@value"); | 213 String hash = xmlUtils.getStringXPath(document, "/result/hash/@value"); |
214 log.info("NEW Artifact: "+uuid+" / "+hash); | 214 log.info("NEW Artifact: "+uuid+" / "+hash); |
215 return new Artifact(uuid, hash); | 215 return new Artifact(uuid, hash); |
216 } | 216 } |
380 log.error(e,e); | 380 log.error(e,e); |
381 throw new ArtifactDatabaseClientException(e); | 381 throw new ArtifactDatabaseClientException(e); |
382 } | 382 } |
383 } | 383 } |
384 | 384 |
385 private Document createFeedRequestBody(ArtifactObject currentArtifact, | 385 private Document createFeedRequestBody(ArtifactObject currentArtifact, |
386 Collection<InputParameter> inputParameter){ | 386 Collection<InputParameter> inputParameter){ |
387 Document document = new XMLUtils().newDocument(); | 387 Document document = new XMLUtils().newDocument(); |
388 Node rootNode = this.createRootNode(document); | 388 Node rootNode = this.createRootNode(document); |
389 | 389 |
390 Element typeNode = this.createArtifactElement(document, "type"); | 390 Element typeNode = this.createArtifactElement(document, "type"); |
564 } | 564 } |
565 } | 565 } |
566 } | 566 } |
567 } catch (IOException e) { | 567 } catch (IOException e) { |
568 log.error(e,e); | 568 log.error(e,e); |
569 throw new ArtifactDatabaseClientException(e); | 569 throw new ArtifactDatabaseClientException(e); |
570 } | 570 } |
571 | 571 |
572 return result; | 572 return result; |
573 } | 573 } |
574 } | 574 } |