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