Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/ThemeList.java @ 2438:e0f4ea518d59
Query GetFeatureInfo for active layers only.
flys-client/trunk@4106 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 01 Mar 2012 15:07:04 +0000 |
parents | 71ba43bd0e3f |
children |
comparison
equal
deleted
inserted
replaced
2437:18478c9baa67 | 2438:e0f4ea518d59 |
---|---|
1 package de.intevation.flys.client.shared.model; | 1 package de.intevation.flys.client.shared.model; |
2 | 2 |
3 import java.io.Serializable; | 3 import java.io.Serializable; |
4 | 4 |
5 import java.util.ArrayList; | |
5 import java.util.LinkedHashMap; | 6 import java.util.LinkedHashMap; |
6 import java.util.List; | 7 import java.util.List; |
7 | 8 |
8 | 9 |
9 /** | 10 /** |
24 } | 25 } |
25 | 26 |
26 | 27 |
27 public List<Theme> getThemes() { | 28 public List<Theme> getThemes() { |
28 return themes; | 29 return themes; |
30 } | |
31 | |
32 | |
33 public List<Theme> getActiveThemes() { | |
34 List<Theme> active = new ArrayList<Theme>(); | |
35 List<Theme> all = getThemes(); | |
36 | |
37 if (all == null || all.isEmpty()) { | |
38 return active; | |
39 } | |
40 | |
41 for (Theme theme: all) { | |
42 if (theme.getActive() == 1) { | |
43 active.add(theme); | |
44 } | |
45 } | |
46 | |
47 return active; | |
29 } | 48 } |
30 | 49 |
31 | 50 |
32 public int getThemeCount() { | 51 public int getThemeCount() { |
33 return themes.size(); | 52 return themes.size(); |