changeset 183:9b8923043a38

Repaired the namespaces of the xml element attributes in the collecton context of the artifact database. artifacts/trunk@1409 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 07 Mar 2011 11:13:39 +0000
parents 7eebe707a034
children a22b7e367b25
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java
diffstat 2 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 07 11:12:21 2011 +0000
+++ b/ChangeLog	Mon Mar 07 11:13:39 2011 +0000
@@ -1,3 +1,9 @@
+2011-03-07  Ingo Weinzierl <ingo@intevation.de>
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java:
+	  Repaired the namespaces of attributes in the xml documents created in
+	  the collection context.
+
 2011-03-07	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* artifact-database/src/main/java/de/intevation/artifactdatabase/CollectionItem.java:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java	Mon Mar 07 11:12:21 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java	Mon Mar 07 11:13:39 2011 +0000
@@ -854,12 +854,12 @@
         document.appendChild(root);
 
         Element type = ec.create("type");
-        ec.addAttr(type, "name", "export");
+        ec.addAttr(type, "name", "export", true);
         root.appendChild(type);
 
         Element data = ec.create("data");
-        ec.addAttr(data, "checksum", checksum);
-        ec.addAttr(data, "factory",  factoryName);
+        ec.addAttr(data, "checksum", checksum, true);
+        ec.addAttr(data, "factory",  factoryName, true);
         data.setTextContent(Base64.encodeBase64String(artifact));
 
         root.appendChild(data);
@@ -1013,8 +1013,8 @@
 
         for (User user: users) {
             Element ue = ec.create("user");
-            ec.addAttr(ue, "uuid", user.identifier());
-            ec.addAttr(ue, "name", user.getName());
+            ec.addAttr(ue, "uuid", user.identifier(), true);
+            ec.addAttr(ue, "name", user.getName(), true);
 
             Document role = user.getRole();
 
@@ -1153,15 +1153,15 @@
 
         for (ArtifactCollection c: ac) {
             Element collection = ec.create("artifact-collection");
-            ec.addAttr(collection, "name", c.getName());
-            ec.addAttr(collection, "uuid", c.identifier());
+            ec.addAttr(collection, "name", c.getName(), true);
+            ec.addAttr(collection, "uuid", c.identifier(), true);
 
             Date creationTime = c.getCreationTime();
             String creation   = creationTime != null
                 ? Long.toString(creationTime.getTime())
                 : "";
 
-            ec.addAttr(collection, "creation", creation);
+            ec.addAttr(collection, "creation", creation,  true);
 
             root.appendChild(collection);
         }
@@ -1202,7 +1202,7 @@
         result.appendChild(root);
 
         Element acElement = ec.create("artifact-collection");
-        ec.addAttr(acElement, "uuid", ac.identifier());
+        ec.addAttr(acElement, "uuid", ac.identifier(), true);
 
         root.appendChild(acElement);
 

http://dive4elements.wald.intevation.org