Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollectionItem.java @ 67:74257b95567b
Added CollectionItems and Facets and replaced Artifact references in Collection with CollectionItems.
flys-client/trunk@1567 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 25 Mar 2011 09:19:29 +0000 |
parents | |
children | c8cd1b918901 |
comparison
equal
deleted
inserted
replaced
66:a361ce81abcf | 67:74257b95567b |
---|---|
1 package de.intevation.flys.client.shared.model; | |
2 | |
3 import java.util.List; | |
4 | |
5 | |
6 /** | |
7 * The default implementation of a CollectionItem. | |
8 * | |
9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
10 */ | |
11 public class DefaultCollectionItem implements CollectionItem { | |
12 | |
13 /** The identifier that specifies the artifact related to this item.*/ | |
14 protected String identifier; | |
15 | |
16 /** The list of output modes supported by the artifact of this item.*/ | |
17 protected List<OutputMode> outputModes; | |
18 | |
19 | |
20 /** | |
21 * An empty constructor. | |
22 */ | |
23 public DefaultCollectionItem() { | |
24 } | |
25 | |
26 | |
27 /** | |
28 * The default constructor to create a new CollectionItem related to an | |
29 * artifact with output modes. | |
30 * | |
31 * @param identifier The identifier of an artifact. | |
32 * @param outputModes The output modes supported by this item. | |
33 */ | |
34 public DefaultCollectionItem(String identifier, List<OutputMode> modes) { | |
35 this.identifier = identifier; | |
36 this.outputModes = modes; | |
37 } | |
38 | |
39 | |
40 public String identifier() { | |
41 return identifier; | |
42 } | |
43 | |
44 | |
45 public List<OutputMode> getOutputModes() { | |
46 return outputModes; | |
47 } | |
48 | |
49 | |
50 public List<Facet> getFacets(String outputmode) { | |
51 for (OutputMode mode: outputModes) { | |
52 if (outputmode.equals(mode.getName())) { | |
53 // TODO Return facets, but facets are not implemented for | |
54 // OutputModes yet! | |
55 } | |
56 } | |
57 | |
58 return null; | |
59 } | |
60 } | |
61 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |