Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/wms/LayerInfo.java @ 875:5e9efdda6894
merged gnv-artifacts/1.0
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:13:56 +0200 |
parents | 9a828e5a2390 |
children | f953c9a559d8 |
comparison
equal
deleted
inserted
replaced
722:bb3ffe7d719e | 875:5e9efdda6894 |
---|---|
1 package de.intevation.gnv.wms; | |
2 | |
3 /** | |
4 * This class is used to store some meta information about a layer (e.g. a WMS | |
5 * layers). | |
6 * | |
7 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
8 */ | |
9 public class LayerInfo { | |
10 | |
11 /** | |
12 * Constant field <code>LAYER</code> | |
13 */ | |
14 public static final String LAYER = "layer"; | |
15 | |
16 /** | |
17 * Constant field <code>LAYER_MODEL</code> | |
18 */ | |
19 public static final String LAYER_MODEL = "model"; | |
20 | |
21 /** | |
22 * Constant field <code>LAYER_NAME</code> | |
23 */ | |
24 public static final String LAYER_NAME = "name"; | |
25 | |
26 /** | |
27 * Constant field <code>LAYER_TYPE</code> | |
28 */ | |
29 public static final String LAYER_TYPE = "type"; | |
30 | |
31 /** | |
32 * Constant field <code>LAYER_DATA</code> | |
33 */ | |
34 public static final String LAYER_DATA = "data"; | |
35 | |
36 /** | |
37 * Constant field <code>LAYER_STATUS</code> | |
38 */ | |
39 public static final String LAYER_STATUS = "status"; | |
40 | |
41 /** | |
42 * Constant field <code>LAYER_TITLE</code> | |
43 */ | |
44 public static final String LAYER_TITLE = "title"; | |
45 | |
46 /** | |
47 * Field storing the layer name. | |
48 */ | |
49 private String name; | |
50 | |
51 /** | |
52 * Field storing the layer title. | |
53 */ | |
54 private String title; | |
55 | |
56 /** | |
57 * Field storing the layer type. | |
58 */ | |
59 private String type; | |
60 | |
61 /** | |
62 * Field storing the layer data. | |
63 */ | |
64 private String data; | |
65 | |
66 /** | |
67 * Field storing the layer status. | |
68 */ | |
69 private String status; | |
70 | |
71 /** | |
72 * Field storing the layer model. | |
73 */ | |
74 private String model; | |
75 | |
76 | |
77 /** | |
78 * Constructs an empty object. All parameters should be set via setter | |
79 * methods. | |
80 */ | |
81 public LayerInfo() { | |
82 } | |
83 | |
84 | |
85 /** | |
86 * Set {@link #data} to data. | |
87 * | |
88 * @param data | |
89 */ | |
90 public void setData(String data) { | |
91 this.data = data; | |
92 } | |
93 | |
94 /** | |
95 * Get {@link #data} | |
96 * | |
97 * @return data | |
98 */ | |
99 public String getData() { | |
100 return data; | |
101 } | |
102 | |
103 /** | |
104 * Set {@link #name} to name. | |
105 * | |
106 * @param name | |
107 */ | |
108 public void setName(String name) { | |
109 this.name = name; | |
110 } | |
111 | |
112 /** | |
113 * Get {@link #name} | |
114 * | |
115 * @return name | |
116 */ | |
117 public String getName() { | |
118 return name; | |
119 } | |
120 | |
121 /** | |
122 * Set {@link #title} to title. | |
123 * | |
124 * @param title | |
125 */ | |
126 public void setTitle(String title) { | |
127 this.title = title; | |
128 } | |
129 | |
130 /** | |
131 * Get {@link #title} | |
132 * | |
133 * @return title | |
134 */ | |
135 public String getTitle() { | |
136 return title; | |
137 } | |
138 | |
139 /** | |
140 * Set {@link #model} to model. | |
141 * | |
142 * @param model | |
143 */ | |
144 public void setModel(String model) { | |
145 this.model = model; | |
146 } | |
147 | |
148 /** | |
149 * Get {@link #model} | |
150 * | |
151 * @return model | |
152 */ | |
153 public String getModel() { | |
154 return model; | |
155 } | |
156 | |
157 /** | |
158 * Set {@link #type} to type. | |
159 * | |
160 * @param type | |
161 */ | |
162 public void setType(String type) { | |
163 this.type = type; | |
164 } | |
165 | |
166 /** | |
167 * Get {@link #type} | |
168 * | |
169 * @return type | |
170 */ | |
171 public String getType() { | |
172 return type; | |
173 } | |
174 | |
175 /** | |
176 * Set {@link #status} to status. | |
177 * | |
178 * @param status | |
179 */ | |
180 public void setStatus(String status) { | |
181 this.status = status; | |
182 } | |
183 | |
184 /** | |
185 * Get {@link #status} | |
186 * | |
187 * @return status | |
188 */ | |
189 public String getStatus() { | |
190 return status; | |
191 } | |
192 | |
193 /** | |
194 * A <code>LayerInfo</code> object is emtpy if name, data, type and status | |
195 * are null. | |
196 * | |
197 * @return True, if this object is empty - otherwise false. | |
198 */ | |
199 public boolean isEmpty() { | |
200 if (name == null && data == null && type == null && status == null) | |
201 return true; | |
202 | |
203 return false; | |
204 } | |
205 | |
206 /** | |
207 * A <code>LayerInfo</code> object is broken if name, data or type are null. | |
208 * | |
209 * @return True, if this object is broken - otherwise false. | |
210 */ | |
211 public boolean isBroken() { | |
212 if (name == null || data == null || type == null) | |
213 return true; | |
214 | |
215 return false; | |
216 } | |
217 } | |
218 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |