001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2013-02-24 03:31:02,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.model;
009    
010    /**
011     * Describes the licenses for this project. This is used to
012     * generate the license
013     *         page of the project's web site, as well as being taken
014     * into consideration in other reporting
015     *         and validation. The licenses listed for the project are
016     * that of the project itself, and not
017     *         of dependencies.
018     * 
019     * @version $Revision$ $Date$
020     */
021    @SuppressWarnings( "all" )
022    public class License
023        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
024    {
025    
026          //--------------------------/
027         //- Class/Member Variables -/
028        //--------------------------/
029    
030        /**
031         * The full legal name of the license.
032         */
033        private String name;
034    
035        /**
036         * The official url for the license text.
037         */
038        private String url;
039    
040        /**
041         * 
042         *             
043         *             The primary method by which this project may be
044         * distributed.
045         *             <dl>
046         *               <dt>repo</dt>
047         *               <dd>may be downloaded from the Maven
048         * repository</dd>
049         *               <dt>manual</dt>
050         *               <dd>user must manually download and install
051         * the dependency.</dd>
052         *             </dl>
053         *             
054         *           
055         */
056        private String distribution;
057    
058        /**
059         * Addendum information pertaining to this license.
060         */
061        private String comments;
062    
063        /**
064         * Field locations.
065         */
066        private java.util.Map<Object, InputLocation> locations;
067    
068    
069          //-----------/
070         //- Methods -/
071        //-----------/
072    
073        /**
074         * Method clone.
075         * 
076         * @return License
077         */
078        public License clone()
079        {
080            try
081            {
082                License copy = (License) super.clone();
083    
084                if ( copy.locations != null )
085                {
086                    copy.locations = new java.util.LinkedHashMap( copy.locations );
087                }
088    
089                return copy;
090            }
091            catch ( java.lang.Exception ex )
092            {
093                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
094                    + " does not support clone()" ).initCause( ex );
095            }
096        } //-- License clone()
097    
098        /**
099         * Get addendum information pertaining to this license.
100         * 
101         * @return String
102         */
103        public String getComments()
104        {
105            return this.comments;
106        } //-- String getComments()
107    
108        /**
109         * Get the primary method by which this project may be
110         * distributed.
111         *             <dl>
112         *               <dt>repo</dt>
113         *               <dd>may be downloaded from the Maven
114         * repository</dd>
115         *               <dt>manual</dt>
116         *               <dd>user must manually download and install
117         * the dependency.</dd>
118         *             </dl>
119         * 
120         * @return String
121         */
122        public String getDistribution()
123        {
124            return this.distribution;
125        } //-- String getDistribution()
126    
127        /**
128         * 
129         * 
130         * @param key
131         * @return InputLocation
132         */
133        public InputLocation getLocation( Object key )
134        {
135            return ( locations != null ) ? locations.get( key ) : null;
136        } //-- InputLocation getLocation( Object )
137    
138        /**
139         * Get the full legal name of the license.
140         * 
141         * @return String
142         */
143        public String getName()
144        {
145            return this.name;
146        } //-- String getName()
147    
148        /**
149         * Get the official url for the license text.
150         * 
151         * @return String
152         */
153        public String getUrl()
154        {
155            return this.url;
156        } //-- String getUrl()
157    
158        /**
159         * Set addendum information pertaining to this license.
160         * 
161         * @param comments
162         */
163        public void setComments( String comments )
164        {
165            this.comments = comments;
166        } //-- void setComments( String )
167    
168        /**
169         * Set the primary method by which this project may be
170         * distributed.
171         *             <dl>
172         *               <dt>repo</dt>
173         *               <dd>may be downloaded from the Maven
174         * repository</dd>
175         *               <dt>manual</dt>
176         *               <dd>user must manually download and install
177         * the dependency.</dd>
178         *             </dl>
179         * 
180         * @param distribution
181         */
182        public void setDistribution( String distribution )
183        {
184            this.distribution = distribution;
185        } //-- void setDistribution( String )
186    
187        /**
188         * 
189         * 
190         * @param key
191         * @param location
192         */
193        public void setLocation( Object key, InputLocation location )
194        {
195            if ( location != null )
196            {
197                if ( this.locations == null )
198                {
199                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
200                }
201                this.locations.put( key, location );
202            }
203        } //-- void setLocation( Object, InputLocation )
204    
205        /**
206         * Set the full legal name of the license.
207         * 
208         * @param name
209         */
210        public void setName( String name )
211        {
212            this.name = name;
213        } //-- void setName( String )
214    
215        /**
216         * Set the official url for the license text.
217         * 
218         * @param url
219         */
220        public void setUrl( String url )
221        {
222            this.url = url;
223        } //-- void setUrl( String )
224    
225    }