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