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

org.apache.maven.model.Resource 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;

/**
 * This element describes all of the classpath resources associated
 * with a project
 *         or unit tests.
 * 
 * @version $Revision$ $Date$
 */
public class Resource
    extends FileSet
    implements java.io.Serializable
{

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

    /**
     * 
     *             
     *             Describe the resource target path. The path is
     * relative to the target/classes
     *             directory (i.e.
     * ${project.build.outputDirectory}).
     *             For example, if you want that resource to appear
     * in a specific package
     *             (org.apache.maven.messages), you
     * must specify this
     *             element with this value:
     * org/apache/maven/messages.
     *             This is not required if you simply put the
     * resources in that directory
     *             structure at the source, however.
     *             
     *           
     */
    private String targetPath;

    /**
     * 
     *             
     *             Whether resources are filtered to replace tokens
     * with parameterised values or not.
     *             The values are taken from the
     * properties element and from the
     *             properties in the files listed in the
     * filters element.
     *             
     *           
     */
    private boolean filtering = false;

    /**
     * 
     *             
     *             FOR INTERNAL USE ONLY. This is a unique
     * identifier assigned to each
     *             resource to allow Maven to merge changes to this
     * resource that take
     *             place during the execution of a plugin. This
     * field must be managed
     *             by the generated parser and formatter classes in
     * order to allow it
     *             to survive model interpolation.
     *             
     *           
     */
    private String mergeId;


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

    /**
     * Get fOR INTERNAL USE ONLY. This is a unique identifier
     * assigned to each
     *             resource to allow Maven to merge changes to this
     * resource that take
     *             place during the execution of a plugin. This
     * field must be managed
     *             by the generated parser and formatter classes in
     * order to allow it
     *             to survive model interpolation.
     * 
     * @return String
     */
    public String getMergeId()
    {
        return this.mergeId;
    } //-- String getMergeId()

    /**
     * Get describe the resource target path. The path is relative
     * to the target/classes
     *             directory (i.e.
     * ${project.build.outputDirectory}).
     *             For example, if you want that resource to appear
     * in a specific package
     *             (org.apache.maven.messages), you
     * must specify this
     *             element with this value:
     * org/apache/maven/messages.
     *             This is not required if you simply put the
     * resources in that directory
     *             structure at the source, however.
     * 
     * @return String
     */
    public String getTargetPath()
    {
        return this.targetPath;
    } //-- String getTargetPath()

    /**
     * Get whether resources are filtered to replace tokens with
     * parameterised values or not.
     *             The values are taken from the
     * properties element and from the
     *             properties in the files listed in the
     * filters element.
     * 
     * @return boolean
     */
    public boolean isFiltering()
    {
        return this.filtering;
    } //-- boolean isFiltering()

    /**
     * Set whether resources are filtered to replace tokens with
     * parameterised values or not.
     *             The values are taken from the
     * properties element and from the
     *             properties in the files listed in the
     * filters element.
     * 
     * @param filtering
     */
    public void setFiltering( boolean filtering )
    {
        this.filtering = filtering;
    } //-- void setFiltering( boolean )

    /**
     * Set fOR INTERNAL USE ONLY. This is a unique identifier
     * assigned to each
     *             resource to allow Maven to merge changes to this
     * resource that take
     *             place during the execution of a plugin. This
     * field must be managed
     *             by the generated parser and formatter classes in
     * order to allow it
     *             to survive model interpolation.
     * 
     * @param mergeId
     */
    public void setMergeId( String mergeId )
    {
        this.mergeId = mergeId;
    } //-- void setMergeId( String )

    /**
     * Set describe the resource target path. The path is relative
     * to the target/classes
     *             directory (i.e.
     * ${project.build.outputDirectory}).
     *             For example, if you want that resource to appear
     * in a specific package
     *             (org.apache.maven.messages), you
     * must specify this
     *             element with this value:
     * org/apache/maven/messages.
     *             This is not required if you simply put the
     * resources in that directory
     *             structure at the source, however.
     * 
     * @param targetPath
     */
    public void setTargetPath( String targetPath )
    {
        this.targetPath = targetPath;
    } //-- void setTargetPath( String )


            
    private static int mergeIdCounter = 0;

    public void initMergeId()
    {
        if ( getMergeId() == null )
        {
            setMergeId( "resource-" + (mergeIdCounter++) );
        }
    }

    /**
     * @see java.lang.Object#toString()
     */
    public String toString()
    {
        return "Resource {targetPath: " + getTargetPath() + ", filtering: " + isFiltering() + ", " + super.toString() + "}";
    }
            
          
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy