changeset 185:afd5945ff8d1

Added missing class. artifacts/trunk@1415 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 07 Mar 2011 14:49:43 +0000
parents a22b7e367b25
children 15c7638511dc
files ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/CollectionItem.java
diffstat 2 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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:
--- /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 :

http://dive4elements.wald.intevation.org