comparison flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 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 2649ada6b053
children 3419b1c8ca28
comparison
equal deleted inserted replaced
155:fbbb22e1e206 156:d03b8bbeb853
88 { 88 {
89 String uuid = item.getArtifactIdentifier(); 89 String uuid = item.getArtifactIdentifier();
90 90
91 log.debug("Append artifact '"+ uuid +"' to collection description"); 91 log.debug("Append artifact '"+ uuid +"' to collection description");
92 92
93 PersistentArtifact pArtifact = backend.getArtifact(uuid);
94 Artifact artifact = pArtifact.getArtifact();
95
93 Element ci = ec.create("artifact"); 96 Element ci = ec.create("artifact");
94 ec.addAttr(ci, "uuid", uuid, true); 97 ec.addAttr(ci, "uuid", uuid, true);
95 98 ec.addAttr(ci, "hash", artifact.hash(), true);
96 PersistentArtifact pArtifact = backend.getArtifact(uuid);
97 Artifact artifact = pArtifact.getArtifact();
98 99
99 // XXX I am not sure if it works well every time with an empty document 100 // XXX I am not sure if it works well every time with an empty document
100 // in the describe operation of an artifact. 101 // in the describe operation of an artifact.
101 Document description = artifact.describe(null, context); 102 Document description = artifact.describe(null, context);
102 Node outputModes = (Node) XMLUtils.xpath( 103 Node outputModes = (Node) XMLUtils.xpath(

http://dive4elements.wald.intevation.org