1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.model;
25
26
27
28
29
30
31 @SuppressWarnings( "all" )
32 public class Organization
33 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
34 {
35
36
37
38
39
40
41
42
43 private String name;
44
45
46
47
48 private String url;
49
50
51
52
53 private java.util.Map<Object, InputLocation> locations;
54
55
56
57
58 private InputLocation location;
59
60
61
62
63 private InputLocation nameLocation;
64
65
66
67
68 private InputLocation urlLocation;
69
70
71
72
73
74
75
76
77
78
79
80 public Organization clone()
81 {
82 try
83 {
84 Organization copy = (Organization) super.clone();
85
86 if ( copy.locations != null )
87 {
88 copy.locations = new java.util.LinkedHashMap( copy.locations );
89 }
90
91 return copy;
92 }
93 catch ( java.lang.Exception ex )
94 {
95 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
96 + " does not support clone()" ).initCause( ex );
97 }
98 }
99
100
101
102
103
104
105
106 public InputLocation getLocation( Object key )
107 {
108 if ( key instanceof String )
109 {
110 switch ( ( String ) key )
111 {
112 case "" :
113 {
114 return this.location;
115 }
116 case "name" :
117 {
118 return nameLocation;
119 }
120 case "url" :
121 {
122 return urlLocation;
123 }
124 default :
125 {
126 return getOtherLocation( key );
127 }
128 }
129 }
130 else
131 {
132 return getOtherLocation( key );
133 }
134 }
135
136
137
138
139
140
141 public String getName()
142 {
143 return this.name;
144 }
145
146
147
148
149
150
151
152 public void setLocation( Object key, InputLocation location )
153 {
154 if ( key instanceof String )
155 {
156 switch ( ( String ) key )
157 {
158 case "" :
159 {
160 this.location = location;
161 return;
162 }
163 case "name" :
164 {
165 nameLocation = location;
166 return;
167 }
168 case "url" :
169 {
170 urlLocation = location;
171 return;
172 }
173 default :
174 {
175 setOtherLocation( key, location );
176 return;
177 }
178 }
179 }
180 else
181 {
182 setOtherLocation( key, location );
183 }
184 }
185
186
187
188
189
190
191
192 public void setOtherLocation( Object key, InputLocation location )
193 {
194 if ( location != null )
195 {
196 if ( this.locations == null )
197 {
198 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
199 }
200 this.locations.put( key, location );
201 }
202 }
203
204
205
206
207
208
209
210 private InputLocation getOtherLocation( Object key )
211 {
212 return ( locations != null ) ? locations.get( key ) : null;
213 }
214
215
216
217
218
219
220 public String getUrl()
221 {
222 return this.url;
223 }
224
225
226
227
228
229
230 public void setName( String name )
231 {
232 this.name = name;
233 }
234
235
236
237
238
239
240 public void setUrl( String url )
241 {
242 this.url = url;
243 }
244
245
246
247
248
249
250 public String toString()
251 {
252 return "Organization {name=" + name + ", url=" + url + "}";
253 }
254
255
256 }