View Javadoc
1   package org.apache.maven.repository;
2   
3   /*
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
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
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
19   * under the License.
20   */
21  
22  /**
23   *
24   *
25   * @author Oleg Gusakov
26   *
27   */
28  public class MavenArtifactMetadata
29  {
30      public static final String DEFAULT_TYPE = "jar";
31  
32      String groupId;
33      String artifactId;
34      String version;
35      String classifier;
36      String type;
37      String scope;
38  
39      transient Object datum;
40  
41      public String getGroupId()
42      {
43          return groupId;
44      }
45  
46      public void setGroupId( String groupId )
47      {
48          this.groupId = groupId;
49      }
50  
51      public String getArtifactId()
52      {
53          return artifactId;
54      }
55  
56      public void setArtifactId( String artifactId )
57      {
58          this.artifactId = artifactId;
59      }
60  
61      public String getVersion()
62      {
63          return version;
64      }
65  
66      public void setVersion( String version )
67      {
68          this.version = version;
69      }
70  
71      public String getClassifier()
72      {
73          return classifier;
74      }
75  
76      public void setClassifier( String classifier )
77      {
78          this.classifier = classifier;
79      }
80  
81      public String getType()
82      {
83          return type;
84      }
85  
86      public void setType( String type )
87      {
88          this.type = type;
89      }
90  
91      public Object getDatum()
92      {
93          return datum;
94      }
95  
96      public void setDatum( Object datum )
97      {
98          this.datum = datum;
99      }
100 
101     public String getScope()
102     {
103         return scope;
104     }
105 
106     public void setScope( String scope )
107     {
108         this.scope = scope;
109     }
110 
111     @Override
112     public String toString()
113     {
114         return getGroupId() + ":" + getArtifactId() + ":" + getVersion() + ":"
115             + ( getClassifier() == null ? "" : getClassifier() ) + ":"
116             + ( getType() == null ? DEFAULT_TYPE : getType() );
117     }
118 
119 }