Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/themes/DefaultTheme.java Tue Oct 04 07:37:05 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/themes/DefaultTheme.java Tue Oct 04 11:28:37 2011 +0000 @@ -23,6 +23,10 @@ /** The description of the theme.*/ protected String description; + protected String facet; + + protected int index; + /** The map storing the fields of this theme.*/ protected Map<String, ThemeField> fields; @@ -56,6 +60,26 @@ } + public String getFacet() { + return facet; + } + + + public void setFacet(String facet) { + this.facet = facet; + } + + + public int getIndex() { + return index; + } + + + public void setIndex(int index) { + this.index = index; + } + + public void addAttribute(String name, String value) { if (name != null && value != null) { attr.put(name, value); @@ -111,6 +135,8 @@ ElementCreator cr = new ElementCreator(doc, null, null); Element theme = cr.create("theme"); + theme.setAttribute("facet", facet); + theme.setAttribute("index", String.valueOf(index)); appendAttributes(cr, theme); appendFields(cr, theme);