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

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

Go to download

Statistical sampling library for use in virtdata libraries, based on apache commons math 4

There is a newer version: 5.17.0
Show newest version
/*
 =================== DO NOT EDIT THIS FILE ====================
 Generated by Modello 1.0.1 on 2009-08-06 15:13:09,
 any modifications will be overwritten.
 ==============================================================
 */

package org.apache.maven.model;

/**
 * 
 *         
 *         The <plugin> element contains
 * informations required for a report plugin.
 *         
 *       
 * 
 * @version $Revision$ $Date$
 */
public class ReportPlugin
    implements java.io.Serializable
{

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

    /**
     * The group ID of the reporting plugin in the repository.
     */
    private String groupId = "org.apache.maven.plugins";

    /**
     * The artifact ID of the reporting plugin in the repository.
     */
    private String artifactId;

    /**
     * The version of the reporting plugin to be used.
     */
    private String version;

    /**
     * Whether the configuration in this plugin should be made
     * available to projects
     *             that inherit from this one.
     */
    private String inherited;

    /**
     * The configuration of the reporting plugin.
     */
    private Object configuration;

    /**
     * Field reportSets.
     */
    private java.util.List reportSets;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addReportSet.
     * 
     * @param reportSet
     */
    public void addReportSet( ReportSet reportSet )
    {
        if ( !(reportSet instanceof ReportSet) )
        {
            throw new ClassCastException( "ReportPlugin.addReportSets(reportSet) parameter must be instanceof " + ReportSet.class.getName() );
        }
        getReportSets().add( reportSet );
    } //-- void addReportSet( ReportSet )

    /**
     * Get the artifact ID of the reporting plugin in the
     * repository.
     * 
     * @return String
     */
    public String getArtifactId()
    {
        return this.artifactId;
    } //-- String getArtifactId()

    /**
     * Get the configuration of the reporting plugin.
     * 
     * @return Object
     */
    public Object getConfiguration()
    {
        return this.configuration;
    } //-- Object getConfiguration()

    /**
     * Get the group ID of the reporting plugin in the repository.
     * 
     * @return String
     */
    public String getGroupId()
    {
        return this.groupId;
    } //-- String getGroupId()

    /**
     * Get whether the configuration in this plugin should be made
     * available to projects
     *             that inherit from this one.
     * 
     * @return String
     */
    public String getInherited()
    {
        return this.inherited;
    } //-- String getInherited()

    /**
     * Method getReportSets.
     * 
     * @return List
     */
    public java.util.List getReportSets()
    {
        if ( this.reportSets == null )
        {
            this.reportSets = new java.util.ArrayList();
        }

        return this.reportSets;
    } //-- java.util.List getReportSets()

    /**
     * Get the version of the reporting plugin to be used.
     * 
     * @return String
     */
    public String getVersion()
    {
        return this.version;
    } //-- String getVersion()

    /**
     * Method removeReportSet.
     * 
     * @param reportSet
     */
    public void removeReportSet( ReportSet reportSet )
    {
        if ( !(reportSet instanceof ReportSet) )
        {
            throw new ClassCastException( "ReportPlugin.removeReportSets(reportSet) parameter must be instanceof " + ReportSet.class.getName() );
        }
        getReportSets().remove( reportSet );
    } //-- void removeReportSet( ReportSet )

    /**
     * Set the artifact ID of the reporting plugin in the
     * repository.
     * 
     * @param artifactId
     */
    public void setArtifactId( String artifactId )
    {
        this.artifactId = artifactId;
    } //-- void setArtifactId( String )

    /**
     * Set the configuration of the reporting plugin.
     * 
     * @param configuration
     */
    public void setConfiguration( Object configuration )
    {
        this.configuration = configuration;
    } //-- void setConfiguration( Object )

    /**
     * Set the group ID of the reporting plugin in the repository.
     * 
     * @param groupId
     */
    public void setGroupId( String groupId )
    {
        this.groupId = groupId;
    } //-- void setGroupId( String )

    /**
     * Set whether the configuration in this plugin should be made
     * available to projects
     *             that inherit from this one.
     * 
     * @param inherited
     */
    public void setInherited( String inherited )
    {
        this.inherited = inherited;
    } //-- void setInherited( String )

    /**
     * Set multiple specifications of a set of reports, each having
     * (possibly) different
     *             configuration. This is the reporting parallel to
     * an execution in the build.
     * 
     * @param reportSets
     */
    public void setReportSets( java.util.List reportSets )
    {
        this.reportSets = reportSets;
    } //-- void setReportSets( java.util.List )

    /**
     * Set the version of the reporting plugin to be used.
     * 
     * @param version
     */
    public void setVersion( String version )
    {
        this.version = version;
    } //-- void setVersion( String )


            
    private java.util.Map reportSetMap = null;

    /**
     * Reset the reportSetMap field to null
     */
    public void flushReportSetMap()
    {
        this.reportSetMap = null;
    }

    /**
     * @return a Map of reportSets field with ReportSet#getId() as key
     * @see org.apache.maven.model.ReportSet#getId()
     */
    public java.util.Map getReportSetsAsMap()
    {
        if ( reportSetMap == null )
        {
            reportSetMap = new java.util.LinkedHashMap();
            if ( getReportSets() != null )
            {
                for ( java.util.Iterator i = getReportSets().iterator(); i.hasNext(); )
                {
                    ReportSet reportSet = (ReportSet) i.next();
                    reportSetMap.put( reportSet.getId(), reportSet );
                }
            }
        }

        return reportSetMap;
    }

    /**
     * @return the key of the report plugin, ie groupId:artifactId
     */
    public String getKey()
    {
        return constructKey( groupId, artifactId );
    }

    /**
     * @param groupId
     * @param artifactId
     * @return the key of the report plugin, ie groupId:artifactId
     */
    public static String constructKey( String groupId, String artifactId )
    {
        return groupId + ":" + artifactId;
    }

    private boolean inheritanceApplied = true;

    public void unsetInheritanceApplied()
    {
        this.inheritanceApplied = false;
    }

    public boolean isInheritanceApplied()
    {
        return inheritanceApplied;
    }

    /**
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals( Object other )
    {
        if ( other instanceof ReportPlugin )
        {
            ReportPlugin otherPlugin = (ReportPlugin) other;

            return getKey().equals( otherPlugin.getKey() );
        }

        return false;
    }

    /**
     * @see java.lang.Object#hashCode()
     */
    public int hashCode()
    {
        return getKey().hashCode();
    }

    /**
     * @see java.lang.Object#toString()
     */
    public String toString()
    {
        return "ReportPlugin [" + getKey() + "]";
    }
            
          
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy