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