annotate flys-client/src/main/java/de/intevation/flys/client/shared/model/Style.java @ 1292:bdc270ea6195

Edited item attributes are saved and send to the server on accept. flys-client/trunk@2898 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 05 Oct 2011 16:29:14 +0000
parents f4deeafa60b3
children d9cb362b8b34
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;
1292
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
17
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
18 protected String facet;
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
19
1285
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 protected List<StyleSetting> settings;
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 public Style() {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 settings = new ArrayList<StyleSetting>();
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 }
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 public void appendStyleSetting(StyleSetting setting) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 settings.add(setting);
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 }
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 public void setName(String name) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 this.name = name;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33
1292
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
34 public void setFacet(String facet) {
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
35 this.facet = facet;
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
36 }
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
37
1285
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 public String getName() {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 return this.name;
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
1292
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
42 public String getFacet() {
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
43 return this.facet;
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
44 }
bdc270ea6195 Edited item attributes are saved and send to the server on accept.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1290
diff changeset
45
1285
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46 public StyleSetting getSetting(String name) {
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 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
48 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
49 return settings.get(i);
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 return null;
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 }
1290
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
54
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
55 public int getNumSettings () {
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
56 return settings.size();
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
57 }
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
58
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
59 public StyleSetting getSetting(int i) {
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
60 return this.settings.get(i);
f4deeafa60b3 Build up the editor window from CollectionItemAttribute response.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1285
diff changeset
61 }
1285
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 }
0f3b19df1880 Added new service and model for collection item attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org