comparison artifact-database/src/main/java/de/intevation/artifactdatabase/CollectionItem.java @ 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
children
comparison
equal deleted inserted replaced
184:a22b7e367b25 185:afd5945ff8d1
1 /*
2 * Copyright (c) 2011 by Intevation GmbH
3 *
4 * This program is free software under the LGPL (>=v2.1)
5 * Read the file LGPL.txt coming with the software for details
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
7 */
8 package de.intevation.artifactdatabase;
9
10 import de.intevation.artifacts.common.utils.XMLUtils;
11
12 import org.w3c.dom.Document;
13
14 public class CollectionItem
15 {
16 protected String artifactIdentifier;
17
18 protected byte [] data;
19
20 protected Document document;
21
22 public CollectionItem() {
23 }
24
25 public CollectionItem(String artifactIdentifier, byte [] attribute) {
26 this.artifactIdentifier = artifactIdentifier;
27 this.data = data;
28 }
29
30 public String getArtifactIdentifier() {
31 return artifactIdentifier;
32 }
33
34 public synchronized Document getAttribute() {
35 if (document == null) {
36 if (data != null) {
37 document = XMLUtils.fromByteArray(data);
38 }
39 }
40 return document;
41 }
42 }
43 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org