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   * @version $Id: MavenArtifactMetadata.java 958295 2010-06-26 23:16:18Z hboutemy $
27   *
28   */
29  public class MavenArtifactMetadata
30  {
31      public static final String DEFAULT_TYPE = "jar";
32  
33      String groupId;
34      String artifactId;
35      String version;
36      String classifier;
37      String type;
38      String scope;
39  
40      transient Object datum;
41  
42      public String getGroupId()
43      {
44          return groupId;
45      }
46  
47      public void setGroupId( String groupId )
48      {
49          this.groupId = groupId;
50      }
51  
52      public String getArtifactId()
53      {
54          return artifactId;
55      }
56  
57      public void setArtifactId( String artifactId )
58      {
59          this.artifactId = artifactId;
60      }
61  
62      public String getVersion()
63      {
64          return version;
65      }
66  
67      public void setVersion( String version )
68      {
69          this.version = version;
70      }
71  
72      public String getClassifier()
73      {
74          return classifier;
75      }
76  
77      public void setClassifier( String classifier )
78      {
79          this.classifier = classifier;
80      }
81  
82      public String getType()
83      {
84          return type;
85      }
86  
87      public void setType( String type )
88      {
89          this.type = type;
90      }
91  
92      public Object getDatum()
93      {
94          return datum;
95      }
96  
97      public void setDatum( Object datum )
98      {
99          this.datum = datum;
100     }
101 
102     public String getScope()
103     {
104         return scope;
105     }
106 
107     public void setScope( String scope )
108     {
109         this.scope = scope;
110     }
111 
112     @Override
113     public String toString()
114     {
115         return getGroupId() + ":" + getArtifactId() + ":" + getVersion() + ":"
116             + ( getClassifier() == null ? "" : getClassifier() ) + ":"
117             + ( getType() == null ? DEFAULT_TYPE : getType() );
118     }
119 
120 }