View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.repository;
20  
21  /**
22   *
23   *
24   * @author Oleg Gusakov
25   *
26   */
27  public class MavenArtifactMetadata {
28      public static final String DEFAULT_TYPE = "jar";
29  
30      String groupId;
31      String artifactId;
32      String version;
33      String classifier;
34      String type;
35      String scope;
36  
37      transient Object datum;
38  
39      public String getGroupId() {
40          return groupId;
41      }
42  
43      public void setGroupId(String groupId) {
44          this.groupId = groupId;
45      }
46  
47      public String getArtifactId() {
48          return artifactId;
49      }
50  
51      public void setArtifactId(String artifactId) {
52          this.artifactId = artifactId;
53      }
54  
55      public String getVersion() {
56          return version;
57      }
58  
59      public void setVersion(String version) {
60          this.version = version;
61      }
62  
63      public String getClassifier() {
64          return classifier;
65      }
66  
67      public void setClassifier(String classifier) {
68          this.classifier = classifier;
69      }
70  
71      public String getType() {
72          return type;
73      }
74  
75      public void setType(String type) {
76          this.type = type;
77      }
78  
79      public Object getDatum() {
80          return datum;
81      }
82  
83      public void setDatum(Object datum) {
84          this.datum = datum;
85      }
86  
87      public String getScope() {
88          return scope;
89      }
90  
91      public void setScope(String scope) {
92          this.scope = scope;
93      }
94  
95      @Override
96      public String toString() {
97          return getGroupId() + ":" + getArtifactId() + ":" + getVersion() + ":"
98                  + (getClassifier() == null ? "" : getClassifier()) + ":"
99                  + (getType() == null ? DEFAULT_TYPE : getType());
100     }
101 }