changeset 156:d03b8bbeb853

Added the hash code of an artifact to the artifact part of the collection's DESCRIBE document. flys-artifacts/trunk@1598 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 28 Mar 2011 16:58:17 +0000
parents fbbb22e1e206
children b5c99532f898
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Mar 28 16:36:13 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Mar 28 16:58:17 2011 +0000
@@ -1,3 +1,9 @@
+2011-03-28  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
+	  Added the hash code of an artifact to the artifact part of the
+	  collection's DESCRIBE document.
+
 2011-03-28  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: Changed
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Mon Mar 28 16:36:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Mon Mar 28 16:58:17 2011 +0000
@@ -90,11 +90,12 @@
 
         log.debug("Append artifact '"+ uuid +"' to collection description");
 
+        PersistentArtifact pArtifact = backend.getArtifact(uuid);
+        Artifact artifact            = pArtifact.getArtifact();
+
         Element ci   = ec.create("artifact");
         ec.addAttr(ci, "uuid", uuid, true);
-
-        PersistentArtifact pArtifact = backend.getArtifact(uuid);
-        Artifact artifact            = pArtifact.getArtifact();
+        ec.addAttr(ci, "hash", artifact.hash(), true);
 
         // XXX I am not sure if it works well every time with an empty document
         // in the describe operation of an artifact.

http://dive4elements.wald.intevation.org