001    package org.apache.maven.repository;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one
005     * or more contributor license agreements.  See the NOTICE file
006     * distributed with this work for additional information
007     * regarding copyright ownership.  The ASF licenses this file
008     * to you under the Apache License, Version 2.0 (the
009     * "License"); you may not use this file except in compliance
010     * with the License.  You may obtain a copy of the License at
011     *
012     *   http://www.apache.org/licenses/LICENSE-2.0
013     *
014     * Unless required by applicable law or agreed to in writing,
015     * software distributed under the License is distributed on an
016     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017     * KIND, either express or implied.  See the License for the
018     * specific language governing permissions and limitations
019     * under the License.
020     */
021    
022    /**
023     *
024     *
025     * @author Oleg Gusakov
026     *
027     */
028    public class MavenArtifactMetadata
029    {
030        public static final String DEFAULT_TYPE = "jar";
031    
032        String groupId;
033        String artifactId;
034        String version;
035        String classifier;
036        String type;
037        String scope;
038    
039        transient Object datum;
040    
041        public String getGroupId()
042        {
043            return groupId;
044        }
045    
046        public void setGroupId( String groupId )
047        {
048            this.groupId = groupId;
049        }
050    
051        public String getArtifactId()
052        {
053            return artifactId;
054        }
055    
056        public void setArtifactId( String artifactId )
057        {
058            this.artifactId = artifactId;
059        }
060    
061        public String getVersion()
062        {
063            return version;
064        }
065    
066        public void setVersion( String version )
067        {
068            this.version = version;
069        }
070    
071        public String getClassifier()
072        {
073            return classifier;
074        }
075    
076        public void setClassifier( String classifier )
077        {
078            this.classifier = classifier;
079        }
080    
081        public String getType()
082        {
083            return type;
084        }
085    
086        public void setType( String type )
087        {
088            this.type = type;
089        }
090    
091        public Object getDatum()
092        {
093            return datum;
094        }
095    
096        public void setDatum( Object datum )
097        {
098            this.datum = datum;
099        }
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    }