# HG changeset patch
# User Sascha L. Teichmann <sascha.teichmann@intevation.de>
# Date 1299509383 0
# Node ID afd5945ff8d161ef5dd1c3f30bba344a9a54a29a
# Parent  a22b7e367b2527c4323be735a79f7a6ba2795729
Added missing class.


artifacts/trunk@1415 c6561f87-3c4e-4783-a992-168aeb5c3f6f

diff -r a22b7e367b25 -r afd5945ff8d1 ChangeLog
--- a/ChangeLog	Mon Mar 07 11:37:49 2011 +0000
+++ b/ChangeLog	Mon Mar 07 14:49:43 2011 +0000
@@ -1,3 +1,8 @@
+2011-03-07	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* artifact-database/src/main/java/de/intevation/artifactdatabase/CollectionItem.java:
+	  Add missing class.
+
 2011-03-07	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java:
diff -r a22b7e367b25 -r afd5945ff8d1 artifact-database/src/main/java/de/intevation/artifactdatabase/CollectionItem.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/CollectionItem.java	Mon Mar 07 14:49:43 2011 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2011 by Intevation GmbH
+ *
+ * This program is free software under the LGPL (>=v2.1)
+ * Read the file LGPL.txt coming with the software for details
+ * or visit http://www.gnu.org/licenses/ if it does not exist.
+ */
+package de.intevation.artifactdatabase;
+
+import de.intevation.artifacts.common.utils.XMLUtils;
+
+import org.w3c.dom.Document;
+
+public class CollectionItem
+{
+    protected String artifactIdentifier;
+
+    protected byte [] data;
+
+    protected Document document;
+
+    public CollectionItem() {
+    }
+
+    public CollectionItem(String artifactIdentifier, byte [] attribute) {
+        this.artifactIdentifier = artifactIdentifier;
+        this.data               = data;
+    }
+
+    public String getArtifactIdentifier() {
+        return artifactIdentifier;
+    }
+
+    public synchronized Document getAttribute() {
+        if (document == null) {
+            if (data != null) {
+                document = XMLUtils.fromByteArray(data);
+            }
+        }
+        return document;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :