Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
1434:9115b2a28be1 | 1435:f6fbfdc813f0 |
---|---|
1 package de.intevation.flys.client.shared.model; | 1 package de.intevation.flys.client.shared.model; |
2 | 2 |
3 import java.util.List; | 3 import java.util.List; |
4 import java.util.Map; | |
4 | 5 |
5 | 6 |
6 /** | 7 /** |
7 * The default implementation of a CollectionItem. | 8 * The default implementation of a CollectionItem (artifact). |
8 * | 9 * |
9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
10 */ | 11 */ |
11 public class DefaultCollectionItem implements CollectionItem { | 12 public class DefaultCollectionItem implements CollectionItem { |
12 | 13 |
13 /** The identifier that specifies the artifact related to this item.*/ | 14 /** The identifier that specifies the artifact related to this item. */ |
14 protected String identifier; | 15 protected String identifier; |
15 | 16 |
16 /** The hash that specifies the artifact related to this item.*/ | 17 /** The hash that specifies the artifact related to this item. */ |
17 protected String hash; | 18 protected String hash; |
18 | 19 |
19 /** The list of output modes supported by the artifact of this item.*/ | 20 /** The list of output modes supported by the artifact of this item. */ |
20 protected List<OutputMode> outputModes; | 21 protected List<OutputMode> outputModes; |
22 | |
23 /** The map of datanames to data values. */ | |
24 protected Map<String, String> data; | |
21 | 25 |
22 | 26 |
23 /** | 27 /** |
24 * An empty constructor. | 28 * An empty constructor. |
25 */ | 29 */ |
35 * @param outputModes The output modes supported by this item. | 39 * @param outputModes The output modes supported by this item. |
36 */ | 40 */ |
37 public DefaultCollectionItem( | 41 public DefaultCollectionItem( |
38 String identifier, | 42 String identifier, |
39 String hash, | 43 String hash, |
40 List<OutputMode> modes) { | 44 List<OutputMode> modes, |
45 Map<String,String> data | |
46 ) { | |
41 this.identifier = identifier; | 47 this.identifier = identifier; |
42 this.hash = hash; | 48 this.hash = hash; |
43 this.outputModes = modes; | 49 this.outputModes = modes; |
50 this.data = data; | |
44 } | 51 } |
52 | |
45 | 53 |
46 | 54 |
47 public String identifier() { | 55 public String identifier() { |
48 return identifier; | 56 return identifier; |
49 } | 57 } |
67 } | 75 } |
68 } | 76 } |
69 | 77 |
70 return null; | 78 return null; |
71 } | 79 } |
80 | |
81 | |
82 /** | |
83 * Returns artifact data. | |
84 * @return key/value data map | |
85 */ | |
86 public Map<String, String> getData() { | |
87 return this.data; | |
88 } | |
72 } | 89 } |
73 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |