comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollection.java @ 221:f75f83af19e0

Made the 'attribute' document of an ArtifactCollection accessible with getter and setter methods. artifacts/trunk@1564 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 24 Mar 2011 18:42:43 +0000
parents 70cbbe144931
children d9a99b28a847
comparison
equal deleted inserted replaced
220:ecfc33a4ba3d 221:f75f83af19e0
54 * The owner of this collection. 54 * The owner of this collection.
55 */ 55 */
56 protected User user; 56 protected User user;
57 57
58 /** 58 /**
59 * The attribute of this collection.
60 */
61 protected Document attribute;
62
63 /**
59 * The artifacts stored in this collection. 64 * The artifacts stored in this collection.
60 */ 65 */
61 protected List<Artifact> artifacts; 66 protected List<Artifact> artifacts;
62 67
63 /** 68 /**
101 attributes = new HashMap<String, Document>(); 106 attributes = new HashMap<String, Document>();
102 107
103 setIdentifier(identifier); 108 setIdentifier(identifier);
104 setName(name); 109 setName(name);
105 setCreationTime(creationTime); 110 setCreationTime(creationTime);
111 setAttribute(data);
106 } 112 }
107 113
108 114
109 public Document describe(CallContext context) { 115 public Document describe(CallContext context) {
110 logger.debug("DefaultArtifactCollection.describe: " + identifier); 116 logger.debug("DefaultArtifactCollection.describe: " + identifier);
181 * 187 *
182 * @param creationTime The new creation time. 188 * @param creationTime The new creation time.
183 */ 189 */
184 public void setCreationTime(Date creationTime) { 190 public void setCreationTime(Date creationTime) {
185 this.creationTime = creationTime; 191 this.creationTime = creationTime;
192 }
193
194
195 /**
196 * Returns the attribute of the collection.
197 *
198 * @return the attribute of the collection.
199 */
200 public Document getAttribute() {
201 return attribute;
202 }
203
204
205 /**
206 * Sets the attribute of the collection.
207 *
208 * @param attribute The attribute of this collection.
209 */
210 public void setAttribute(Document attribute) {
211 this.attribute = attribute;
186 } 212 }
187 213
188 214
189 /** 215 /**
190 * Called from artifact database when an artifact is 216 * Called from artifact database when an artifact is

http://dive4elements.wald.intevation.org