annotate 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
rev   line source
1285
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.shared.model;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 import org.w3c.dom.NodeList;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 import org.w3c.dom.Element;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8 import java.util.List;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 import java.util.ArrayList;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 /**
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 */
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 public class Style implements Serializable {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 protected String name;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 protected List<StyleSetting> settings;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 public Style() {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 settings = new ArrayList<StyleSetting>();
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 public void appendStyleSetting(StyleSetting setting) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 settings.add(setting);
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 public void setName(String name) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 this.name = name;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 public String getName() {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 return this.name;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 public StyleSetting getSetting(String name) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 for (int i = 0; i < settings.size (); i++) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 if (settings.get(i).getName().equals(name)) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 return settings.get(i);
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 return null;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org