001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.model;
009    
010    /**
011     * 
012     *         
013     *         The <code>&lt;scm&gt;</code> element contains
014     * informations required to the SCM
015     *         (Source Control Management) of the project.
016     *         
017     *       
018     * 
019     * @version $Revision$ $Date$
020     */
021    @SuppressWarnings( "all" )
022    public class Scm
023        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
024    {
025    
026          //--------------------------/
027         //- Class/Member Variables -/
028        //--------------------------/
029    
030        /**
031         * 
032         *             
033         *             The source control management system URL
034         *             that describes the repository and how to connect
035         * to the
036         *             repository. For more information, see the
037         *             <a
038         * href="http://maven.apache.org/scm/scm-url-format.html">URL
039         * format</a>
040         *             and <a
041         * href="http://maven.apache.org/scm/scms-overview.html">list
042         * of supported SCMs</a>.
043         *             This connection is read-only.
044         *             
045         *           
046         */
047        private String connection;
048    
049        /**
050         * 
051         *             
052         *             Just like <code>connection</code>, but for
053         * developers, i.e. this scm connection
054         *             will not be read only.
055         *             
056         *           
057         */
058        private String developerConnection;
059    
060        /**
061         * The tag of current code. By default, it's set to HEAD during
062         * development.
063         */
064        private String tag = "HEAD";
065    
066        /**
067         * The URL to the project's browsable SCM repository, such as
068         * ViewVC or Fisheye.
069         */
070        private String url;
071    
072        /**
073         * Field locations.
074         */
075        private java.util.Map<Object, InputLocation> locations;
076    
077    
078          //-----------/
079         //- Methods -/
080        //-----------/
081    
082        /**
083         * Method clone.
084         * 
085         * @return Scm
086         */
087        public Scm clone()
088        {
089            try
090            {
091                Scm copy = (Scm) super.clone();
092    
093                if ( copy.locations != null )
094                {
095                    copy.locations = new java.util.LinkedHashMap( copy.locations );
096                }
097    
098                return copy;
099            }
100            catch ( java.lang.Exception ex )
101            {
102                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
103                    + " does not support clone()" ).initCause( ex );
104            }
105        } //-- Scm clone()
106    
107        /**
108         * Get the source control management system URL
109         *             that describes the repository and how to connect
110         * to the
111         *             repository. For more information, see the
112         *             <a
113         * href="http://maven.apache.org/scm/scm-url-format.html">URL
114         * format</a>
115         *             and <a
116         * href="http://maven.apache.org/scm/scms-overview.html">list
117         * of supported SCMs</a>.
118         *             This connection is read-only.
119         * 
120         * @return String
121         */
122        public String getConnection()
123        {
124            return this.connection;
125        } //-- String getConnection()
126    
127        /**
128         * Get just like <code>connection</code>, but for developers,
129         * i.e. this scm connection
130         *             will not be read only.
131         * 
132         * @return String
133         */
134        public String getDeveloperConnection()
135        {
136            return this.developerConnection;
137        } //-- String getDeveloperConnection()
138    
139        /**
140         * 
141         * 
142         * @param key
143         * @return InputLocation
144         */
145        public InputLocation getLocation( Object key )
146        {
147            return ( locations != null ) ? locations.get( key ) : null;
148        } //-- InputLocation getLocation( Object )
149    
150        /**
151         * Get the tag of current code. By default, it's set to HEAD
152         * during development.
153         * 
154         * @return String
155         */
156        public String getTag()
157        {
158            return this.tag;
159        } //-- String getTag()
160    
161        /**
162         * Get the URL to the project's browsable SCM repository, such
163         * as ViewVC or Fisheye.
164         * 
165         * @return String
166         */
167        public String getUrl()
168        {
169            return this.url;
170        } //-- String getUrl()
171    
172        /**
173         * Set the source control management system URL
174         *             that describes the repository and how to connect
175         * to the
176         *             repository. For more information, see the
177         *             <a
178         * href="http://maven.apache.org/scm/scm-url-format.html">URL
179         * format</a>
180         *             and <a
181         * href="http://maven.apache.org/scm/scms-overview.html">list
182         * of supported SCMs</a>.
183         *             This connection is read-only.
184         * 
185         * @param connection
186         */
187        public void setConnection( String connection )
188        {
189            this.connection = connection;
190        } //-- void setConnection( String )
191    
192        /**
193         * Set just like <code>connection</code>, but for developers,
194         * i.e. this scm connection
195         *             will not be read only.
196         * 
197         * @param developerConnection
198         */
199        public void setDeveloperConnection( String developerConnection )
200        {
201            this.developerConnection = developerConnection;
202        } //-- void setDeveloperConnection( String )
203    
204        /**
205         * 
206         * 
207         * @param key
208         * @param location
209         */
210        public void setLocation( Object key, InputLocation location )
211        {
212            if ( location != null )
213            {
214                if ( this.locations == null )
215                {
216                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
217                }
218                this.locations.put( key, location );
219            }
220        } //-- void setLocation( Object, InputLocation )
221    
222        /**
223         * Set the tag of current code. By default, it's set to HEAD
224         * during development.
225         * 
226         * @param tag
227         */
228        public void setTag( String tag )
229        {
230            this.tag = tag;
231        } //-- void setTag( String )
232    
233        /**
234         * Set the URL to the project's browsable SCM repository, such
235         * as ViewVC or Fisheye.
236         * 
237         * @param url
238         */
239        public void setUrl( String url )
240        {
241            this.url = url;
242        } //-- void setUrl( String )
243    
244    }