View Javadoc
1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    
4    Generated by Modello 2.4.0,
5    
6    any modifications will be overwritten.
7    
8    ==============================================================
9    */
10  
11  package org.apache.maven.doxia.module.fml.model;
12  
13  /**
14   * 
15   *          The <code>&lt;faqs&gt;</code> element is the root of
16   * the FML descriptor.
17   *          The following table lists all of the possible child
18   * elements.
19   *       
20   * 
21   * @version $Revision$ $Date$
22   */
23  @SuppressWarnings( "all" )
24  public class Faqs
25      implements java.io.Serializable
26  {
27  
28        //--------------------------/
29       //- Class/Member Variables -/
30      //--------------------------/
31  
32      /**
33       * 
34       *             The title name of this FAQ.
35       *           
36       */
37      private String title = "FAQ";
38  
39      /**
40       * 
41       *             Boolean to generate optionally [top] links.
42       *           
43       */
44      private boolean toplink = true;
45  
46      /**
47       * Field parts.
48       */
49      private java.util.List<Part> parts;
50  
51      /**
52       * Field modelEncoding.
53       */
54      private String modelEncoding = "UTF-8";
55  
56  
57        //-----------/
58       //- Methods -/
59      //-----------/
60  
61      /**
62       * Method addPart.
63       * 
64       * @param part a part object.
65       */
66      public void addPart( Part part )
67      {
68          getParts().add( part );
69      } //-- void addPart( Part )
70  
71      /**
72       * Method equals.
73       * 
74       * @param other a other object.
75       * @return boolean
76       */
77      public boolean equals( Object other )
78      {
79          if ( this == other )
80          {
81              return true;
82          }
83  
84          if ( !( other instanceof Faqs ) )
85          {
86              return false;
87          }
88  
89          Faqs that = (Faqs) other;
90          boolean result = true;
91  
92          result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
93          result = result && toplink == that.toplink;
94          result = result && ( getParts() == null ? that.getParts() == null : getParts().equals( that.getParts() ) );
95  
96          return result;
97      } //-- boolean equals( Object )
98  
99      /**
100      * Get the modelEncoding field.
101      * 
102      * @return String
103      */
104     public String getModelEncoding()
105     {
106         return this.modelEncoding;
107     } //-- String getModelEncoding()
108 
109     /**
110      * Method getParts.
111      * 
112      * @return List
113      */
114     public java.util.List<Part> getParts()
115     {
116         if ( this.parts == null )
117         {
118             this.parts = new java.util.ArrayList<Part>();
119         }
120 
121         return this.parts;
122     } //-- java.util.List<Part> getParts()
123 
124     /**
125      * Get the title name of this FAQ.
126      * 
127      * @return String
128      */
129     public String getTitle()
130     {
131         return this.title;
132     } //-- String getTitle()
133 
134     /**
135      * Method hashCode.
136      * 
137      * @return int
138      */
139     public int hashCode()
140     {
141         int result = 17;
142 
143         result = 37 * result + ( title != null ? title.hashCode() : 0 );
144         result = 37 * result + ( toplink ? 0 : 1 );
145         result = 37 * result + ( parts != null ? parts.hashCode() : 0 );
146 
147         return result;
148     } //-- int hashCode()
149 
150     /**
151      * Get boolean to generate optionally [top] links.
152      * 
153      * @return boolean
154      */
155     public boolean isToplink()
156     {
157         return this.toplink;
158     } //-- boolean isToplink()
159 
160     /**
161      * Method removePart.
162      * 
163      * @param part a part object.
164      */
165     public void removePart( Part part )
166     {
167         getParts().remove( part );
168     } //-- void removePart( Part )
169 
170     /**
171      * Set the modelEncoding field.
172      * 
173      * @param modelEncoding a modelEncoding object.
174      */
175     public void setModelEncoding( String modelEncoding )
176     {
177         this.modelEncoding = modelEncoding;
178     } //-- void setModelEncoding( String )
179 
180     /**
181      * Set list of FAQ part.
182      * 
183      * @param parts a parts object.
184      */
185     public void setParts( java.util.List<Part> parts )
186     {
187         this.parts = parts;
188     } //-- void setParts( java.util.List )
189 
190     /**
191      * Set the title name of this FAQ.
192      * 
193      * @param title a title object.
194      */
195     public void setTitle( String title )
196     {
197         this.title = title;
198     } //-- void setTitle( String )
199 
200     /**
201      * Set boolean to generate optionally [top] links.
202      * 
203      * @param toplink a toplink object.
204      */
205     public void setToplink( boolean toplink )
206     {
207         this.toplink = toplink;
208     } //-- void setToplink( boolean )
209 
210     /**
211      * Method toString.
212      * 
213      * @return String
214      */
215     public java.lang.String toString()
216     {
217         StringBuilder buf = new StringBuilder( 128 );
218 
219         buf.append( "title = '" );
220         buf.append( getTitle() );
221         buf.append( "'" );
222         buf.append( "\n" ); 
223         buf.append( "toplink = '" );
224         buf.append( isToplink() );
225         buf.append( "'" );
226         buf.append( "\n" ); 
227         buf.append( "parts = '" );
228         buf.append( getParts() );
229         buf.append( "'" );
230 
231         return buf.toString();
232     } //-- java.lang.String toString()
233 
234 }