Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollectionItem.java @ 1435:f6fbfdc813f0
Allow client to access artifacts data via CollectionItems and Themes.
flys-client/trunk@3396 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 13 Dec 2011 09:51:47 +0000 |
parents | c8cd1b918901 |
children |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollectionItem.java Tue Dec 13 09:13:03 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollectionItem.java Tue Dec 13 09:51:47 2011 +0000 @@ -1,24 +1,28 @@ package de.intevation.flys.client.shared.model; import java.util.List; +import java.util.Map; /** - * The default implementation of a CollectionItem. + * The default implementation of a CollectionItem (artifact). * * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class DefaultCollectionItem implements CollectionItem { - /** The identifier that specifies the artifact related to this item.*/ + /** The identifier that specifies the artifact related to this item. */ protected String identifier; - /** The hash that specifies the artifact related to this item.*/ + /** The hash that specifies the artifact related to this item. */ protected String hash; - /** The list of output modes supported by the artifact of this item.*/ + /** The list of output modes supported by the artifact of this item. */ protected List<OutputMode> outputModes; + /** The map of datanames to data values. */ + protected Map<String, String> data; + /** * An empty constructor. @@ -37,13 +41,17 @@ public DefaultCollectionItem( String identifier, String hash, - List<OutputMode> modes) { + List<OutputMode> modes, + Map<String,String> data + ) { this.identifier = identifier; this.hash = hash; this.outputModes = modes; + this.data = data; } + public String identifier() { return identifier; } @@ -69,5 +77,14 @@ return null; } + + + /** + * Returns artifact data. + * @return key/value data map + */ + public Map<String, String> getData() { + return this.data; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :