1 /* 2 =================== DO NOT EDIT THIS FILE ==================== 3 Generated by Modello 1.4.1 on 2013-02-24 03:31:02, 4 any modifications will be overwritten. 5 ============================================================== 6 */ 7 8 package org.apache.maven.model; 9 10 /** 11 * Describes the licenses for this project. This is used to 12 * generate the license 13 * page of the project's web site, as well as being taken 14 * into consideration in other reporting 15 * and validation. The licenses listed for the project are 16 * that of the project itself, and not 17 * of dependencies. 18 * 19 * @version $Revision$ $Date$ 20 */ 21 @SuppressWarnings( "all" ) 22 public class License 23 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 24 { 25 26 //--------------------------/ 27 //- Class/Member Variables -/ 28 //--------------------------/ 29 30 /** 31 * The full legal name of the license. 32 */ 33 private String name; 34 35 /** 36 * The official url for the license text. 37 */ 38 private String url; 39 40 /** 41 * 42 * 43 * The primary method by which this project may be 44 * distributed. 45 * <dl> 46 * <dt>repo</dt> 47 * <dd>may be downloaded from the Maven 48 * repository</dd> 49 * <dt>manual</dt> 50 * <dd>user must manually download and install 51 * the dependency.</dd> 52 * </dl> 53 * 54 * 55 */ 56 private String distribution; 57 58 /** 59 * Addendum information pertaining to this license. 60 */ 61 private String comments; 62 63 /** 64 * Field locations. 65 */ 66 private java.util.Map<Object, InputLocation> locations; 67 68 69 //-----------/ 70 //- Methods -/ 71 //-----------/ 72 73 /** 74 * Method clone. 75 * 76 * @return License 77 */ 78 public License clone() 79 { 80 try 81 { 82 License copy = (License) super.clone(); 83 84 if ( copy.locations != null ) 85 { 86 copy.locations = new java.util.LinkedHashMap( copy.locations ); 87 } 88 89 return copy; 90 } 91 catch ( java.lang.Exception ex ) 92 { 93 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 94 + " does not support clone()" ).initCause( ex ); 95 } 96 } //-- License clone() 97 98 /** 99 * 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 }