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;
25 @XmlRootElement( name = "dependency" )
26 public class Dependency
27 implements Serializable
29 private String groupId;
31 private String artifactId;
33 private String version;
35 private String classifier;
42 public String toString()
44 return "Dependency{" + "groupId='" + groupId + '\'' + ", artifactId='" + artifactId + '\'' + ", version='"
45 + version + '\'' + ", classifier='" + classifier + '\'' + ", type='" + type + '\'' + ", scope='" + scope
50 public boolean equals( Object o )
56 if ( o == null || getClass() != o.getClass() )
61 Dependency that = (Dependency) o;
63 if ( !artifactId.equals( that.artifactId ) )
67 if ( classifier != null ? !classifier.equals( that.classifier ) : that.classifier != null )
71 if ( !groupId.equals( that.groupId ) )
75 if ( scope != null ? !scope.equals( that.scope ) : that.scope != null )
79 if ( type != null ? !type.equals( that.type ) : that.type != null )
83 if ( !version.equals( that.version ) )
94 int result = groupId.hashCode();
95 result = 31 * result + artifactId.hashCode();
96 result = 31 * result + version.hashCode();
97 result = 31 * result + ( classifier != null ? classifier.hashCode() : 0 );
98 result = 31 * result + ( type != null ? type.hashCode() : 0 );
99 result = 31 * result + ( scope != null ? scope.hashCode() : 0 );
103 public Dependency( String groupId, String artifactId, String version, String classifier, String type, String scope )
105 this.groupId = groupId;
106 this.artifactId = artifactId;
107 this.version = version;
108 this.classifier = classifier;
113 public String getGroupId()
118 public void setGroupId( String groupId )
120 this.groupId = groupId;
123 public String getArtifactId()
128 public void setArtifactId( String artifactId )
130 this.artifactId = artifactId;
133 public String getVersion()
138 public void setVersion( String version )
140 this.version = version;
143 public String getClassifier()
148 public void setClassifier( String classifier )
150 this.classifier = classifier;
153 public String getType()
158 public void setType( String type )
163 public String getScope()
168 public void setScope( String scope )