001    /*
002     =================== DO NOT EDIT THIS FILE ====================
003     Generated by Modello 1.4.1 on 2013-02-24 03:31:02,
004     any modifications will be overwritten.
005     ==============================================================
006     */
007    
008    package org.apache.maven.model;
009    
010    /**
011     * Modifications to the build process which is activated based on
012     * environmental
013     *         parameters or command line arguments.
014     * 
015     * @version $Revision$ $Date$
016     */
017    @SuppressWarnings( "all" )
018    public class Profile
019        extends ModelBase
020        implements java.io.Serializable, java.lang.Cloneable
021    {
022    
023          //--------------------------/
024         //- Class/Member Variables -/
025        //--------------------------/
026    
027        /**
028         * The identifier of this build profile. This is used for
029         * command line
030         *             activation, and identifies profiles to be
031         * merged.
032         *           
033         */
034        private String id = "default";
035    
036        /**
037         * The conditional logic which will automatically trigger the
038         * inclusion of this
039         *             profile.
040         */
041        private Activation activation;
042    
043        /**
044         * Information required to build the project.
045         */
046        private BuildBase build;
047    
048    
049          //-----------/
050         //- Methods -/
051        //-----------/
052    
053        /**
054         * Method clone.
055         * 
056         * @return Profile
057         */
058        public Profile clone()
059        {
060            try
061            {
062                Profile copy = (Profile) super.clone();
063    
064                if ( this.activation != null )
065                {
066                    copy.activation = (Activation) this.activation.clone();
067                }
068    
069                if ( this.build != null )
070                {
071                    copy.build = (BuildBase) this.build.clone();
072                }
073    
074                return copy;
075            }
076            catch ( java.lang.Exception ex )
077            {
078                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
079                    + " does not support clone()" ).initCause( ex );
080            }
081        } //-- Profile clone()
082    
083        /**
084         * Get the conditional logic which will automatically trigger
085         * the inclusion of this
086         *             profile.
087         * 
088         * @return Activation
089         */
090        public Activation getActivation()
091        {
092            return this.activation;
093        } //-- Activation getActivation()
094    
095        /**
096         * Get information required to build the project.
097         * 
098         * @return BuildBase
099         */
100        public BuildBase getBuild()
101        {
102            return this.build;
103        } //-- BuildBase getBuild()
104    
105        /**
106         * Get the identifier of this build profile. This is used for
107         * command line
108         *             activation, and identifies profiles to be
109         * merged.
110         * 
111         * @return String
112         */
113        public String getId()
114        {
115            return this.id;
116        } //-- String getId()
117    
118        /**
119         * Set the conditional logic which will automatically trigger
120         * the inclusion of this
121         *             profile.
122         * 
123         * @param activation
124         */
125        public void setActivation( Activation activation )
126        {
127            this.activation = activation;
128        } //-- void setActivation( Activation )
129    
130        /**
131         * Set information required to build the project.
132         * 
133         * @param build
134         */
135        public void setBuild( BuildBase build )
136        {
137            this.build = build;
138        } //-- void setBuild( BuildBase )
139    
140        /**
141         * Set the identifier of this build profile. This is used for
142         * command line
143         *             activation, and identifies profiles to be
144         * merged.
145         * 
146         * @param id
147         */
148        public void setId( String id )
149        {
150            this.id = id;
151        } //-- void setId( String )
152    
153        
154                
155        public static final String SOURCE_POM = "pom";
156    
157        public static final String SOURCE_SETTINGS = "settings.xml";
158    
159        // We don't want this to be parseable...it's sort of 'hidden'
160        // default source for this profile is in the pom itself.
161        private String source = SOURCE_POM;
162    
163        public void setSource( String source )
164        {
165            this.source = source;
166        }
167    
168        public String getSource()
169        {
170            return source;
171        }
172    
173        /**
174         * @see java.lang.Object#toString()
175         */
176        public String toString()
177        {
178            return "Profile {id: " + getId() + ", source: " + getSource() + "}";
179        }
180                
181              
182    }