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