Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/Style.java @ 1285:0f3b19df1880
Added new service and model for collection item attributes.
flys-client/trunk@2871 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 30 Sep 2011 10:57:56 +0000 |
parents | |
children | f4deeafa60b3 |
comparison
equal
deleted
inserted
replaced
1284:cdb1505a32f1 | 1285:0f3b19df1880 |
---|---|
1 package de.intevation.flys.client.shared.model; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 import org.w3c.dom.NodeList; | |
6 import org.w3c.dom.Element; | |
7 | |
8 import java.util.List; | |
9 import java.util.ArrayList; | |
10 | |
11 /** | |
12 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | |
13 */ | |
14 public class Style implements Serializable { | |
15 | |
16 protected String name; | |
17 protected List<StyleSetting> settings; | |
18 | |
19 public Style() { | |
20 settings = new ArrayList<StyleSetting>(); | |
21 } | |
22 | |
23 public void appendStyleSetting(StyleSetting setting) { | |
24 settings.add(setting); | |
25 } | |
26 | |
27 public void setName(String name) { | |
28 this.name = name; | |
29 } | |
30 | |
31 public String getName() { | |
32 return this.name; | |
33 } | |
34 | |
35 public StyleSetting getSetting(String name) { | |
36 for (int i = 0; i < settings.size (); i++) { | |
37 if (settings.get(i).getName().equals(name)) { | |
38 return settings.get(i); | |
39 } | |
40 } | |
41 return null; | |
42 } | |
43 } | |
44 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |