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