View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.9.1,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.doxia.document;
7   
8   /**
9    * An author of the document.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class DocumentAuthor
15      implements java.io.Serializable
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * 
24       *              The first name of the author.
25       *           
26       */
27      private String firstName;
28  
29      /**
30       * 
31       *             The last name of the author.
32       *           
33       */
34      private String lastName;
35  
36      /**
37       * 
38       *             The full name of the author, usually as a String
39       * of "firstName lastName".
40       *             @since 1.1.1
41       *           .
42       */
43      private String name;
44  
45      /**
46       * 
47       *              The initials of the author.
48       *           
49       */
50      private String initials;
51  
52      /**
53       * 
54       *              The title of the author.
55       *           
56       */
57      private String title;
58  
59      /**
60       * 
61       *              The position of the author.
62       *           
63       */
64      private String position;
65  
66      /**
67       * 
68       *             The email address of the author.
69       *           
70       */
71      private String email;
72  
73      /**
74       * 
75       *             The telephone number of the author.
76       *           
77       */
78      private String phoneNumber;
79  
80      /**
81       * 
82       *             The fax number of the author.
83       *           
84       */
85      private String faxNumber;
86  
87      /**
88       * 
89       *             The name of the company that employs the author.
90       *           
91       */
92      private String companyName;
93  
94      /**
95       * 
96       *              The street name of the address of the author.
97       *           
98       */
99      private String street;
100 
101     /**
102      * 
103      *             The city name of the address of the author.
104      *           
105      */
106     private String city;
107 
108     /**
109      * 
110      *             The postal code of the address of the author.
111      *           
112      */
113     private String postalCode;
114 
115     /**
116      * 
117      *             The country of the address of the author.
118      *           
119      */
120     private String country;
121 
122     /**
123      * 
124      *             The state or province of the address of the
125      * author, if applicable.
126      *           
127      */
128     private String state;
129 
130 
131       //-----------/
132      //- Methods -/
133     //-----------/
134 
135     /**
136      * Method equals.
137      * 
138      * @param other
139      * @return boolean
140      */
141     public boolean equals( Object other )
142     {
143         if ( this == other )
144         {
145             return true;
146         }
147 
148         if ( !( other instanceof DocumentAuthor ) )
149         {
150             return false;
151         }
152 
153         DocumentAuthor that = (DocumentAuthor) other;
154         boolean result = true;
155 
156         result = result && ( getFirstName() == null ? that.getFirstName() == null : getFirstName().equals( that.getFirstName() ) );
157         result = result && ( getLastName() == null ? that.getLastName() == null : getLastName().equals( that.getLastName() ) );
158         result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
159         result = result && ( getInitials() == null ? that.getInitials() == null : getInitials().equals( that.getInitials() ) );
160         result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
161         result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
162         result = result && ( getEmail() == null ? that.getEmail() == null : getEmail().equals( that.getEmail() ) );
163         result = result && ( getPhoneNumber() == null ? that.getPhoneNumber() == null : getPhoneNumber().equals( that.getPhoneNumber() ) );
164         result = result && ( getFaxNumber() == null ? that.getFaxNumber() == null : getFaxNumber().equals( that.getFaxNumber() ) );
165         result = result && ( getCompanyName() == null ? that.getCompanyName() == null : getCompanyName().equals( that.getCompanyName() ) );
166         result = result && ( getStreet() == null ? that.getStreet() == null : getStreet().equals( that.getStreet() ) );
167         result = result && ( getCity() == null ? that.getCity() == null : getCity().equals( that.getCity() ) );
168         result = result && ( getPostalCode() == null ? that.getPostalCode() == null : getPostalCode().equals( that.getPostalCode() ) );
169         result = result && ( getCountry() == null ? that.getCountry() == null : getCountry().equals( that.getCountry() ) );
170         result = result && ( getState() == null ? that.getState() == null : getState().equals( that.getState() ) );
171 
172         return result;
173     } //-- boolean equals( Object )
174 
175     /**
176      * Get the city name of the address of the author.
177      * 
178      * @return String
179      */
180     public String getCity()
181     {
182         return this.city;
183     } //-- String getCity()
184 
185     /**
186      * Get the name of the company that employs the author.
187      * 
188      * @return String
189      */
190     public String getCompanyName()
191     {
192         return this.companyName;
193     } //-- String getCompanyName()
194 
195     /**
196      * Get the country of the address of the author.
197      * 
198      * @return String
199      */
200     public String getCountry()
201     {
202         return this.country;
203     } //-- String getCountry()
204 
205     /**
206      * Get the email address of the author.
207      * 
208      * @return String
209      */
210     public String getEmail()
211     {
212         return this.email;
213     } //-- String getEmail()
214 
215     /**
216      * Get the fax number of the author.
217      * 
218      * @return String
219      */
220     public String getFaxNumber()
221     {
222         return this.faxNumber;
223     } //-- String getFaxNumber()
224 
225     /**
226      * Get the first name of the author.
227      * 
228      * @return String
229      */
230     public String getFirstName()
231     {
232         return this.firstName;
233     } //-- String getFirstName()
234 
235     /**
236      * Get the initials of the author.
237      * 
238      * @return String
239      */
240     public String getInitials()
241     {
242         return this.initials;
243     } //-- String getInitials()
244 
245     /**
246      * Get the last name of the author.
247      * 
248      * @return String
249      */
250     public String getLastName()
251     {
252         return this.lastName;
253     } //-- String getLastName()
254 
255     /**
256      * Get the full name of the author, usually as a String of
257      * "firstName lastName".
258      *             @since 1.1.1.
259      * 
260      * @return String
261      */
262     public String getName()
263     {
264         return this.name;
265     } //-- String getName()
266 
267     /**
268      * Get the telephone number of the author.
269      * 
270      * @return String
271      */
272     public String getPhoneNumber()
273     {
274         return this.phoneNumber;
275     } //-- String getPhoneNumber()
276 
277     /**
278      * Get the position of the author.
279      * 
280      * @return String
281      */
282     public String getPosition()
283     {
284         return this.position;
285     } //-- String getPosition()
286 
287     /**
288      * Get the postal code of the address of the author.
289      * 
290      * @return String
291      */
292     public String getPostalCode()
293     {
294         return this.postalCode;
295     } //-- String getPostalCode()
296 
297     /**
298      * Get the state or province of the address of the author, if
299      * applicable.
300      * 
301      * @return String
302      */
303     public String getState()
304     {
305         return this.state;
306     } //-- String getState()
307 
308     /**
309      * Get the street name of the address of the author.
310      * 
311      * @return String
312      */
313     public String getStreet()
314     {
315         return this.street;
316     } //-- String getStreet()
317 
318     /**
319      * Get the title of the author.
320      * 
321      * @return String
322      */
323     public String getTitle()
324     {
325         return this.title;
326     } //-- String getTitle()
327 
328     /**
329      * Method hashCode.
330      * 
331      * @return int
332      */
333     public int hashCode()
334     {
335         int result = 17;
336 
337         result = 37 * result + ( firstName != null ? firstName.hashCode() : 0 );
338         result = 37 * result + ( lastName != null ? lastName.hashCode() : 0 );
339         result = 37 * result + ( name != null ? name.hashCode() : 0 );
340         result = 37 * result + ( initials != null ? initials.hashCode() : 0 );
341         result = 37 * result + ( title != null ? title.hashCode() : 0 );
342         result = 37 * result + ( position != null ? position.hashCode() : 0 );
343         result = 37 * result + ( email != null ? email.hashCode() : 0 );
344         result = 37 * result + ( phoneNumber != null ? phoneNumber.hashCode() : 0 );
345         result = 37 * result + ( faxNumber != null ? faxNumber.hashCode() : 0 );
346         result = 37 * result + ( companyName != null ? companyName.hashCode() : 0 );
347         result = 37 * result + ( street != null ? street.hashCode() : 0 );
348         result = 37 * result + ( city != null ? city.hashCode() : 0 );
349         result = 37 * result + ( postalCode != null ? postalCode.hashCode() : 0 );
350         result = 37 * result + ( country != null ? country.hashCode() : 0 );
351         result = 37 * result + ( state != null ? state.hashCode() : 0 );
352 
353         return result;
354     } //-- int hashCode()
355 
356     /**
357      * Set the city name of the address of the author.
358      * 
359      * @param city
360      */
361     public void setCity( String city )
362     {
363         this.city = city;
364     } //-- void setCity( String )
365 
366     /**
367      * Set the name of the company that employs the author.
368      * 
369      * @param companyName
370      */
371     public void setCompanyName( String companyName )
372     {
373         this.companyName = companyName;
374     } //-- void setCompanyName( String )
375 
376     /**
377      * Set the country of the address of the author.
378      * 
379      * @param country
380      */
381     public void setCountry( String country )
382     {
383         this.country = country;
384     } //-- void setCountry( String )
385 
386     /**
387      * Set the email address of the author.
388      * 
389      * @param email
390      */
391     public void setEmail( String email )
392     {
393         this.email = email;
394     } //-- void setEmail( String )
395 
396     /**
397      * Set the fax number of the author.
398      * 
399      * @param faxNumber
400      */
401     public void setFaxNumber( String faxNumber )
402     {
403         this.faxNumber = faxNumber;
404     } //-- void setFaxNumber( String )
405 
406     /**
407      * Set the first name of the author.
408      * 
409      * @param firstName
410      */
411     public void setFirstName( String firstName )
412     {
413         this.firstName = firstName;
414     } //-- void setFirstName( String )
415 
416     /**
417      * Set the initials of the author.
418      * 
419      * @param initials
420      */
421     public void setInitials( String initials )
422     {
423         this.initials = initials;
424     } //-- void setInitials( String )
425 
426     /**
427      * Set the last name of the author.
428      * 
429      * @param lastName
430      */
431     public void setLastName( String lastName )
432     {
433         this.lastName = lastName;
434     } //-- void setLastName( String )
435 
436     /**
437      * Set the full name of the author, usually as a String of
438      * "firstName lastName".
439      *             @since 1.1.1.
440      * 
441      * @param name
442      */
443     public void setName( String name )
444     {
445         this.name = name;
446     } //-- void setName( String )
447 
448     /**
449      * Set the telephone number of the author.
450      * 
451      * @param phoneNumber
452      */
453     public void setPhoneNumber( String phoneNumber )
454     {
455         this.phoneNumber = phoneNumber;
456     } //-- void setPhoneNumber( String )
457 
458     /**
459      * Set the position of the author.
460      * 
461      * @param position
462      */
463     public void setPosition( String position )
464     {
465         this.position = position;
466     } //-- void setPosition( String )
467 
468     /**
469      * Set the postal code of the address of the author.
470      * 
471      * @param postalCode
472      */
473     public void setPostalCode( String postalCode )
474     {
475         this.postalCode = postalCode;
476     } //-- void setPostalCode( String )
477 
478     /**
479      * Set the state or province of the address of the author, if
480      * applicable.
481      * 
482      * @param state
483      */
484     public void setState( String state )
485     {
486         this.state = state;
487     } //-- void setState( String )
488 
489     /**
490      * Set the street name of the address of the author.
491      * 
492      * @param street
493      */
494     public void setStreet( String street )
495     {
496         this.street = street;
497     } //-- void setStreet( String )
498 
499     /**
500      * Set the title of the author.
501      * 
502      * @param title
503      */
504     public void setTitle( String title )
505     {
506         this.title = title;
507     } //-- void setTitle( String )
508 
509     /**
510      * Method toString.
511      * 
512      * @return String
513      */
514     public java.lang.String toString()
515     {
516         StringBuilder buf = new StringBuilder( 128 );
517 
518         buf.append( "firstName = '" );
519         buf.append( getFirstName() );
520         buf.append( "'" );
521         buf.append( "\n" ); 
522         buf.append( "lastName = '" );
523         buf.append( getLastName() );
524         buf.append( "'" );
525         buf.append( "\n" ); 
526         buf.append( "name = '" );
527         buf.append( getName() );
528         buf.append( "'" );
529         buf.append( "\n" ); 
530         buf.append( "initials = '" );
531         buf.append( getInitials() );
532         buf.append( "'" );
533         buf.append( "\n" ); 
534         buf.append( "title = '" );
535         buf.append( getTitle() );
536         buf.append( "'" );
537         buf.append( "\n" ); 
538         buf.append( "position = '" );
539         buf.append( getPosition() );
540         buf.append( "'" );
541         buf.append( "\n" ); 
542         buf.append( "email = '" );
543         buf.append( getEmail() );
544         buf.append( "'" );
545         buf.append( "\n" ); 
546         buf.append( "phoneNumber = '" );
547         buf.append( getPhoneNumber() );
548         buf.append( "'" );
549         buf.append( "\n" ); 
550         buf.append( "faxNumber = '" );
551         buf.append( getFaxNumber() );
552         buf.append( "'" );
553         buf.append( "\n" ); 
554         buf.append( "companyName = '" );
555         buf.append( getCompanyName() );
556         buf.append( "'" );
557         buf.append( "\n" ); 
558         buf.append( "street = '" );
559         buf.append( getStreet() );
560         buf.append( "'" );
561         buf.append( "\n" ); 
562         buf.append( "city = '" );
563         buf.append( getCity() );
564         buf.append( "'" );
565         buf.append( "\n" ); 
566         buf.append( "postalCode = '" );
567         buf.append( getPostalCode() );
568         buf.append( "'" );
569         buf.append( "\n" ); 
570         buf.append( "country = '" );
571         buf.append( getCountry() );
572         buf.append( "'" );
573         buf.append( "\n" ); 
574         buf.append( "state = '" );
575         buf.append( getState() );
576         buf.append( "'" );
577 
578         return buf.toString();
579     } //-- java.lang.String toString()
580 
581     
582             
583     /**
584      * Get the full name of the author.
585      *
586      * @return <code>name</code> if defined, <code>firsName lastName</code> otherwise.
587      * @see #getName()
588      * @see #getFirstName()
589      * @see #getLastName()
590      * @since 1.1.1
591      */
592     public String getFullName()
593     {
594         if ( getName() != null && getName().trim().length() > 0 )
595         {
596             return getName().trim();
597         }
598 
599         return ( getFirstName() != null ? getFirstName().trim() : "null" ) + " "
600             + ( getLastName() != null ? getLastName().trim() : "null" );
601     }
602             
603           
604 }