1 package org.apache.archiva.rest.api.model;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import javax.xml.bind.annotation.XmlRootElement;
23 import java.io.Serializable;
24 import java.util.List;
26 @XmlRootElement( name = "artifact" )
28 implements Serializable
30 // The (optional) context for this result.
31 private String context;
33 // Basic hit, direct to non-artifact resource.
36 // Advanced hit, reference to groupId.
37 private String groupId;
39 // Advanced hit, reference to artifactId.
40 private String artifactId;
42 private String repositoryId;
44 private String version;
47 * Plugin goal prefix (only if packaging is "maven-plugin")
49 private String prefix;
52 * Plugin goals (only if packaging is "maven-plugin")
54 private List<String> goals;
57 * contains osgi metadata Bundle-Version if available
61 private String bundleVersion;
64 * contains osgi metadata Bundle-SymbolicName if available
68 private String bundleSymbolicName;
71 * contains osgi metadata Export-Package if available
75 private String bundleExportPackage;
78 * contains osgi metadata Export-Service if available
82 private String bundleExportService;
85 * contains osgi metadata Bundle-Description if available
89 private String bundleDescription;
92 * contains osgi metadata Bundle-Name if available
96 private String bundleName;
99 * contains osgi metadata Bundle-License if available
103 private String bundleLicense;
106 * contains osgi metadata Bundle-DocURL if available
110 private String bundleDocUrl;
113 * contains osgi metadata Import-Package if available
117 private String bundleImportPackage;
120 * contains osgi metadata Require-Bundle if available
124 private String bundleRequireBundle;
126 private String classifier;
128 private String packaging;
131 * file extension of the search result
134 private String fileExtension;
142 public String getGroupId()
147 public String getArtifactId()
152 public String getVersion()
157 public String getRepositoryId()
162 public void setGroupId( String groupId )
164 this.groupId = groupId;
167 public void setArtifactId( String artifactId )
169 this.artifactId = artifactId;
172 public void setVersion( String version )
174 this.version = version;
177 public void setRepositoryId( String repositoryId )
179 this.repositoryId = repositoryId;
182 public String getContext()
187 public void setContext( String context )
189 this.context = context;
192 public String getUrl()
197 public void setUrl( String url )
202 public String getPrefix()
207 public void setPrefix( String prefix )
209 this.prefix = prefix;
212 public List<String> getGoals()
217 public void setGoals( List<String> goals )
222 public String getBundleVersion()
224 return bundleVersion;
227 public void setBundleVersion( String bundleVersion )
229 this.bundleVersion = bundleVersion;
232 public String getBundleSymbolicName()
234 return bundleSymbolicName;
237 public void setBundleSymbolicName( String bundleSymbolicName )
239 this.bundleSymbolicName = bundleSymbolicName;
242 public String getBundleExportPackage()
244 return bundleExportPackage;
247 public void setBundleExportPackage( String bundleExportPackage )
249 this.bundleExportPackage = bundleExportPackage;
252 public String getBundleExportService()
254 return bundleExportService;
257 public void setBundleExportService( String bundleExportService )
259 this.bundleExportService = bundleExportService;
262 public String getBundleDescription()
264 return bundleDescription;
267 public void setBundleDescription( String bundleDescription )
269 this.bundleDescription = bundleDescription;
272 public String getBundleName()
277 public void setBundleName( String bundleName )
279 this.bundleName = bundleName;
282 public String getBundleLicense()
284 return bundleLicense;
287 public void setBundleLicense( String bundleLicense )
289 this.bundleLicense = bundleLicense;
292 public String getBundleDocUrl()
297 public void setBundleDocUrl( String bundleDocUrl )
299 this.bundleDocUrl = bundleDocUrl;
302 public String getBundleImportPackage()
304 return bundleImportPackage;
307 public void setBundleImportPackage( String bundleImportPackage )
309 this.bundleImportPackage = bundleImportPackage;
312 public String getBundleRequireBundle()
314 return bundleRequireBundle;
317 public void setBundleRequireBundle( String bundleRequireBundle )
319 this.bundleRequireBundle = bundleRequireBundle;
322 public String getClassifier()
327 public void setClassifier( String classifier )
329 this.classifier = classifier;
333 public String getPackaging()
338 public void setPackaging( String packaging )
340 this.packaging = packaging;
343 public String getFileExtension()
345 return fileExtension;
348 public void setFileExtension( String fileExtension )
350 this.fileExtension = fileExtension;
354 public String toString()
356 final StringBuilder sb = new StringBuilder();
357 sb.append( "Artifact" );
358 sb.append( "{context='" ).append( context ).append( '\'' );
359 sb.append( ", url='" ).append( url ).append( '\'' );
360 sb.append( ", groupId='" ).append( groupId ).append( '\'' );
361 sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
362 sb.append( ", repositoryId='" ).append( repositoryId ).append( '\'' );
363 sb.append( ", version='" ).append( version ).append( '\'' );
364 sb.append( ", prefix='" ).append( prefix ).append( '\'' );
365 sb.append( ", goals=" ).append( goals );
366 sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
367 sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
368 sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
369 sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
370 sb.append( ", bundleDescription='" ).append( bundleDescription ).append( '\'' );
371 sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
372 sb.append( ", bundleLicense='" ).append( bundleLicense ).append( '\'' );
373 sb.append( ", bundleDocUrl='" ).append( bundleDocUrl ).append( '\'' );
374 sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
375 sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
376 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
377 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
378 sb.append( ", fileExtension='" ).append( fileExtension ).append( '\'' );
380 return sb.toString();