comparison flys-artifacts/src/main/java/de/intevation/flys/themes/DefaultTheme.java @ 1668:6566c7868456

Added facet and index information to theme which are stored at CollectionItems. flys-artifacts/trunk@2880 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 04 Oct 2011 11:28:37 +0000
parents b36fd8f21e6a
children fe29b0226faf
comparison
equal deleted inserted replaced
1667:f1af0c07a6ee 1668:6566c7868456
20 /** The name of the theme.*/ 20 /** The name of the theme.*/
21 protected String name; 21 protected String name;
22 22
23 /** The description of the theme.*/ 23 /** The description of the theme.*/
24 protected String description; 24 protected String description;
25
26 protected String facet;
27
28 protected int index;
25 29
26 30
27 /** The map storing the fields of this theme.*/ 31 /** The map storing the fields of this theme.*/
28 protected Map<String, ThemeField> fields; 32 protected Map<String, ThemeField> fields;
29 33
51 } 55 }
52 56
53 57
54 public String getDescription() { 58 public String getDescription() {
55 return description; 59 return description;
60 }
61
62
63 public String getFacet() {
64 return facet;
65 }
66
67
68 public void setFacet(String facet) {
69 this.facet = facet;
70 }
71
72
73 public int getIndex() {
74 return index;
75 }
76
77
78 public void setIndex(int index) {
79 this.index = index;
56 } 80 }
57 81
58 82
59 public void addAttribute(String name, String value) { 83 public void addAttribute(String name, String value) {
60 if (name != null && value != null) { 84 if (name != null && value != null) {
109 Document doc = XMLUtils.newDocument(); 133 Document doc = XMLUtils.newDocument();
110 134
111 ElementCreator cr = new ElementCreator(doc, null, null); 135 ElementCreator cr = new ElementCreator(doc, null, null);
112 136
113 Element theme = cr.create("theme"); 137 Element theme = cr.create("theme");
138 theme.setAttribute("facet", facet);
139 theme.setAttribute("index", String.valueOf(index));
114 140
115 appendAttributes(cr, theme); 141 appendAttributes(cr, theme);
116 appendFields(cr, theme); 142 appendFields(cr, theme);
117 143
118 doc.appendChild(theme); 144 doc.appendChild(theme);

http://dive4elements.wald.intevation.org