1 /* 2 Licensed to the Apache Software Foundation (ASF) under one 3 or more contributor license agreements. See the NOTICE file 4 distributed with this work for additional information 5 regarding copyright ownership. The ASF licenses this file 6 to you under the Apache License, Version 2.0 (the 7 "License"); you may not use this file except in compliance 8 with the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, 13 software distributed under the License is distributed on an 14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 KIND, either express or implied. See the License for the 16 specific language governing permissions and limitations 17 under the License. 18 =================== DO NOT EDIT THIS FILE ==================== 19 Generated by Modello 2.4.0, 20 any modifications will be overwritten. 21 ============================================================== 22 */ 23 24 package org.apache.maven.shared.model.fileset; 25 26 /** 27 * Class Mapper. 28 * 29 * @version $Revision$ $Date$ 30 */ 31 @SuppressWarnings( "all" ) 32 public class Mapper 33 implements java.io.Serializable 34 { 35 36 //--------------------------/ 37 //- Class/Member Variables -/ 38 //--------------------------/ 39 40 /** 41 * 42 * 43 * Specifies a built-in mapper implementation. 44 * <br/> 45 * Valid values: 46 * <ul> 47 * <li><b>"flatten"</b> - 48 * The target file name is identical to the 49 * source file name, with all leading 50 * directory information stripped off. Both 51 * to and from will be ignored. 52 * </li> 53 * <li><b>"glob"</b> - 54 * Both to and from define patterns that may 55 * contain at most one *. For each source 56 * file that matches the from pattern, a 57 * target file name will be constructed from 58 * the to pattern by substituting the * in 59 * the to pattern with the text that matches 60 * the * in the from pattern. Source file 61 * names that don't match the from pattern 62 * will be ignored. 63 * </li> 64 * <li><b>"regexp"</b> - 65 * Both to and from define regular 66 * expressions. If the source file name matches the 67 * from pattern, the target file name will be 68 * constructed from the to pattern, using 69 * \0 to \9 as back-references for the full 70 * match (\0) or the matches of the 71 * subexpressions in parentheses. Source 72 * files not matching the from pattern will be 73 * ignored. 74 * </li> 75 * <li><b>"merge"</b> - 76 * The target file name will always be the 77 * same, as defined by to. from will be 78 * ignored. 79 * </li> 80 * <li><b>"package"</b> - 81 * Sharing the same syntax as the glob 82 * mapper, the package mapper replaces directory 83 * separators found in the matched source 84 * pattern with dots in the target pattern 85 * placeholder. 86 * </li> 87 * <li><b>"unpackage"</b> - 88 * This mapper is the inverse of the package 89 * mapper. It replaces the dots in a 90 * package name with directory separators. 91 * This is useful for matching XML formatter 92 * results against their JUnit test test 93 * cases. The mapper shares the sample syntax 94 * as the glob mapper. 95 * </li> 96 * </ul> 97 * 98 * 99 */ 100 private String type = "identity"; 101 102 /** 103 * 104 * Specifies a type-specific pattern for matching 105 * source paths which should be mapped. 106 * 107 */ 108 private String from; 109 110 /** 111 * 112 * Specifies a type-specific pattern for producing 113 * paths based on source paths. 114 * 115 */ 116 private String to; 117 118 /** 119 * 120 * Allows specification of a custom mapper 121 * implementation. The class must be of type 122 * 123 * org.apache.maven.shared.model.fileset.mappers.FileNameMapper, 124 * from the artifact 125 * org.apache.maven.shared:file-management. 126 * 127 */ 128 private String classname; 129 130 131 //-----------/ 132 //- Methods -/ 133 //-----------/ 134 135 /** 136 * Get allows specification of a custom mapper implementation. 137 * The class must be of type 138 * 139 * org.apache.maven.shared.model.fileset.mappers.FileNameMapper, 140 * from the artifact 141 * org.apache.maven.shared:file-management. 142 * 143 * @return String 144 */ 145 public String getClassname() 146 { 147 return this.classname; 148 } //-- String getClassname() 149 150 /** 151 * Get specifies a type-specific pattern for matching source 152 * paths which should be mapped. 153 * 154 * @return String 155 */ 156 public String getFrom() 157 { 158 return this.from; 159 } //-- String getFrom() 160 161 /** 162 * Get specifies a type-specific pattern for producing paths 163 * based on source paths. 164 * 165 * @return String 166 */ 167 public String getTo() 168 { 169 return this.to; 170 } //-- String getTo() 171 172 /** 173 * Get specifies a built-in mapper implementation. 174 * <br/> 175 * Valid values: 176 * <ul> 177 * <li><b>"flatten"</b> - 178 * The target file name is identical to the 179 * source file name, with all leading 180 * directory information stripped off. Both 181 * to and from will be ignored. 182 * </li> 183 * <li><b>"glob"</b> - 184 * Both to and from define patterns that may 185 * contain at most one *. For each source 186 * file that matches the from pattern, a 187 * target file name will be constructed from 188 * the to pattern by substituting the * in 189 * the to pattern with the text that matches 190 * the * in the from pattern. Source file 191 * names that don't match the from pattern 192 * will be ignored. 193 * </li> 194 * <li><b>"regexp"</b> - 195 * Both to and from define regular 196 * expressions. If the source file name matches the 197 * from pattern, the target file name will be 198 * constructed from the to pattern, using 199 * \0 to \9 as back-references for the full 200 * match (\0) or the matches of the 201 * subexpressions in parentheses. Source 202 * files not matching the from pattern will be 203 * ignored. 204 * </li> 205 * <li><b>"merge"</b> - 206 * The target file name will always be the 207 * same, as defined by to. from will be 208 * ignored. 209 * </li> 210 * <li><b>"package"</b> - 211 * Sharing the same syntax as the glob 212 * mapper, the package mapper replaces directory 213 * separators found in the matched source 214 * pattern with dots in the target pattern 215 * placeholder. 216 * </li> 217 * <li><b>"unpackage"</b> - 218 * This mapper is the inverse of the package 219 * mapper. It replaces the dots in a 220 * package name with directory separators. 221 * This is useful for matching XML formatter 222 * results against their JUnit test test 223 * cases. The mapper shares the sample syntax 224 * as the glob mapper. 225 * </li> 226 * </ul> 227 * 228 * @return String 229 */ 230 public String getType() 231 { 232 return this.type; 233 } //-- String getType() 234 235 /** 236 * Set allows specification of a custom mapper implementation. 237 * The class must be of type 238 * 239 * org.apache.maven.shared.model.fileset.mappers.FileNameMapper, 240 * from the artifact 241 * org.apache.maven.shared:file-management. 242 * 243 * @param classname a classname object. 244 */ 245 public void setClassname( String classname ) 246 { 247 this.classname = classname; 248 } //-- void setClassname( String ) 249 250 /** 251 * Set specifies a type-specific pattern for matching source 252 * paths which should be mapped. 253 * 254 * @param from a from object. 255 */ 256 public void setFrom( String from ) 257 { 258 this.from = from; 259 } //-- void setFrom( String ) 260 261 /** 262 * Set specifies a type-specific pattern for producing paths 263 * based on source paths. 264 * 265 * @param to a to object. 266 */ 267 public void setTo( String to ) 268 { 269 this.to = to; 270 } //-- void setTo( String ) 271 272 /** 273 * Set specifies a built-in mapper implementation. 274 * <br/> 275 * Valid values: 276 * <ul> 277 * <li><b>"flatten"</b> - 278 * The target file name is identical to the 279 * source file name, with all leading 280 * directory information stripped off. Both 281 * to and from will be ignored. 282 * </li> 283 * <li><b>"glob"</b> - 284 * Both to and from define patterns that may 285 * contain at most one *. For each source 286 * file that matches the from pattern, a 287 * target file name will be constructed from 288 * the to pattern by substituting the * in 289 * the to pattern with the text that matches 290 * the * in the from pattern. Source file 291 * names that don't match the from pattern 292 * will be ignored. 293 * </li> 294 * <li><b>"regexp"</b> - 295 * Both to and from define regular 296 * expressions. If the source file name matches the 297 * from pattern, the target file name will be 298 * constructed from the to pattern, using 299 * \0 to \9 as back-references for the full 300 * match (\0) or the matches of the 301 * subexpressions in parentheses. Source 302 * files not matching the from pattern will be 303 * ignored. 304 * </li> 305 * <li><b>"merge"</b> - 306 * The target file name will always be the 307 * same, as defined by to. from will be 308 * ignored. 309 * </li> 310 * <li><b>"package"</b> - 311 * Sharing the same syntax as the glob 312 * mapper, the package mapper replaces directory 313 * separators found in the matched source 314 * pattern with dots in the target pattern 315 * placeholder. 316 * </li> 317 * <li><b>"unpackage"</b> - 318 * This mapper is the inverse of the package 319 * mapper. It replaces the dots in a 320 * package name with directory separators. 321 * This is useful for matching XML formatter 322 * results against their JUnit test test 323 * cases. The mapper shares the sample syntax 324 * as the glob mapper. 325 * </li> 326 * </ul> 327 * 328 * @param type a type object. 329 */ 330 public void setType( String type ) 331 { 332 this.type = type; 333 } //-- void setType( String ) 334 335 }