This project has retired. For details please refer to its
Attic page.
SearchResultHit xref
1 package org.apache.archiva.indexer.search;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.ArrayList;
23 import java.util.List;
24
25
26
27
28
29 public class SearchResultHit
30 {
31
32 private String context;
33
34
35 private String url;
36
37
38 private String groupId;
39
40
41 private String artifactId;
42
43 private String repositoryId = "";
44
45 private List<String> versions = new ArrayList<>();
46
47 private String packaging;
48
49
50
51
52 private String prefix;
53
54
55
56
57 private List<String> goals;
58
59
60
61
62
63
64 private String bundleVersion;
65
66
67
68
69
70
71 private String bundleSymbolicName;
72
73
74
75
76
77
78 private String bundleExportPackage;
79
80
81
82
83
84
85 private String bundleExportService;
86
87
88
89
90
91
92 private String bundleDescription;
93
94
95
96
97
98
99 private String bundleName;
100
101
102
103
104
105
106 private String bundleLicense;
107
108
109
110
111
112
113 private String bundleDocUrl;
114
115
116
117
118
119
120 private String bundleImportPackage;
121
122
123
124
125
126
127 private String bundleRequireBundle;
128
129 private String classifier;
130
131
132
133
134
135 private String fileExtension;
136
137 public String getContext()
138 {
139 return context;
140 }
141
142 public void setContext( String context )
143 {
144 this.context = context;
145 }
146
147 public String getUrl()
148 {
149 return url;
150 }
151
152 public void setUrl( String url )
153 {
154 this.url = url;
155 }
156
157 public String getUrlFilename()
158 {
159 return this.url.substring( this.url.lastIndexOf( '/' ) );
160 }
161
162 public String getArtifactId()
163 {
164 return artifactId;
165 }
166
167 public void setArtifactId( String artifactId )
168 {
169 this.artifactId = artifactId;
170 }
171
172 public String getGroupId()
173 {
174 return groupId;
175 }
176
177 public void setGroupId( String groupId )
178 {
179 this.groupId = groupId;
180 }
181
182 public List<String> getVersions()
183 {
184 return versions;
185 }
186
187 public void setVersions( List<String> versions )
188 {
189 this.versions = versions;
190 }
191
192 public String getRepositoryId()
193 {
194 return repositoryId;
195 }
196
197 public void setRepositoryId( String repositoryId )
198 {
199 this.repositoryId = repositoryId;
200 }
201
202 public void addVersion( String version )
203 {
204 versions.add( version );
205 }
206
207 public String getBundleVersion()
208 {
209 return bundleVersion;
210 }
211
212 public void setBundleVersion( String bundleVersion )
213 {
214 this.bundleVersion = bundleVersion;
215 }
216
217 public String getBundleSymbolicName()
218 {
219 return bundleSymbolicName;
220 }
221
222 public void setBundleSymbolicName( String bundleSymbolicName )
223 {
224 this.bundleSymbolicName = bundleSymbolicName;
225 }
226
227 public String getBundleExportPackage()
228 {
229 return bundleExportPackage;
230 }
231
232 public void setBundleExportPackage( String bundleExportPackage )
233 {
234 this.bundleExportPackage = bundleExportPackage;
235 }
236
237 public String getBundleExportService()
238 {
239 return bundleExportService;
240 }
241
242 public void setBundleExportService( String bundleExportService )
243 {
244 this.bundleExportService = bundleExportService;
245 }
246
247 public String getPrefix()
248 {
249 return prefix;
250 }
251
252 public void setPrefix( String prefix )
253 {
254 this.prefix = prefix;
255 }
256
257 public List<String> getGoals()
258 {
259 return goals;
260 }
261
262 public void setGoals( List<String> goals )
263 {
264 this.goals = goals;
265 }
266
267 public String getBundleDescription()
268 {
269 return bundleDescription;
270 }
271
272 public void setBundleDescription( String bundleDescription )
273 {
274 this.bundleDescription = bundleDescription;
275 }
276
277 public String getBundleName()
278 {
279 return bundleName;
280 }
281
282 public void setBundleName( String bundleName )
283 {
284 this.bundleName = bundleName;
285 }
286
287 public String getBundleLicense()
288 {
289 return bundleLicense;
290 }
291
292 public void setBundleLicense( String bundleLicense )
293 {
294 this.bundleLicense = bundleLicense;
295 }
296
297 public String getBundleDocUrl()
298 {
299 return bundleDocUrl;
300 }
301
302 public void setBundleDocUrl( String bundleDocUrl )
303 {
304 this.bundleDocUrl = bundleDocUrl;
305 }
306
307 public String getBundleImportPackage()
308 {
309 return bundleImportPackage;
310 }
311
312 public void setBundleImportPackage( String bundleImportPackage )
313 {
314 this.bundleImportPackage = bundleImportPackage;
315 }
316
317 public String getBundleRequireBundle()
318 {
319 return bundleRequireBundle;
320 }
321
322 public void setBundleRequireBundle( String bundleRequireBundle )
323 {
324 this.bundleRequireBundle = bundleRequireBundle;
325 }
326
327 public String getPackaging()
328 {
329 return packaging;
330 }
331
332 public void setPackaging( String packaging )
333 {
334 this.packaging = packaging;
335 }
336
337 public String getType()
338 {
339 return getPackaging();
340 }
341
342 public String getClassifier()
343 {
344 return classifier;
345 }
346
347 public void setClassifier( String classifier )
348 {
349 this.classifier = classifier;
350 }
351
352 public String getFileExtension()
353 {
354 return fileExtension;
355 }
356
357 public void setFileExtension( String fileExtension )
358 {
359 this.fileExtension = fileExtension;
360 }
361
362 @Override
363 public String toString()
364 {
365 final StringBuilder sb = new StringBuilder();
366 sb.append( "SearchResultHit" );
367 sb.append( "{context='" ).append( context ).append( '\'' );
368 sb.append( ", url='" ).append( url ).append( '\'' );
369 sb.append( ", groupId='" ).append( groupId ).append( '\'' );
370 sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
371 sb.append( ", repositoryId='" ).append( repositoryId ).append( '\'' );
372 sb.append( ", versions=" ).append( versions );
373 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
374 sb.append( ", prefix='" ).append( prefix ).append( '\'' );
375 sb.append( ", goals=" ).append( goals );
376 sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
377 sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
378 sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
379 sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
380 sb.append( ", bundleDescription='" ).append( bundleDescription ).append( '\'' );
381 sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
382 sb.append( ", bundleLicense='" ).append( bundleLicense ).append( '\'' );
383 sb.append( ", bundleDocUrl='" ).append( bundleDocUrl ).append( '\'' );
384 sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
385 sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
386 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
387 sb.append( ", fileExtension='" ).append( fileExtension ).append( '\'' );
388 sb.append( '}' );
389 return sb.toString();
390 }
391
392 @Override
393 public boolean equals( Object o )
394 {
395 if ( this == o )
396 {
397 return true;
398 }
399 if ( o == null || getClass() != o.getClass() )
400 {
401 return false;
402 }
403
404 SearchResultHit that = (SearchResultHit) o;
405
406 if ( artifactId != null ? !artifactId.equals( that.artifactId ) : that.artifactId != null )
407 {
408 return false;
409 }
410 if ( classifier != null ? !classifier.equals( that.classifier ) : that.classifier != null )
411 {
412 return false;
413 }
414 if ( groupId != null ? !groupId.equals( that.groupId ) : that.groupId != null )
415 {
416 return false;
417 }
418 if ( packaging != null ? !packaging.equals( that.packaging ) : that.packaging != null )
419 {
420 return false;
421 }
422
423 return true;
424 }
425
426 @Override
427 public int hashCode()
428 {
429 int result = groupId != null ? groupId.hashCode() : 0;
430 result = 31 * result + ( artifactId != null ? artifactId.hashCode() : 0 );
431 result = 31 * result + ( packaging != null ? packaging.hashCode() : 0 );
432 result = 31 * result + ( classifier != null ? classifier.hashCode() : 0 );
433 return result;
434 }
435 }