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     * This is an activator which will detect an operating system's
012     * attributes in order
013     *         to activate its profile.
014     * 
015     * @version $Revision$ $Date$
016     */
017    @SuppressWarnings( "all" )
018    public class ActivationOS
019        implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
020    {
021    
022          //--------------------------/
023         //- Class/Member Variables -/
024        //--------------------------/
025    
026        /**
027         * 
028         *             
029         *             The name of the operating system to be used to
030         * activate the profile. This must be an exact match
031         *             of the <code>${os.name}</code> Java property,
032         * such as <code>Windows XP</code>.
033         *             
034         *           
035         */
036        private String name;
037    
038        /**
039         * 
040         *             
041         *             The general family of the OS to be used to
042         * activate the profile, such as
043         *             <code>windows</code> or <code>unix</code>.
044         *             
045         *           
046         */
047        private String family;
048    
049        /**
050         * The architecture of the operating system to be used to
051         * activate the
052         *           profile.
053         */
054        private String arch;
055    
056        /**
057         * The version of the operating system to be used to activate
058         * the
059         *           profile.
060         */
061        private String version;
062    
063        /**
064         * Field locations.
065         */
066        private java.util.Map<Object, InputLocation> locations;
067    
068    
069          //-----------/
070         //- Methods -/
071        //-----------/
072    
073        /**
074         * Method clone.
075         * 
076         * @return ActivationOS
077         */
078        public ActivationOS clone()
079        {
080            try
081            {
082                ActivationOS copy = (ActivationOS) super.clone();
083    
084                if ( copy.locations != null )
085                {
086                    copy.locations = new java.util.LinkedHashMap( copy.locations );
087                }
088    
089                return copy;
090            }
091            catch ( java.lang.Exception ex )
092            {
093                throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
094                    + " does not support clone()" ).initCause( ex );
095            }
096        } //-- ActivationOS clone()
097    
098        /**
099         * Get the architecture of the operating system to be used to
100         * activate the
101         *           profile.
102         * 
103         * @return String
104         */
105        public String getArch()
106        {
107            return this.arch;
108        } //-- String getArch()
109    
110        /**
111         * Get the general family of the OS to be used to activate the
112         * profile, such as
113         *             <code>windows</code> or <code>unix</code>.
114         * 
115         * @return String
116         */
117        public String getFamily()
118        {
119            return this.family;
120        } //-- String getFamily()
121    
122        /**
123         * 
124         * 
125         * @param key
126         * @return InputLocation
127         */
128        public InputLocation getLocation( Object key )
129        {
130            return ( locations != null ) ? locations.get( key ) : null;
131        } //-- InputLocation getLocation( Object )
132    
133        /**
134         * Get the name of the operating system to be used to activate
135         * the profile. This must be an exact match
136         *             of the <code>${os.name}</code> Java property,
137         * such as <code>Windows XP</code>.
138         * 
139         * @return String
140         */
141        public String getName()
142        {
143            return this.name;
144        } //-- String getName()
145    
146        /**
147         * Get the version of the operating system to be used to
148         * activate the
149         *           profile.
150         * 
151         * @return String
152         */
153        public String getVersion()
154        {
155            return this.version;
156        } //-- String getVersion()
157    
158        /**
159         * Set the architecture of the operating system to be used to
160         * activate the
161         *           profile.
162         * 
163         * @param arch
164         */
165        public void setArch( String arch )
166        {
167            this.arch = arch;
168        } //-- void setArch( String )
169    
170        /**
171         * Set the general family of the OS to be used to activate the
172         * profile, such as
173         *             <code>windows</code> or <code>unix</code>.
174         * 
175         * @param family
176         */
177        public void setFamily( String family )
178        {
179            this.family = family;
180        } //-- void setFamily( String )
181    
182        /**
183         * 
184         * 
185         * @param key
186         * @param location
187         */
188        public void setLocation( Object key, InputLocation location )
189        {
190            if ( location != null )
191            {
192                if ( this.locations == null )
193                {
194                    this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
195                }
196                this.locations.put( key, location );
197            }
198        } //-- void setLocation( Object, InputLocation )
199    
200        /**
201         * Set the name of the operating system to be used to activate
202         * the profile. This must be an exact match
203         *             of the <code>${os.name}</code> Java property,
204         * such as <code>Windows XP</code>.
205         * 
206         * @param name
207         */
208        public void setName( String name )
209        {
210            this.name = name;
211        } //-- void setName( String )
212    
213        /**
214         * Set the version of the operating system to be used to
215         * activate the
216         *           profile.
217         * 
218         * @param version
219         */
220        public void setVersion( String version )
221        {
222            this.version = version;
223        } //-- void setVersion( String )
224    
225    }