001/*
002 =================== DO NOT EDIT THIS FILE ====================
003 
004 Generated by Modello 2.4.0,
005 
006 any modifications will be overwritten.
007 
008 ==============================================================
009 */
010
011package org.apache.maven.doxia.module.fml.model;
012
013/**
014 * 
015 *          The <code>&lt;faqs&gt;</code> element is the root of
016 * the FML descriptor.
017 *          The following table lists all of the possible child
018 * elements.
019 *       
020 * 
021 * @version $Revision$ $Date$
022 */
023@SuppressWarnings( "all" )
024public class Faqs
025    implements java.io.Serializable
026{
027
028      //--------------------------/
029     //- Class/Member Variables -/
030    //--------------------------/
031
032    /**
033     * 
034     *             The title name of this FAQ.
035     *           
036     */
037    private String title = "FAQ";
038
039    /**
040     * 
041     *             Boolean to generate optionally [top] links.
042     *           
043     */
044    private boolean toplink = true;
045
046    /**
047     * Field parts.
048     */
049    private java.util.List<Part> parts;
050
051    /**
052     * Field modelEncoding.
053     */
054    private String modelEncoding = "UTF-8";
055
056
057      //-----------/
058     //- Methods -/
059    //-----------/
060
061    /**
062     * Method addPart.
063     * 
064     * @param part a part object.
065     */
066    public void addPart( Part part )
067    {
068        getParts().add( part );
069    } //-- void addPart( Part )
070
071    /**
072     * Method equals.
073     * 
074     * @param other a other object.
075     * @return boolean
076     */
077    public boolean equals( Object other )
078    {
079        if ( this == other )
080        {
081            return true;
082        }
083
084        if ( !( other instanceof Faqs ) )
085        {
086            return false;
087        }
088
089        Faqs that = (Faqs) other;
090        boolean result = true;
091
092        result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
093        result = result && toplink == that.toplink;
094        result = result && ( getParts() == null ? that.getParts() == null : getParts().equals( that.getParts() ) );
095
096        return result;
097    } //-- boolean equals( Object )
098
099    /**
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}