comparison flys-artifacts/src/main/java/de/intevation/flys/collections/CollectionDescriptionHelper.java @ 1976:0b466bd4ab24

Introduced a CollectionAttribute class that stores the information provided by the Collection's attribute document. flys-artifacts/trunk@3400 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 13 Dec 2011 11:55:47 +0000
parents 3c3e81fca092
children 4bd3d8bbb60c
comparison
equal deleted inserted replaced
1975:b30e1710df1d 1976:0b466bd4ab24
44 protected String name; 44 protected String name;
45 protected String uuid; 45 protected String uuid;
46 protected Date creation; 46 protected Date creation;
47 protected long ttl; 47 protected long ttl;
48 48
49 protected List<String> artifacts; 49 protected List<String> artifacts;
50 protected Node attribute; 50 protected CollectionAttribute attribute;
51 51
52 52
53 /** 53 /**
54 * @param name The name of the collection. 54 * @param name The name of the collection.
55 * @param uuid The uuid of the collection. 55 * @param uuid The uuid of the collection.
81 artifacts.add(uuid); 81 artifacts.add(uuid);
82 } 82 }
83 } 83 }
84 84
85 85
86 public void setAttribute(Node attribute) { 86 public void setAttribute(CollectionAttribute attribute) {
87 if (attribute != null) { 87 if (attribute != null) {
88 this.attribute = attribute; 88 this.attribute = attribute;
89 } 89 }
90 } 90 }
91 91
196 } 196 }
197 197
198 198
199 protected void appendAttribute(Element root) { 199 protected void appendAttribute(Element root) {
200 Document owner = root.getOwnerDocument(); 200 Document owner = root.getOwnerDocument();
201 201 Document attr = attribute.toXML();
202 root.appendChild(owner.importNode(attribute, true)); 202
203 root.appendChild(owner.importNode(attr.getFirstChild(), true));
203 } 204 }
204 } 205 }

http://dive4elements.wald.intevation.org