001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2013-02-24 03:32:14,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.model;
009    
010    /**
011     * Description of a person who has contributed to the project, but
012     * who does not have
013     *         commit privileges. Usually, these contributions come in
014     * the form of patches submitted.
015     * 
016     * @version $Revision$ $Date$
017     */
018    @SuppressWarnings( "all" )
019    public class Contributor
020        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
021    {
022    
023          //--------------------------/
024         //- Class/Member Variables -/
025        //--------------------------/
026    
027        /**
028         * The full name of the contributor.
029         */
030        private String name;
031    
032        /**
033         * The email address of the contributor.
034         */
035        private String email;
036    
037        /**
038         * The URL for the homepage of the contributor.
039         */
040        private String url;
041    
042        /**
043         * The organization to which the contributor belongs.
044         */
045        private String organization;
046    
047        /**
048         * The URL of the organization.
049         */
050        private String organizationUrl;
051    
052        /**
053         * Field roles.
054         */
055        private java.util.List<String> roles;
056    
057        /**
058         * 
059         *             
060         *               The timezone the contributor is in. Typically,
061         * this is a number in the range
062         *               <a
063         * href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a>
064         * to <a
065         * href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a>
066         *               or a valid time zone id like
067         * "America/Montreal" (UTC-05:00) or "Europe/Paris"
068         * (UTC+01:00).
069         *             
070         *           
071         */
072        private String timezone;
073    
074        /**
075         * Field properties.
076         */
077        private java.util.Properties properties;
078    
079        /**
080         * Field locations.
081         */
082        private java.util.Map<Object, InputLocation> locations;
083    
084    
085          //-----------/
086         //- Methods -/
087        //-----------/
088    
089        /**
090         * Method addProperty.
091         * 
092         * @param key
093         * @param value
094         */
095        public void addProperty( String key, String value )
096        {
097            getProperties().put( key, value );
098        } //-- void addProperty( String, String )
099    
100        /**
101         * Method addRole.
102         * 
103         * @param string
104         */
105        public void addRole( String string )
106        {
107            getRoles().add( string );
108        } //-- void addRole( String )
109    
110        /**
111         * Method clone.
112         * 
113         * @return Contributor
114         */
115        public Contributor clone()
116        {
117            try
118            {
119                Contributor copy = (Contributor) super.clone();
120    
121                if ( this.roles != null )
122                {
123                    copy.roles = new java.util.ArrayList<String>();
124                    copy.roles.addAll( this.roles );
125                }
126    
127                if ( this.properties != null )
128                {
129                    copy.properties = (java.util.Properties) this.properties.clone();
130                }
131    
132                if ( copy.locations != null )
133                {
134                    copy.locations = new java.util.LinkedHashMap( copy.locations );
135                }
136    
137                return copy;
138            }
139            catch ( java.lang.Exception ex )
140            {
141                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
142                    + " does not support clone()" ).initCause( ex );
143            }
144        } //-- Contributor clone()
145    
146        /**
147         * Get the email address of the contributor.
148         * 
149         * @return String
150         */
151        public String getEmail()
152        {
153            return this.email;
154        } //-- String getEmail()
155    
156        /**
157         * 
158         * 
159         * @param key
160         * @return InputLocation
161         */
162        public InputLocation getLocation( Object key )
163        {
164            return ( locations != null ) ? locations.get( key ) : null;
165        } //-- InputLocation getLocation( Object )
166    
167        /**
168         * Get the full name of the contributor.
169         * 
170         * @return String
171         */
172        public String getName()
173        {
174            return this.name;
175        } //-- String getName()
176    
177        /**
178         * Get the organization to which the contributor belongs.
179         * 
180         * @return String
181         */
182        public String getOrganization()
183        {
184            return this.organization;
185        } //-- String getOrganization()
186    
187        /**
188         * Get the URL of the organization.
189         * 
190         * @return String
191         */
192        public String getOrganizationUrl()
193        {
194            return this.organizationUrl;
195        } //-- String getOrganizationUrl()
196    
197        /**
198         * Method getProperties.
199         * 
200         * @return Properties
201         */
202        public java.util.Properties getProperties()
203        {
204            if ( this.properties == null )
205            {
206                this.properties = new java.util.Properties();
207            }
208    
209            return this.properties;
210        } //-- java.util.Properties getProperties()
211    
212        /**
213         * Method getRoles.
214         * 
215         * @return List
216         */
217        public java.util.List<String> getRoles()
218        {
219            if ( this.roles == null )
220            {
221                this.roles = new java.util.ArrayList<String>();
222            }
223    
224            return this.roles;
225        } //-- java.util.List<String> getRoles()
226    
227        /**
228         * Get the timezone the contributor is in. Typically, this is a
229         * number in the range
230         *               <a
231         * href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a>
232         * to <a
233         * href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a>
234         *               or a valid time zone id like
235         * "America/Montreal" (UTC-05:00) or "Europe/Paris"
236         * (UTC+01:00).
237         * 
238         * @return String
239         */
240        public String getTimezone()
241        {
242            return this.timezone;
243        } //-- String getTimezone()
244    
245        /**
246         * Get the URL for the homepage of the contributor.
247         * 
248         * @return String
249         */
250        public String getUrl()
251        {
252            return this.url;
253        } //-- String getUrl()
254    
255        /**
256         * Method removeRole.
257         * 
258         * @param string
259         */
260        public void removeRole( String string )
261        {
262            getRoles().remove( string );
263        } //-- void removeRole( String )
264    
265        /**
266         * Set the email address of the contributor.
267         * 
268         * @param email
269         */
270        public void setEmail( String email )
271        {
272            this.email = email;
273        } //-- void setEmail( String )
274    
275        /**
276         * 
277         * 
278         * @param key
279         * @param location
280         */
281        public void setLocation( Object key, InputLocation location )
282        {
283            if ( location != null )
284            {
285                if ( this.locations == null )
286                {
287                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
288                }
289                this.locations.put( key, location );
290            }
291        } //-- void setLocation( Object, InputLocation )
292    
293        /**
294         * Set the full name of the contributor.
295         * 
296         * @param name
297         */
298        public void setName( String name )
299        {
300            this.name = name;
301        } //-- void setName( String )
302    
303        /**
304         * Set the organization to which the contributor belongs.
305         * 
306         * @param organization
307         */
308        public void setOrganization( String organization )
309        {
310            this.organization = organization;
311        } //-- void setOrganization( String )
312    
313        /**
314         * Set the URL of the organization.
315         * 
316         * @param organizationUrl
317         */
318        public void setOrganizationUrl( String organizationUrl )
319        {
320            this.organizationUrl = organizationUrl;
321        } //-- void setOrganizationUrl( String )
322    
323        /**
324         * Set properties about the contributor, such as an instant
325         * messenger handle.
326         * 
327         * @param properties
328         */
329        public void setProperties( java.util.Properties properties )
330        {
331            this.properties = properties;
332        } //-- void setProperties( java.util.Properties )
333    
334        /**
335         * Set the roles the contributor plays in the project. Each
336         * role is described by a
337         *             <code>role</code> element, the body of which is
338         * a role name. This can also be used to
339         *             describe the contribution.
340         * 
341         * @param roles
342         */
343        public void setRoles( java.util.List<String> roles )
344        {
345            this.roles = roles;
346        } //-- void setRoles( java.util.List )
347    
348        /**
349         * Set the timezone the contributor is in. Typically, this is a
350         * number in the range
351         *               <a
352         * href="http://en.wikipedia.org/wiki/UTC%E2%88%9212:00">-12</a>
353         * to <a
354         * href="http://en.wikipedia.org/wiki/UTC%2B14:00">+14</a>
355         *               or a valid time zone id like
356         * "America/Montreal" (UTC-05:00) or "Europe/Paris"
357         * (UTC+01:00).
358         * 
359         * @param timezone
360         */
361        public void setTimezone( String timezone )
362        {
363            this.timezone = timezone;
364        } //-- void setTimezone( String )
365    
366        /**
367         * Set the URL for the homepage of the contributor.
368         * 
369         * @param url
370         */
371        public void setUrl( String url )
372        {
373            this.url = url;
374        } //-- void setUrl( String )
375    
376    }