Coverage Report - org.apache.maven.plugin.doap.options.DoapOptions
 
Classes in this File Line Coverage Branch Coverage Complexity
DoapOptions
16 %
16/97
0 %
0/94
1,174
 
 1  
 /*
 2  
  * $Id: org.apache.maven.plugin.doap.options.DoapOptions.html 815332 2012-05-01 21:25:03Z hboutemy $
 3  
  */
 4  
 
 5  
 package org.apache.maven.plugin.doap.options;
 6  
 
 7  
   //---------------------------------/
 8  
  //- Imported classes and packages -/
 9  
 //---------------------------------/
 10  
 
 11  
 import java.util.Date;
 12  
 
 13  
 /**
 14  
  * Specific DOAP parameters, i.e. options that POM doesn't have any
 15  
  * notions.
 16  
  * @see <a
 17  
  * href="http://usefulinc.com/ns/doap#">http://usefulinc.com/ns/doap#</a>
 18  
  * 
 19  
  * @version $Revision: 815332 $ $Date: 2012-05-01 21:25:03 +0000 (Tue, 01 May 2012) $
 20  
  */
 21  2
 public class DoapOptions implements java.io.Serializable {
 22  
 
 23  
 
 24  
       //--------------------------/
 25  
      //- Class/Member Variables -/
 26  
     //--------------------------/
 27  
 
 28  
     /**
 29  
      * Short (8 or 9 words) plain text description of a project.
 30  
      * @see <a
 31  
      * href="http://usefulinc.com/ns/doap#shortdesc">http://usefulinc.com/ns/doap#shortdesc</a>
 32  
      */
 33  
     private String shortdesc;
 34  
 
 35  
     /**
 36  
      * A category of project.<br/>
 37  
      * <b>Note</b>: This string is comma separated to allow several
 38  
      * categories.
 39  
      * @see <a
 40  
      * href="http://usefulinc.com/ns/doap#category">http://usefulinc.com/ns/doap#category</a>
 41  
      */
 42  
     private String category;
 43  
 
 44  
     /**
 45  
      * Web page from which the project software can be downloaded.
 46  
      * @see <a
 47  
      * href="http://usefulinc.com/ns/doap#download-page">http://usefulinc.com/ns/doap#download-page</a>
 48  
      */
 49  
     private String downloadPage;
 50  
 
 51  
     /**
 52  
      * Mirror of software download web page.<br/>
 53  
      * <b>Note</b>: This string is comma separated to allow several
 54  
      * mirror pages.
 55  
      * @see <a
 56  
      * href="http://usefulinc.com/ns/doap#download-mirror">http://usefulinc.com/ns/doap#download-mirror</a>
 57  
      */
 58  
     private String downloadMirror;
 59  
 
 60  
     /**
 61  
      * URL of a project's past homepage, associated with exactly
 62  
      * one project.
 63  
      * @see <a
 64  
      * href="http://usefulinc.com/ns/doap#old-homepage">http://usefulinc.com/ns/doap#old-homepage</a>
 65  
      */
 66  
     private String oldHomepage;
 67  
 
 68  
     /**
 69  
      * Operating system that a project is limited to.  Omit this
 70  
      * property if the project is not OS-specific.<br/>
 71  
      * <b>Note</b>: This string is comma separated to allow several
 72  
      * OS.
 73  
      * @see <a
 74  
      * href="http://usefulinc.com/ns/doap#os">http://usefulinc.com/ns/doap#os</a>
 75  
      */
 76  
     private String os;
 77  
 
 78  
     /**
 79  
      * Programming language a project is implemented in or intended
 80  
      * for use with.<br/>
 81  
      * <b>Note</b>: This string is comma separated to allow several
 82  
      * programming-language.
 83  
      * @see <a
 84  
      * href="http://usefulinc.com/ns/doap#programming-language">http://usefulinc.com/ns/doap#programming-language</a>
 85  
      */
 86  2
     private String programmingLanguage = "java";
 87  
 
 88  
     /**
 89  
      * Web page with screenshots of project.
 90  
      * @see <a
 91  
      * href="http://usefulinc.com/ns/doap#screenshots">http://usefulinc.com/ns/doap#screenshots</a>
 92  
      */
 93  
     private String screenshots;
 94  
 
 95  
     /**
 96  
      * URL of Wiki for collaborative discussion of project.
 97  
      * @see <a
 98  
      * href="http://usefulinc.com/ns/doap#wiki">http://usefulinc.com/ns/doap#wiki</a>
 99  
      */
 100  
     private String wiki;
 101  
 
 102  
 
 103  
       //-----------/
 104  
      //- Methods -/
 105  
     //-----------/
 106  
 
 107  
     /**
 108  
      * Method equals.
 109  
      * 
 110  
      * @param other
 111  
      * @return boolean
 112  
      */
 113  
     public boolean equals(Object other)
 114  
     {
 115  0
         if ( this == other)
 116  
         {
 117  0
             return true;
 118  
         }
 119  
         
 120  0
         if ( !(other instanceof DoapOptions) )
 121  
         {
 122  0
             return false;
 123  
         }
 124  
         
 125  0
         DoapOptions that = (DoapOptions) other;
 126  0
         boolean result = true;
 127  
         
 128  0
         result = result && ( getShortdesc() == null ? that.getShortdesc() == null : getShortdesc().equals( that.getShortdesc() ) );
 129  0
         result = result && ( getCategory() == null ? that.getCategory() == null : getCategory().equals( that.getCategory() ) );
 130  0
         result = result && ( getDownloadPage() == null ? that.getDownloadPage() == null : getDownloadPage().equals( that.getDownloadPage() ) );
 131  0
         result = result && ( getDownloadMirror() == null ? that.getDownloadMirror() == null : getDownloadMirror().equals( that.getDownloadMirror() ) );
 132  0
         result = result && ( getOldHomepage() == null ? that.getOldHomepage() == null : getOldHomepage().equals( that.getOldHomepage() ) );
 133  0
         result = result && ( getOs() == null ? that.getOs() == null : getOs().equals( that.getOs() ) );
 134  0
         result = result && ( getProgrammingLanguage() == null ? that.getProgrammingLanguage() == null : getProgrammingLanguage().equals( that.getProgrammingLanguage() ) );
 135  0
         result = result && ( getScreenshots() == null ? that.getScreenshots() == null : getScreenshots().equals( that.getScreenshots() ) );
 136  0
         result = result && ( getWiki() == null ? that.getWiki() == null : getWiki().equals( that.getWiki() ) );
 137  
         
 138  0
         return result;
 139  
     } //-- boolean equals(Object) 
 140  
 
 141  
     /**
 142  
      * Get a category of project.<br/>
 143  
      * <b>Note</b>: This string is comma separated to allow several
 144  
      * categories.
 145  
      * @see <a
 146  
      * href="http://usefulinc.com/ns/doap#category">http://usefulinc.com/ns/doap#category</a>
 147  
      * 
 148  
      * @return String
 149  
      */
 150  
     public String getCategory()
 151  
     {
 152  2
         return this.category;
 153  
     } //-- String getCategory() 
 154  
 
 155  
     /**
 156  
      * Get mirror of software download web page.<br/>
 157  
      * <b>Note</b>: This string is comma separated to allow several
 158  
      * mirror pages.
 159  
      * @see <a
 160  
      * href="http://usefulinc.com/ns/doap#download-mirror">http://usefulinc.com/ns/doap#download-mirror</a>
 161  
      * 
 162  
      * @return String
 163  
      */
 164  
     public String getDownloadMirror()
 165  
     {
 166  2
         return this.downloadMirror;
 167  
     } //-- String getDownloadMirror() 
 168  
 
 169  
     /**
 170  
      * Get web page from which the project software can be
 171  
      * downloaded.
 172  
      * @see <a
 173  
      * href="http://usefulinc.com/ns/doap#download-page">http://usefulinc.com/ns/doap#download-page</a>
 174  
      * 
 175  
      * @return String
 176  
      */
 177  
     public String getDownloadPage()
 178  
     {
 179  6
         return this.downloadPage;
 180  
     } //-- String getDownloadPage() 
 181  
 
 182  
     /**
 183  
      * Get uRL of a project's past homepage, associated with
 184  
      * exactly one project.
 185  
      * @see <a
 186  
      * href="http://usefulinc.com/ns/doap#old-homepage">http://usefulinc.com/ns/doap#old-homepage</a>
 187  
      * 
 188  
      * @return String
 189  
      */
 190  
     public String getOldHomepage()
 191  
     {
 192  2
         return this.oldHomepage;
 193  
     } //-- String getOldHomepage() 
 194  
 
 195  
     /**
 196  
      * Get operating system that a project is limited to.  Omit
 197  
      * this property if the project is not OS-specific.<br/>
 198  
      * <b>Note</b>: This string is comma separated to allow several
 199  
      * OS.
 200  
      * @see <a
 201  
      * href="http://usefulinc.com/ns/doap#os">http://usefulinc.com/ns/doap#os</a>
 202  
      * 
 203  
      * @return String
 204  
      */
 205  
     public String getOs()
 206  
     {
 207  2
         return this.os;
 208  
     } //-- String getOs() 
 209  
 
 210  
     /**
 211  
      * Get programming language a project is implemented in or
 212  
      * intended for use with.<br/>
 213  
      * <b>Note</b>: This string is comma separated to allow several
 214  
      * programming-language.
 215  
      * @see <a
 216  
      * href="http://usefulinc.com/ns/doap#programming-language">http://usefulinc.com/ns/doap#programming-language</a>
 217  
      * 
 218  
      * @return String
 219  
      */
 220  
     public String getProgrammingLanguage()
 221  
     {
 222  6
         return this.programmingLanguage;
 223  
     } //-- String getProgrammingLanguage() 
 224  
 
 225  
     /**
 226  
      * Get web page with screenshots of project.
 227  
      * @see <a
 228  
      * href="http://usefulinc.com/ns/doap#screenshots">http://usefulinc.com/ns/doap#screenshots</a>
 229  
      * 
 230  
      * @return String
 231  
      */
 232  
     public String getScreenshots()
 233  
     {
 234  2
         return this.screenshots;
 235  
     } //-- String getScreenshots() 
 236  
 
 237  
     /**
 238  
      * Get short (8 or 9 words) plain text description of a
 239  
      * project.
 240  
      * @see <a
 241  
      * href="http://usefulinc.com/ns/doap#shortdesc">http://usefulinc.com/ns/doap#shortdesc</a>
 242  
      * 
 243  
      * @return String
 244  
      */
 245  
     public String getShortdesc()
 246  
     {
 247  2
         return this.shortdesc;
 248  
     } //-- String getShortdesc() 
 249  
 
 250  
     /**
 251  
      * Get uRL of Wiki for collaborative discussion of project.
 252  
      * @see <a
 253  
      * href="http://usefulinc.com/ns/doap#wiki">http://usefulinc.com/ns/doap#wiki</a>
 254  
      * 
 255  
      * @return String
 256  
      */
 257  
     public String getWiki()
 258  
     {
 259  2
         return this.wiki;
 260  
     } //-- String getWiki() 
 261  
 
 262  
     /**
 263  
      * Method hashCode.
 264  
      * 
 265  
      * @return int
 266  
      */
 267  
     public int hashCode()
 268  
     {
 269  0
         int result = 17;
 270  
         
 271  0
         result = 37 * result + ( shortdesc != null ? shortdesc.hashCode() : 0 );
 272  0
         result = 37 * result + ( category != null ? category.hashCode() : 0 );
 273  0
         result = 37 * result + ( downloadPage != null ? downloadPage.hashCode() : 0 );
 274  0
         result = 37 * result + ( downloadMirror != null ? downloadMirror.hashCode() : 0 );
 275  0
         result = 37 * result + ( oldHomepage != null ? oldHomepage.hashCode() : 0 );
 276  0
         result = 37 * result + ( os != null ? os.hashCode() : 0 );
 277  0
         result = 37 * result + ( programmingLanguage != null ? programmingLanguage.hashCode() : 0 );
 278  0
         result = 37 * result + ( screenshots != null ? screenshots.hashCode() : 0 );
 279  0
         result = 37 * result + ( wiki != null ? wiki.hashCode() : 0 );
 280  
         
 281  0
         return result;
 282  
     } //-- int hashCode() 
 283  
 
 284  
     /**
 285  
      * Set a category of project.<br/>
 286  
      * <b>Note</b>: This string is comma separated to allow several
 287  
      * categories.
 288  
      * @see <a
 289  
      * href="http://usefulinc.com/ns/doap#category">http://usefulinc.com/ns/doap#category</a>
 290  
      * 
 291  
      * @param category
 292  
      */
 293  
     public void setCategory(String category)
 294  
     {
 295  0
         this.category = category;
 296  0
     } //-- void setCategory(String) 
 297  
 
 298  
     /**
 299  
      * Set mirror of software download web page.<br/>
 300  
      * <b>Note</b>: This string is comma separated to allow several
 301  
      * mirror pages.
 302  
      * @see <a
 303  
      * href="http://usefulinc.com/ns/doap#download-mirror">http://usefulinc.com/ns/doap#download-mirror</a>
 304  
      * 
 305  
      * @param downloadMirror
 306  
      */
 307  
     public void setDownloadMirror(String downloadMirror)
 308  
     {
 309  0
         this.downloadMirror = downloadMirror;
 310  0
     } //-- void setDownloadMirror(String) 
 311  
 
 312  
     /**
 313  
      * Set web page from which the project software can be
 314  
      * downloaded.
 315  
      * @see <a
 316  
      * href="http://usefulinc.com/ns/doap#download-page">http://usefulinc.com/ns/doap#download-page</a>
 317  
      * 
 318  
      * @param downloadPage
 319  
      */
 320  
     public void setDownloadPage(String downloadPage)
 321  
     {
 322  2
         this.downloadPage = downloadPage;
 323  2
     } //-- void setDownloadPage(String) 
 324  
 
 325  
     /**
 326  
      * Set uRL of a project's past homepage, associated with
 327  
      * exactly one project.
 328  
      * @see <a
 329  
      * href="http://usefulinc.com/ns/doap#old-homepage">http://usefulinc.com/ns/doap#old-homepage</a>
 330  
      * 
 331  
      * @param oldHomepage
 332  
      */
 333  
     public void setOldHomepage(String oldHomepage)
 334  
     {
 335  0
         this.oldHomepage = oldHomepage;
 336  0
     } //-- void setOldHomepage(String) 
 337  
 
 338  
     /**
 339  
      * Set operating system that a project is limited to.  Omit
 340  
      * this property if the project is not OS-specific.<br/>
 341  
      * <b>Note</b>: This string is comma separated to allow several
 342  
      * OS.
 343  
      * @see <a
 344  
      * href="http://usefulinc.com/ns/doap#os">http://usefulinc.com/ns/doap#os</a>
 345  
      * 
 346  
      * @param os
 347  
      */
 348  
     public void setOs(String os)
 349  
     {
 350  0
         this.os = os;
 351  0
     } //-- void setOs(String) 
 352  
 
 353  
     /**
 354  
      * Set programming language a project is implemented in or
 355  
      * intended for use with.<br/>
 356  
      * <b>Note</b>: This string is comma separated to allow several
 357  
      * programming-language.
 358  
      * @see <a
 359  
      * href="http://usefulinc.com/ns/doap#programming-language">http://usefulinc.com/ns/doap#programming-language</a>
 360  
      * 
 361  
      * @param programmingLanguage
 362  
      */
 363  
     public void setProgrammingLanguage(String programmingLanguage)
 364  
     {
 365  2
         this.programmingLanguage = programmingLanguage;
 366  2
     } //-- void setProgrammingLanguage(String) 
 367  
 
 368  
     /**
 369  
      * Set web page with screenshots of project.
 370  
      * @see <a
 371  
      * href="http://usefulinc.com/ns/doap#screenshots">http://usefulinc.com/ns/doap#screenshots</a>
 372  
      * 
 373  
      * @param screenshots
 374  
      */
 375  
     public void setScreenshots(String screenshots)
 376  
     {
 377  0
         this.screenshots = screenshots;
 378  0
     } //-- void setScreenshots(String) 
 379  
 
 380  
     /**
 381  
      * Set short (8 or 9 words) plain text description of a
 382  
      * project.
 383  
      * @see <a
 384  
      * href="http://usefulinc.com/ns/doap#shortdesc">http://usefulinc.com/ns/doap#shortdesc</a>
 385  
      * 
 386  
      * @param shortdesc
 387  
      */
 388  
     public void setShortdesc(String shortdesc)
 389  
     {
 390  0
         this.shortdesc = shortdesc;
 391  0
     } //-- void setShortdesc(String) 
 392  
 
 393  
     /**
 394  
      * Set uRL of Wiki for collaborative discussion of project.
 395  
      * @see <a
 396  
      * href="http://usefulinc.com/ns/doap#wiki">http://usefulinc.com/ns/doap#wiki</a>
 397  
      * 
 398  
      * @param wiki
 399  
      */
 400  
     public void setWiki(String wiki)
 401  
     {
 402  0
         this.wiki = wiki;
 403  0
     } //-- void setWiki(String) 
 404  
 
 405  
     /**
 406  
      * Method toString.
 407  
      * 
 408  
      * @return java.lang.String
 409  
      */
 410  
     public java.lang.String toString()
 411  
     {
 412  0
         StringBuffer buf = new StringBuffer();
 413  
         
 414  0
         buf.append( "shortdesc = '" );
 415  0
         buf.append( getShortdesc() );
 416  0
         buf.append( "'" );
 417  0
         buf.append( "\n" ); 
 418  0
         buf.append( "category = '" );
 419  0
         buf.append( getCategory() );
 420  0
         buf.append( "'" );
 421  0
         buf.append( "\n" ); 
 422  0
         buf.append( "downloadPage = '" );
 423  0
         buf.append( getDownloadPage() );
 424  0
         buf.append( "'" );
 425  0
         buf.append( "\n" ); 
 426  0
         buf.append( "downloadMirror = '" );
 427  0
         buf.append( getDownloadMirror() );
 428  0
         buf.append( "'" );
 429  0
         buf.append( "\n" ); 
 430  0
         buf.append( "oldHomepage = '" );
 431  0
         buf.append( getOldHomepage() );
 432  0
         buf.append( "'" );
 433  0
         buf.append( "\n" ); 
 434  0
         buf.append( "os = '" );
 435  0
         buf.append( getOs() );
 436  0
         buf.append( "'" );
 437  0
         buf.append( "\n" ); 
 438  0
         buf.append( "programmingLanguage = '" );
 439  0
         buf.append( getProgrammingLanguage() );
 440  0
         buf.append( "'" );
 441  0
         buf.append( "\n" ); 
 442  0
         buf.append( "screenshots = '" );
 443  0
         buf.append( getScreenshots() );
 444  0
         buf.append( "'" );
 445  0
         buf.append( "\n" ); 
 446  0
         buf.append( "wiki = '" );
 447  0
         buf.append( getWiki() );
 448  0
         buf.append( "'" );
 449  
         
 450  0
         return buf.toString();
 451  
     } //-- java.lang.String toString() 
 452  
 
 453  
 
 454  2
     private String modelEncoding = "UTF-8";
 455  
 
 456  
     /**
 457  
      * Set an encoding used for reading/writing the model.
 458  
      *
 459  
      * @param modelEncoding the encoding used when reading/writing the model.
 460  
      */
 461  
     public void setModelEncoding( String modelEncoding )
 462  
     {
 463  0
         this.modelEncoding = modelEncoding;
 464  0
     }
 465  
 
 466  
     /**
 467  
      * @return the current encoding used when reading/writing this model.
 468  
      */
 469  
     public String getModelEncoding()
 470  
     {
 471  0
         return modelEncoding;
 472  
     }
 473  
 }