All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.model.License Maven / Gradle / Ivy

There is a newer version: 3.0.0-alpha-3
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 2.1.2,
// any modifications will be overwritten.
// ==============================================================

package org.apache.maven.model;

/**
 * Describes the licenses for this project. This is used to
 * generate the license
 *         page of the project's web site, as well as being taken
 * into consideration in other reporting
 *         and validation. The licenses listed for the project are
 * that of the project itself, and not
 *         of dependencies.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class License
    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * The full legal name of the license.
     */
    private String name;

    /**
     * The official url for the license text.
     */
    private String url;

    /**
     * 
     *             
     *             The primary method by which this project may be
     * distributed.
     *             
*
repo
*
may be downloaded from the Maven * repository
*
manual
*
user must manually download and install * the dependency.
*
* * */ private String distribution; /** * Addendum information pertaining to this license. */ private String comments; /** * Field locations. */ private java.util.Map locations; /** * Field location. */ private InputLocation location; /** * Field nameLocation. */ private InputLocation nameLocation; /** * Field urlLocation. */ private InputLocation urlLocation; /** * Field distributionLocation. */ private InputLocation distributionLocation; /** * Field commentsLocation. */ private InputLocation commentsLocation; //-----------/ //- Methods -/ //-----------/ /** * Method clone. * * @return License */ public License clone() { try { License copy = (License) super.clone(); if ( copy.locations != null ) { copy.locations = new java.util.LinkedHashMap( copy.locations ); } return copy; } catch ( java.lang.Exception ex ) { throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() + " does not support clone()" ).initCause( ex ); } } //-- License clone() /** * Get addendum information pertaining to this license. * * @return String */ public String getComments() { return this.comments; } //-- String getComments() /** * Get the primary method by which this project may be * distributed. *
*
repo
*
may be downloaded from the Maven * repository
*
manual
*
user must manually download and install * the dependency.
*
* * @return String */ public String getDistribution() { return this.distribution; } //-- String getDistribution() /** * * * @param key a key object. * @return InputLocation */ public InputLocation getLocation( Object key ) { if ( key instanceof String ) { switch ( ( String ) key ) { case "" : { return this.location; } case "name" : { return nameLocation; } case "url" : { return urlLocation; } case "distribution" : { return distributionLocation; } case "comments" : { return commentsLocation; } default : { return getOtherLocation( key ); } } } else { return getOtherLocation( key ); } } //-- InputLocation getLocation( Object ) /** * Get the full legal name of the license. * * @return String */ public String getName() { return this.name; } //-- String getName() /** * * * @param key a key object. * @param location a location object. */ public void setLocation( Object key, InputLocation location ) { if ( key instanceof String ) { switch ( ( String ) key ) { case "" : { this.location = location; return; } case "name" : { nameLocation = location; return; } case "url" : { urlLocation = location; return; } case "distribution" : { distributionLocation = location; return; } case "comments" : { commentsLocation = location; return; } default : { setOtherLocation( key, location ); return; } } } else { setOtherLocation( key, location ); } } //-- void setLocation( Object, InputLocation ) /** * * * @param key a key object. * @param location a location object. */ public void setOtherLocation( Object key, InputLocation location ) { if ( location != null ) { if ( this.locations == null ) { this.locations = new java.util.LinkedHashMap(); } this.locations.put( key, location ); } } //-- void setOtherLocation( Object, InputLocation ) /** * * * @param key a key object. * @return InputLocation */ private InputLocation getOtherLocation( Object key ) { return ( locations != null ) ? locations.get( key ) : null; } //-- InputLocation getOtherLocation( Object ) /** * Get the official url for the license text. * * @return String */ public String getUrl() { return this.url; } //-- String getUrl() /** * Set addendum information pertaining to this license. * * @param comments a comments object. */ public void setComments( String comments ) { this.comments = comments; } //-- void setComments( String ) /** * Set the primary method by which this project may be * distributed. *
*
repo
*
may be downloaded from the Maven * repository
*
manual
*
user must manually download and install * the dependency.
*
* * @param distribution a distribution object. */ public void setDistribution( String distribution ) { this.distribution = distribution; } //-- void setDistribution( String ) /** * Set the full legal name of the license. * * @param name a name object. */ public void setName( String name ) { this.name = name; } //-- void setName( String ) /** * Set the official url for the license text. * * @param url a url object. */ public void setUrl( String url ) { this.url = url; } //-- void setUrl( String ) /** * @see java.lang.Object#toString() */ public String toString() { return "License {name=" + name + ", url=" + url + "}"; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy