View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-04-13 23:09:58,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.doxia.book.model;
9   
10  /**
11   * 
12   *         Describes the book layout and packaging.
13   *       
14   * 
15   * @version $Revision$ $Date$
16   */
17  @SuppressWarnings( "all" )
18  public class BookModel
19      implements java.io.Serializable
20  {
21  
22        //--------------------------/
23       //- Class/Member Variables -/
24      //--------------------------/
25  
26      /**
27       * 
28       *             Specifies the id of this book. This is a
29       * symbolic name for a
30       *             particular book from this project.
31       *           
32       */
33      private String id;
34  
35      /**
36       * 
37       *             Specifies the title of this book.
38       *           
39       */
40      private String title;
41  
42      /**
43       * 
44       *             Specifies the author of this book.
45       *           
46       */
47      private String author;
48  
49      /**
50       * 
51       *             Specifies the date of this book.
52       *           
53       */
54      private String date;
55  
56      /**
57       * Field chapters.
58       */
59      private java.util.List<Chapter> chapters;
60  
61      /**
62       * Field modelEncoding.
63       */
64      private String modelEncoding = "UTF-8";
65  
66  
67        //-----------/
68       //- Methods -/
69      //-----------/
70  
71      /**
72       * Method addChapter.
73       * 
74       * @param chapter
75       */
76      public void addChapter( Chapter chapter )
77      {
78          getChapters().add( chapter );
79      } //-- void addChapter( Chapter )
80  
81      /**
82       * Method equals.
83       * 
84       * @param other
85       * @return boolean
86       */
87      public boolean equals( Object other )
88      {
89          if ( this == other )
90          {
91              return true;
92          }
93  
94          if ( !( other instanceof BookModel ) )
95          {
96              return false;
97          }
98  
99          BookModel that = (BookModel) other;
100         boolean result = true;
101 
102         result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
103 
104         return result;
105     } //-- boolean equals( Object )
106 
107     /**
108      * Get specifies the author of this book.
109      * 
110      * @return String
111      */
112     public String getAuthor()
113     {
114         return this.author;
115     } //-- String getAuthor()
116 
117     /**
118      * Method getChapters.
119      * 
120      * @return List
121      */
122     public java.util.List<Chapter> getChapters()
123     {
124         if ( this.chapters == null )
125         {
126             this.chapters = new java.util.ArrayList<Chapter>();
127         }
128 
129         return this.chapters;
130     } //-- java.util.List<Chapter> getChapters()
131 
132     /**
133      * Get specifies the date of this book.
134      * 
135      * @return String
136      */
137     public String getDate()
138     {
139         return this.date;
140     } //-- String getDate()
141 
142     /**
143      * Get specifies the id of this book. This is a symbolic name
144      * for a
145      *             particular book from this project.
146      * 
147      * @return String
148      */
149     public String getId()
150     {
151         return this.id;
152     } //-- String getId()
153 
154     /**
155      * Get the modelEncoding field.
156      * 
157      * @return String
158      */
159     public String getModelEncoding()
160     {
161         return this.modelEncoding;
162     } //-- String getModelEncoding()
163 
164     /**
165      * Get specifies the title of this book.
166      * 
167      * @return String
168      */
169     public String getTitle()
170     {
171         return this.title;
172     } //-- String getTitle()
173 
174     /**
175      * Method hashCode.
176      * 
177      * @return int
178      */
179     public int hashCode()
180     {
181         int result = 17;
182 
183         result = 37 * result + ( id != null ? id.hashCode() : 0 );
184 
185         return result;
186     } //-- int hashCode()
187 
188     /**
189      * Method removeChapter.
190      * 
191      * @param chapter
192      */
193     public void removeChapter( Chapter chapter )
194     {
195         getChapters().remove( chapter );
196     } //-- void removeChapter( Chapter )
197 
198     /**
199      * Set specifies the author of this book.
200      * 
201      * @param author
202      */
203     public void setAuthor( String author )
204     {
205         this.author = author;
206     } //-- void setAuthor( String )
207 
208     /**
209      * Set specifies a collection of chapters.
210      * 
211      * @param chapters
212      */
213     public void setChapters( java.util.List<Chapter> chapters )
214     {
215         this.chapters = chapters;
216     } //-- void setChapters( java.util.List )
217 
218     /**
219      * Set specifies the date of this book.
220      * 
221      * @param date
222      */
223     public void setDate( String date )
224     {
225         this.date = date;
226     } //-- void setDate( String )
227 
228     /**
229      * Set specifies the id of this book. This is a symbolic name
230      * for a
231      *             particular book from this project.
232      * 
233      * @param id
234      */
235     public void setId( String id )
236     {
237         this.id = id;
238     } //-- void setId( String )
239 
240     /**
241      * Set the modelEncoding field.
242      * 
243      * @param modelEncoding
244      */
245     public void setModelEncoding( String modelEncoding )
246     {
247         this.modelEncoding = modelEncoding;
248     } //-- void setModelEncoding( String )
249 
250     /**
251      * Set specifies the title of this book.
252      * 
253      * @param title
254      */
255     public void setTitle( String title )
256     {
257         this.title = title;
258     } //-- void setTitle( String )
259 
260     /**
261      * Method toString.
262      * 
263      * @return String
264      */
265     public java.lang.String toString()
266     {
267         StringBuilder buf = new StringBuilder( 128 );
268 
269         buf.append( "id = '" );
270         buf.append( getId() );
271         buf.append( "'" );
272 
273         return buf.toString();
274     } //-- java.lang.String toString()
275 
276 }