View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.5.1,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.plugin.doap.options;
25  
26  /**
27   * Specific ASF DOAP parameters, i.e. ASF options which make DOAP
28   * file ASF compliant.
29   * @see <a
30   * href="http://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/asfext">
31   * http://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/asfext</a>
32   * @see <a
33   * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
34   * @see <a
35   * href="http://projects.apache.org/docs/standards.html">http://projects.apache.org/docs/standards.html</a>
36   * 
37   * @version $Revision$ $Date$
38   */
39  @SuppressWarnings( "all" )
40  public class ASFExtOptions
41      implements java.io.Serializable
42  {
43  
44        //--------------------------/
45       //- Class/Member Variables -/
46      //--------------------------/
47  
48      /**
49       * The ASFext xmlns prefix.<br>
50       * <b>Default value</b>: asfext.
51       */
52      private String xmlnsPrefix = "asfext";
53  
54      /**
55       * The URI of the ASFext xmlns namespace.<br>
56       * <b>Default value</b>: http://projects.apache.org/ns/asfext#.
57       */
58      private String xmlnsNamespaceURI = "http://projects.apache.org/ns/asfext#";
59  
60      /**
61       * Flag to use or not the ASF extension in the generated DOAP.
62       */
63      private boolean included = false;
64  
65      /**
66       * The top level element within a file. Optional will be
67       * discovered from POM.<br>
68       * <b>Default value</b>: ${project.url}
69       * @see <a
70       * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
71       */
72      private String pmc = "${project.url}";
73  
74      /**
75       * The name of the PMC, including the 'Apache ', e.g. 'Apache
76       * Forrest'. Optional will be discovered from POM.<br>
77       * <b>Default value</b>: ${project.name}
78       * @see <a
79       * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
80       */
81      private String name = "${project.name}";
82  
83      /**
84       * Every PMC is created by a board resolution with a specific
85       * charter. That charter should be
86       *             listed here as it gives the focus and scope of
87       * the PMC. Optional.
88       * @see <a
89       * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
90       */
91      private String charter;
92  
93      /**
94       * This should contain the name of the current PMC chairperson.
95       * Optional.<br>
96       * <b>Note</b>: it will be discovered from
97       * ${project.developers.roles}
98       * @see <a
99       * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
100      */
101     private String chair;
102 
103     /**
104      * Field standards.
105      */
106     private java.util.List<Standard> standards;
107 
108     /**
109      * Field extra.
110      */
111     private java.util.Map<Object, String> extra;
112 
113 
114       //-----------/
115      //- Methods -/
116     //-----------/
117 
118     /**
119      * Method addExtra.
120      * 
121      * @param key a key object.
122      * @param value a value object.
123      */
124     public void addExtra( Object key, String value )
125     {
126         getExtra().put( key, value );
127     } //-- void addExtra( Object, String )
128 
129     /**
130      * Method addStandard.
131      * 
132      * @param standard a standard object.
133      */
134     public void addStandard( Standard standard )
135     {
136         getStandards().add( standard );
137     } //-- void addStandard( Standard )
138 
139     /**
140      * Method equals.
141      * 
142      * @param other a other object.
143      * @return boolean
144      */
145     public boolean equals( Object other )
146     {
147         if ( this == other )
148         {
149             return true;
150         }
151 
152         if ( !( other instanceof ASFExtOptions ) )
153         {
154             return false;
155         }
156 
157         ASFExtOptions that = (ASFExtOptions) other;
158         boolean result = true;
159 
160         result = result && included == that.included;
161         result = result && ( getPmc() == null ? that.getPmc() == null : getPmc().equals( that.getPmc() ) );
162         result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
163         result = result && ( getCharter() == null ? that.getCharter() == null : getCharter().equals( that.getCharter() ) );
164         result = result && ( getChair() == null ? that.getChair() == null : getChair().equals( that.getChair() ) );
165         result = result && ( getExtra() == null ? that.getExtra() == null : getExtra().equals( that.getExtra() ) );
166 
167         return result;
168     } //-- boolean equals( Object )
169 
170     /**
171      * Get this should contain the name of the current PMC
172      * chairperson. Optional.<br>
173      * <b>Note</b>: it will be discovered from
174      * ${project.developers.roles}
175      * @see <a
176      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
177      * 
178      * @return String
179      */
180     public String getChair()
181     {
182         return this.chair;
183     } //-- String getChair()
184 
185     /**
186      * Get every PMC is created by a board resolution with a
187      * specific charter. That charter should be
188      *             listed here as it gives the focus and scope of
189      * the PMC. Optional.
190      * @see <a
191      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
192      * 
193      * @return String
194      */
195     public String getCharter()
196     {
197         return this.charter;
198     } //-- String getCharter()
199 
200     /**
201      * Method getExtra.
202      * 
203      * @return Map
204      */
205     public java.util.Map<Object, String> getExtra()
206     {
207         if ( this.extra == null )
208         {
209             this.extra = new java.util.HashMap<Object, String>();
210         }
211 
212         return this.extra;
213     } //-- java.util.Map<Object, String> getExtra()
214 
215     /**
216      * Get the name of the PMC, including the 'Apache ', e.g.
217      * 'Apache Forrest'. Optional will be discovered from POM.<br>
218      * <b>Default value</b>: ${project.name}
219      * @see <a
220      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
221      * 
222      * @return String
223      */
224     public String getName()
225     {
226         return this.name;
227     } //-- String getName()
228 
229     /**
230      * Get the top level element within a file. Optional will be
231      * discovered from POM.<br>
232      * <b>Default value</b>: ${project.url}
233      * @see <a
234      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
235      * 
236      * @return String
237      */
238     public String getPmc()
239     {
240         return this.pmc;
241     } //-- String getPmc()
242 
243     /**
244      * Method getStandards.
245      * 
246      * @return List
247      */
248     public java.util.List<Standard> getStandards()
249     {
250         if ( this.standards == null )
251         {
252             this.standards = new java.util.ArrayList<Standard>();
253         }
254 
255         return this.standards;
256     } //-- java.util.List<Standard> getStandards()
257 
258     /**
259      * Get the URI of the ASFext xmlns namespace.<br>
260      * <b>Default value</b>: http://projects.apache.org/ns/asfext#.
261      * 
262      * @return String
263      */
264     public String getXmlnsNamespaceURI()
265     {
266         return this.xmlnsNamespaceURI;
267     } //-- String getXmlnsNamespaceURI()
268 
269     /**
270      * Get the ASFext xmlns prefix.<br>
271      * <b>Default value</b>: asfext.
272      * 
273      * @return String
274      */
275     public String getXmlnsPrefix()
276     {
277         return this.xmlnsPrefix;
278     } //-- String getXmlnsPrefix()
279 
280     /**
281      * Method hashCode.
282      * 
283      * @return int
284      */
285     public int hashCode()
286     {
287         int result = 17;
288 
289         result = 37 * result + ( included ? 0 : 1 );
290         result = 37 * result + ( pmc != null ? pmc.hashCode() : 0 );
291         result = 37 * result + ( name != null ? name.hashCode() : 0 );
292         result = 37 * result + ( charter != null ? charter.hashCode() : 0 );
293         result = 37 * result + ( chair != null ? chair.hashCode() : 0 );
294         result = 37 * result + ( extra != null ? extra.hashCode() : 0 );
295 
296         return result;
297     } //-- int hashCode()
298 
299     /**
300      * Get flag to use or not the ASF extension in the generated
301      * DOAP.
302      * 
303      * @return boolean
304      */
305     public boolean isIncluded()
306     {
307         return this.included;
308     } //-- boolean isIncluded()
309 
310     /**
311      * Method removeStandard.
312      * 
313      * @param standard a standard object.
314      */
315     public void removeStandard( Standard standard )
316     {
317         getStandards().remove( standard );
318     } //-- void removeStandard( Standard )
319 
320     /**
321      * Set this should contain the name of the current PMC
322      * chairperson. Optional.<br>
323      * <b>Note</b>: it will be discovered from
324      * ${project.developers.roles}
325      * @see <a
326      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
327      * 
328      * @param chair a chair object.
329      */
330     public void setChair( String chair )
331     {
332         this.chair = chair;
333     } //-- void setChair( String )
334 
335     /**
336      * Set every PMC is created by a board resolution with a
337      * specific charter. That charter should be
338      *             listed here as it gives the focus and scope of
339      * the PMC. Optional.
340      * @see <a
341      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
342      * 
343      * @param charter a charter object.
344      */
345     public void setCharter( String charter )
346     {
347         this.charter = charter;
348     } //-- void setCharter( String )
349 
350     /**
351      * Set extra ASFext vocabulary as key/value, not actually
352      * defined as plugin options.
353      * 
354      * @param extra a extra object.
355      */
356     public void setExtra( java.util.Map extra )
357     {
358         this.extra = extra;
359     } //-- void setExtra( java.util.Map )
360 
361     /**
362      * Set flag to use or not the ASF extension in the generated
363      * DOAP.
364      * 
365      * @param included a included object.
366      */
367     public void setIncluded( boolean included )
368     {
369         this.included = included;
370     } //-- void setIncluded( boolean )
371 
372     /**
373      * Set the name of the PMC, including the 'Apache ', e.g.
374      * 'Apache Forrest'. Optional will be discovered from POM.<br>
375      * <b>Default value</b>: ${project.name}
376      * @see <a
377      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
378      * 
379      * @param name a name object.
380      */
381     public void setName( String name )
382     {
383         this.name = name;
384     } //-- void setName( String )
385 
386     /**
387      * Set the top level element within a file. Optional will be
388      * discovered from POM.<br>
389      * <b>Default value</b>: ${project.url}
390      * @see <a
391      * href="http://projects.apache.org/docs/pmc.html">http://projects.apache.org/docs/pmc.html</a>
392      * 
393      * @param pmc a pmc object.
394      */
395     public void setPmc( String pmc )
396     {
397         this.pmc = pmc;
398     } //-- void setPmc( String )
399 
400     /**
401      * Set list of Standard object. Optional.
402      * @see <a
403      * href="http://projects.apache.org/docs/standards.html">http://projects.apache.org/docs/standards.html</a>
404      * 
405      * @param standards a standards object.
406      */
407     public void setStandards( java.util.List<Standard> standards )
408     {
409         this.standards = standards;
410     } //-- void setStandards( java.util.List )
411 
412     /**
413      * Set the URI of the ASFext xmlns namespace.<br>
414      * <b>Default value</b>: http://projects.apache.org/ns/asfext#.
415      * 
416      * @param xmlnsNamespaceURI a xmlnsNamespaceURI object.
417      */
418     public void setXmlnsNamespaceURI( String xmlnsNamespaceURI )
419     {
420         this.xmlnsNamespaceURI = xmlnsNamespaceURI;
421     } //-- void setXmlnsNamespaceURI( String )
422 
423     /**
424      * Set the ASFext xmlns prefix.<br>
425      * <b>Default value</b>: asfext.
426      * 
427      * @param xmlnsPrefix a xmlnsPrefix object.
428      */
429     public void setXmlnsPrefix( String xmlnsPrefix )
430     {
431         this.xmlnsPrefix = xmlnsPrefix;
432     } //-- void setXmlnsPrefix( String )
433 
434     /**
435      * Method toString.
436      * 
437      * @return String
438      */
439     public java.lang.String toString()
440     {
441         StringBuilder buf = new StringBuilder( 128 );
442 
443         buf.append( "included = '" );
444         buf.append( isIncluded() );
445         buf.append( "'" );
446         buf.append( "\n" ); 
447         buf.append( "pmc = '" );
448         buf.append( getPmc() );
449         buf.append( "'" );
450         buf.append( "\n" ); 
451         buf.append( "name = '" );
452         buf.append( getName() );
453         buf.append( "'" );
454         buf.append( "\n" ); 
455         buf.append( "charter = '" );
456         buf.append( getCharter() );
457         buf.append( "'" );
458         buf.append( "\n" ); 
459         buf.append( "chair = '" );
460         buf.append( getChair() );
461         buf.append( "'" );
462         buf.append( "\n" ); 
463         buf.append( "extra = '" );
464         buf.append( getExtra() );
465         buf.append( "'" );
466 
467         return buf.toString();
468     } //-- java.lang.String toString()
469 
470 }