Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/Recommendation.java @ 845:4db672cdacb2
Added outs/facet filters when creation new artifacts.
flys-client/trunk@2569 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 24 Aug 2011 16:06:48 +0000 |
parents | ac70261bb3f8 |
children | 3e7717b6e2bc |
comparison
equal
deleted
inserted
replaced
844:ac70261bb3f8 | 845:4db672cdacb2 |
---|---|
1 package de.intevation.flys.client.shared.model; | 1 package de.intevation.flys.client.shared.model; |
2 | |
3 | |
4 import java.util.List; | |
5 import java.util.Map; | |
6 import java.util.HashMap; | |
2 | 7 |
3 import java.io.Serializable; | 8 import java.io.Serializable; |
4 | 9 |
5 /** | 10 /** |
6 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 11 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
7 */ | 12 */ |
8 public class Recommendation implements Serializable { | 13 public class Recommendation implements Serializable { |
9 | 14 |
15 public static class Facet implements Serializable { | |
16 | |
17 protected String name; | |
18 protected String index; | |
19 | |
20 public Facet() { | |
21 } | |
22 | |
23 public Facet(String name, String index) { | |
24 this.name = name; | |
25 this.index = index; | |
26 } | |
27 | |
28 public String getName() { | |
29 return name; | |
30 } | |
31 | |
32 public String getIndex() { | |
33 return index; | |
34 } | |
35 } // class Facet | |
36 | |
37 public static class Filter implements Serializable { | |
38 | |
39 protected Map<String, List<Facet>> outs; | |
40 | |
41 public Filter() { | |
42 outs = new HashMap<String, List<Facet>>(); | |
43 } | |
44 | |
45 public void add(String out, List<Facet> facets) { | |
46 outs.put(out, facets); | |
47 } | |
48 | |
49 public Map<String, List<Facet>> getOuts() { | |
50 return outs; | |
51 } | |
52 } // class Filter | |
53 | |
10 protected String factory; | 54 protected String factory; |
11 protected String ids; | 55 protected String ids; |
12 protected String masterArtifact; | 56 protected String masterArtifact; |
57 protected Filter filter; | |
13 | 58 |
14 public Recommendation() { | 59 public Recommendation() { |
15 } | 60 } |
16 | 61 |
17 | |
18 public Recommendation(String factory, String ids) { | 62 public Recommendation(String factory, String ids) { |
19 this.factory = factory; | 63 this(factory, ids, null, null); |
20 this.ids = ids; | |
21 } | 64 } |
22 | 65 |
66 public Recommendation( | |
67 String factory, | |
68 String ids, | |
69 String masterArtifact, | |
70 Filter filter | |
71 ) { | |
72 this.factory = factory; | |
73 this.ids = ids; | |
74 this.masterArtifact = masterArtifact; | |
75 this.filter = filter; | |
76 } | |
23 | 77 |
24 public String getFactory() { | 78 public String getFactory() { |
25 return factory; | 79 return factory; |
26 } | 80 } |
27 | |
28 | 81 |
29 public String getIDs() { | 82 public String getIDs() { |
30 return ids; | 83 return ids; |
31 } | 84 } |
32 | 85 |
35 } | 88 } |
36 | 89 |
37 public void setMasterArtifact(String masterArtifact) { | 90 public void setMasterArtifact(String masterArtifact) { |
38 this.masterArtifact = masterArtifact; | 91 this.masterArtifact = masterArtifact; |
39 } | 92 } |
93 | |
94 public Filter getFilter() { | |
95 return filter; | |
96 } | |
97 | |
98 public void setFilter(Filter filter) { | |
99 this.filter = filter; | |
100 } | |
40 } | 101 } |
41 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 102 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |