View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * Specifies the organization that produces this project.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class Organization
15      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * The full name of the organization.
24       */
25      private String name;
26  
27      /**
28       * The URL to the organization's home page.
29       */
30      private String url;
31  
32      /**
33       * Field locations.
34       */
35      private java.util.Map<Object, InputLocation> locations;
36  
37      /**
38       * Field location.
39       */
40      private InputLocation location;
41  
42      /**
43       * Field nameLocation.
44       */
45      private InputLocation nameLocation;
46  
47      /**
48       * Field urlLocation.
49       */
50      private InputLocation urlLocation;
51  
52  
53        //-----------/
54       //- Methods -/
55      //-----------/
56  
57      /**
58       * Method clone.
59       * 
60       * @return Organization
61       */
62      public Organization clone()
63      {
64          try
65          {
66              Organization copy = (Organization) super.clone();
67  
68              if ( copy.locations != null )
69              {
70                  copy.locations = new java.util.LinkedHashMap( copy.locations );
71              }
72  
73              return copy;
74          }
75          catch ( java.lang.Exception ex )
76          {
77              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
78                  + " does not support clone()" ).initCause( ex );
79          }
80      } //-- Organization clone()
81  
82      /**
83       * 
84       * 
85       * @param key
86       * @return InputLocation
87       */
88      public InputLocation getLocation( Object key )
89      {
90          if ( key instanceof String )
91          {
92              switch ( ( String ) key )
93              {
94                  case "" :
95                  {
96                      return this.location;
97                  }
98                  case "name" :
99                  {
100                     return nameLocation;
101                 }
102                 case "url" :
103                 {
104                     return urlLocation;
105                 }
106                 default :
107                 {
108                     return getOtherLocation( key );
109                 }
110                 }
111             }
112             else
113             {
114                 return getOtherLocation( key );
115             }
116     } //-- InputLocation getLocation( Object )
117 
118     /**
119      * Get the full name of the organization.
120      * 
121      * @return String
122      */
123     public String getName()
124     {
125         return this.name;
126     } //-- String getName()
127 
128     /**
129      * 
130      * 
131      * @param key
132      * @param location
133      */
134     public void setLocation( Object key, InputLocation location )
135     {
136         if ( key instanceof String )
137         {
138             switch ( ( String ) key )
139             {
140                 case "" :
141                 {
142                     this.location = location;
143                     return;
144                 }
145                 case "name" :
146                 {
147                     nameLocation = location;
148                     return;
149                 }
150                 case "url" :
151                 {
152                     urlLocation = location;
153                     return;
154                 }
155                 default :
156                 {
157                     setOtherLocation( key, location );
158                     return;
159                 }
160                 }
161             }
162             else
163             {
164                 setOtherLocation( key, location );
165             }
166     } //-- void setLocation( Object, InputLocation )
167 
168     /**
169      * 
170      * 
171      * @param key
172      * @param location
173      */
174     public void setOtherLocation( Object key, InputLocation location )
175     {
176         if ( location != null )
177         {
178             if ( this.locations == null )
179             {
180                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
181             }
182             this.locations.put( key, location );
183         }
184     } //-- void setOtherLocation( Object, InputLocation )
185 
186     /**
187      * 
188      * 
189      * @param key
190      * @return InputLocation
191      */
192     private InputLocation getOtherLocation( Object key )
193     {
194         return ( locations != null ) ? locations.get( key ) : null;
195     } //-- InputLocation getOtherLocation( Object )
196 
197     /**
198      * Get the URL to the organization's home page.
199      * 
200      * @return String
201      */
202     public String getUrl()
203     {
204         return this.url;
205     } //-- String getUrl()
206 
207     /**
208      * Set the full name of the organization.
209      * 
210      * @param name
211      */
212     public void setName( String name )
213     {
214         this.name = name;
215     } //-- void setName( String )
216 
217     /**
218      * Set the URL to the organization's home page.
219      * 
220      * @param url
221      */
222     public void setUrl( String url )
223     {
224         this.url = url;
225     } //-- void setUrl( String )
226 
227     
228             
229     /**
230      * @see java.lang.Object#toString()
231      */
232     public String toString()
233     {
234         return "Organization {name=" + name + ", url=" + url + "}";
235     }
236             
237           
238 }