View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-04-13 21:28:13,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.doxia.document;
9   
10  /**
11   * 
12   *         <p>
13   *           Metadata is general information about a document.
14   *         </p>
15   * 
16   *         <p>
17   *           The metadata elements used here were mostly inspired
18   * by the
19   *           <a href="http://docs.oasis-open.org/office/v1.1/">Open
20   * Document Format Specification v. 1.1</a>,
21   *           which in turn borrows heavily upon the metadata
22   * standards developed by the
23   *           <a href="http://www.dublincore.org">Dublin Core
24   * Metadata Initiative</a>.
25   *         </p>
26   *       
27   * 
28   * @version $Revision$ $Date$
29   */
30  @SuppressWarnings( "all" )
31  public class DocumentMeta
32      implements java.io.Serializable
33  {
34  
35        //--------------------------/
36       //- Class/Member Variables -/
37      //--------------------------/
38  
39      /**
40       * 
41       *             The title of the document.
42       *           
43       */
44      private String title;
45  
46      /**
47       * 
48       *             The unique author of the document, usually as a
49       * String of "firstName lastName". For
50       *             more authors, you could use the &lt;authors/&gt;
51       * tag.
52       *           
53       */
54      private String author;
55  
56      /**
57       * Field authors.
58       */
59      private java.util.List<DocumentAuthor> authors;
60  
61      /**
62       * 
63       *             The subject of the document.
64       *           
65       */
66      private String subject;
67  
68      /**
69       * 
70       *             The keywords for the document, usually as a
71       * String of comma separated keywords.
72       *             @deprecated use the &lt;keyWords/&gt; tag
73       * instead of.
74       *           
75       */
76      private String keywords;
77  
78      /**
79       * Field keyWords.
80       */
81      private java.util.List<String> keyWords;
82  
83      /**
84       * 
85       *             The pagesize of the document.
86       *             At least "US", "USLetter" and "A4" should be
87       * supported.
88       *           
89       */
90      private String pageSize;
91  
92      /**
93       * 
94       *              A string that identifies the application or
95       * tool that was
96       *              used to create or last modify the document.
97       *           
98       */
99      private String generator;
100 
101     /**
102      * 
103      *              A brief description of the document.
104      *           
105      */
106     private String description;
107 
108     /**
109      * 
110      *             The name of the person who created the document
111      * initially.
112      *           
113      */
114     private String initialCreator;
115 
116     /**
117      * 
118      *             The name of the person who last modified the
119      * document.
120      *           
121      */
122     private String creator;
123 
124     /**
125      * 
126      *             The name of the person who last printed the
127      * document.
128      *           
129      */
130     private String printedBy;
131 
132     /**
133      * 
134      *             The date and time when the document was created
135      * initially.
136      *             Use the ISO 8601 format
137      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
138      *           
139      */
140     private java.util.Date creationDate;
141 
142     /**
143      * 
144      *             The date as String (recommended format is ISO
145      * 8601) when the document was created initially.
146      *             Only used if <code>creationDate</code> is not
147      * set.
148      *             @since 1.1.1
149      *           .
150      */
151     private String creationdate;
152 
153     /**
154      * 
155      *             The date and time when the document was last
156      * modified.
157      *             Use the ISO 8601 format
158      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
159      *           
160      */
161     private java.util.Date date;
162 
163     /**
164      * 
165      *             The date as String (recommended format is ISO
166      * 8601) when the document was last modified.
167      *             Only used if <code>date</code> is not set.
168      *             @since 1.1.1
169      *           .
170      */
171     private String modifydate;
172 
173     /**
174      * 
175      *             The date and time when the document was last
176      * printed.
177      *             Use the ISO 8601 format
178      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
179      *           
180      */
181     private java.util.Date printDate;
182 
183     /**
184      * 
185      *             The date as String (recommended format is ISO
186      * 8601) when the document was last printed.
187      *             Only used if <code>printDate</code> is not set.
188      *             @since 1.1.1
189      *           .
190      */
191     private String printdate;
192 
193     /**
194      * 
195      *             A template that was used to create the document.
196      *           
197      */
198     private DocumentTemplate template;
199 
200     /**
201      * 
202      *             The hyperlink-behaviour element specifies the
203      * default behavior
204      *             for hyperlinks in the document.
205      *           
206      */
207     private DocumentHyperlinkBehaviour hyperlinkBehaviour;
208 
209     /**
210      * 
211      *             The default language of the document. The
212      * language is represented by
213      *             a two or three letter Language Code taken from
214      * the ISO 639 standard,
215      *             optionally followed by a hyphen (-) and a
216      * two-letter Country Code
217      *             taken from the ISO 3166 standard.
218      *           
219      */
220     private String language = "en-US";
221 
222     /**
223      * 
224      *             The number of editing cycles the document has
225      * been through.
226      *           
227      */
228     private long editingCycles = 0L;
229 
230     /**
231      * 
232      *             The total time spent editing the document.
233      *           
234      */
235     private long editingDuration = 0L;
236 
237     /**
238      * 
239      *             The statistics of the document, for example, the
240      * page count,
241      *             word count, etc.
242      *           
243      */
244     private DocumentStatistic documentStatistic;
245 
246     /**
247      * 
248      *             whether the content of the document is in some
249      * sense confidential.
250      *           
251      */
252     private boolean confidential = false;
253 
254     /**
255      * 
256      *             whether the content of the document is in some
257      * sense preliminary.
258      *           
259      */
260     private boolean draft = false;
261 
262 
263       //-----------/
264      //- Methods -/
265     //-----------/
266 
267     /**
268      * Method addAuthor.
269      * 
270      * @param documentAuthor
271      */
272     public void addAuthor( DocumentAuthor documentAuthor )
273     {
274         getAuthors().add( documentAuthor );
275     } //-- void addAuthor( DocumentAuthor )
276 
277     /**
278      * Method addKeyWord.
279      * 
280      * @param string
281      */
282     public void addKeyWord( String string )
283     {
284         getKeyWords().add( string );
285     } //-- void addKeyWord( String )
286 
287     /**
288      * Method equals.
289      * 
290      * @param other
291      * @return boolean
292      */
293     public boolean equals( Object other )
294     {
295         if ( this == other )
296         {
297             return true;
298         }
299 
300         if ( !( other instanceof DocumentMeta ) )
301         {
302             return false;
303         }
304 
305         DocumentMeta that = (DocumentMeta) other;
306         boolean result = true;
307 
308         result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
309         result = result && ( getAuthor() == null ? that.getAuthor() == null : getAuthor().equals( that.getAuthor() ) );
310         result = result && ( getAuthors() == null ? that.getAuthors() == null : getAuthors().equals( that.getAuthors() ) );
311         result = result && ( getSubject() == null ? that.getSubject() == null : getSubject().equals( that.getSubject() ) );
312         result = result && ( getKeywords() == null ? that.getKeywords() == null : getKeywords().equals( that.getKeywords() ) );
313         result = result && ( getKeyWords() == null ? that.getKeyWords() == null : getKeyWords().equals( that.getKeyWords() ) );
314         result = result && ( getPageSize() == null ? that.getPageSize() == null : getPageSize().equals( that.getPageSize() ) );
315         result = result && ( getGenerator() == null ? that.getGenerator() == null : getGenerator().equals( that.getGenerator() ) );
316         result = result && ( getDescription() == null ? that.getDescription() == null : getDescription().equals( that.getDescription() ) );
317         result = result && ( getInitialCreator() == null ? that.getInitialCreator() == null : getInitialCreator().equals( that.getInitialCreator() ) );
318         result = result && ( getCreator() == null ? that.getCreator() == null : getCreator().equals( that.getCreator() ) );
319         result = result && ( getPrintedBy() == null ? that.getPrintedBy() == null : getPrintedBy().equals( that.getPrintedBy() ) );
320         result = result && ( getCreationDate() == null ? that.getCreationDate() == null : getCreationDate().equals( that.getCreationDate() ) );
321         result = result && ( getCreationdate() == null ? that.getCreationdate() == null : getCreationdate().equals( that.getCreationdate() ) );
322         result = result && ( getDate() == null ? that.getDate() == null : getDate().equals( that.getDate() ) );
323         result = result && ( getModifydate() == null ? that.getModifydate() == null : getModifydate().equals( that.getModifydate() ) );
324         result = result && ( getPrintDate() == null ? that.getPrintDate() == null : getPrintDate().equals( that.getPrintDate() ) );
325         result = result && ( getPrintdate() == null ? that.getPrintdate() == null : getPrintdate().equals( that.getPrintdate() ) );
326         result = result && ( getTemplate() == null ? that.getTemplate() == null : getTemplate().equals( that.getTemplate() ) );
327         result = result && ( getHyperlinkBehaviour() == null ? that.getHyperlinkBehaviour() == null : getHyperlinkBehaviour().equals( that.getHyperlinkBehaviour() ) );
328         result = result && ( getLanguage() == null ? that.getLanguage() == null : getLanguage().equals( that.getLanguage() ) );
329         result = result && editingCycles == that.editingCycles;
330         result = result && editingDuration == that.editingDuration;
331         result = result && ( getDocumentStatistic() == null ? that.getDocumentStatistic() == null : getDocumentStatistic().equals( that.getDocumentStatistic() ) );
332         result = result && confidential == that.confidential;
333         result = result && draft == that.draft;
334 
335         return result;
336     } //-- boolean equals( Object )
337 
338     /**
339      * Get the unique author of the document, usually as a String
340      * of "firstName lastName". For
341      *             more authors, you could use the &lt;authors/&gt;
342      * tag.
343      * 
344      * @return String
345      */
346     public String getAuthor()
347     {
348         return this.author;
349     } //-- String getAuthor()
350 
351     /**
352      * Method getAuthors.
353      * 
354      * @return List
355      */
356     public java.util.List<DocumentAuthor> getAuthors()
357     {
358         if ( this.authors == null )
359         {
360             this.authors = new java.util.ArrayList<DocumentAuthor>();
361         }
362 
363         return this.authors;
364     } //-- java.util.List<DocumentAuthor> getAuthors()
365 
366     /**
367      * Get the date and time when the document was created
368      * initially.
369      *             Use the ISO 8601 format
370      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
371      * 
372      * @return Date
373      */
374     public java.util.Date getCreationDate()
375     {
376         return this.creationDate;
377     } //-- java.util.Date getCreationDate()
378 
379     /**
380      * Get the name of the person who last modified the document.
381      * 
382      * @return String
383      */
384     public String getCreator()
385     {
386         return this.creator;
387     } //-- String getCreator()
388 
389     /**
390      * Get the date and time when the document was last modified.
391      *             Use the ISO 8601 format
392      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
393      * 
394      * @return Date
395      */
396     public java.util.Date getDate()
397     {
398         return this.date;
399     } //-- java.util.Date getDate()
400 
401     /**
402      * Get a brief description of the document.
403      * 
404      * @return String
405      */
406     public String getDescription()
407     {
408         return this.description;
409     } //-- String getDescription()
410 
411     /**
412      * Get the statistics of the document, for example, the page
413      * count,
414      *             word count, etc.
415      * 
416      * @return DocumentStatistic
417      */
418     public DocumentStatistic getDocumentStatistic()
419     {
420         return this.documentStatistic;
421     } //-- DocumentStatistic getDocumentStatistic()
422 
423     /**
424      * Get the number of editing cycles the document has been
425      * through.
426      * 
427      * @return long
428      */
429     public long getEditingCycles()
430     {
431         return this.editingCycles;
432     } //-- long getEditingCycles()
433 
434     /**
435      * Get the total time spent editing the document.
436      * 
437      * @return long
438      */
439     public long getEditingDuration()
440     {
441         return this.editingDuration;
442     } //-- long getEditingDuration()
443 
444     /**
445      * Get a string that identifies the application or tool that
446      * was
447      *              used to create or last modify the document.
448      * 
449      * @return String
450      */
451     public String getGenerator()
452     {
453         return this.generator;
454     } //-- String getGenerator()
455 
456     /**
457      * Get the hyperlink-behaviour element specifies the default
458      * behavior
459      *             for hyperlinks in the document.
460      * 
461      * @return DocumentHyperlinkBehaviour
462      */
463     public DocumentHyperlinkBehaviour getHyperlinkBehaviour()
464     {
465         return this.hyperlinkBehaviour;
466     } //-- DocumentHyperlinkBehaviour getHyperlinkBehaviour()
467 
468     /**
469      * Get the name of the person who created the document
470      * initially.
471      * 
472      * @return String
473      */
474     public String getInitialCreator()
475     {
476         return this.initialCreator;
477     } //-- String getInitialCreator()
478 
479     /**
480      * Method getKeyWords.
481      * 
482      * @return List
483      */
484     public java.util.List<String> getKeyWords()
485     {
486         if ( this.keyWords == null )
487         {
488             this.keyWords = new java.util.ArrayList<String>();
489         }
490 
491         return this.keyWords;
492     } //-- java.util.List<String> getKeyWords()
493 
494     /**
495      * Get the keywords for the document, usually as a String of
496      * comma separated keywords.
497      *             @deprecated use the &lt;keyWords/&gt; tag
498      * instead of.
499      * 
500      * @return String
501      */
502     public String getKeywords()
503     {
504         return this.keywords;
505     } //-- String getKeywords()
506 
507     /**
508      * Get the default language of the document. The language is
509      * represented by
510      *             a two or three letter Language Code taken from
511      * the ISO 639 standard,
512      *             optionally followed by a hyphen (-) and a
513      * two-letter Country Code
514      *             taken from the ISO 3166 standard.
515      * 
516      * @return String
517      */
518     public String getLanguage()
519     {
520         return this.language;
521     } //-- String getLanguage()
522 
523     /**
524      * Get the pagesize of the document.
525      *             At least "US", "USLetter" and "A4" should be
526      * supported.
527      * 
528      * @return String
529      */
530     public String getPageSize()
531     {
532         return this.pageSize;
533     } //-- String getPageSize()
534 
535     /**
536      * Get the date and time when the document was last printed.
537      *             Use the ISO 8601 format
538      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
539      * 
540      * @return Date
541      */
542     public java.util.Date getPrintDate()
543     {
544         return this.printDate;
545     } //-- java.util.Date getPrintDate()
546 
547     /**
548      * Get the name of the person who last printed the document.
549      * 
550      * @return String
551      */
552     public String getPrintedBy()
553     {
554         return this.printedBy;
555     } //-- String getPrintedBy()
556 
557     /**
558      * Get the subject of the document.
559      * 
560      * @return String
561      */
562     public String getSubject()
563     {
564         return this.subject;
565     } //-- String getSubject()
566 
567     /**
568      * Get a template that was used to create the document.
569      * 
570      * @return DocumentTemplate
571      */
572     public DocumentTemplate getTemplate()
573     {
574         return this.template;
575     } //-- DocumentTemplate getTemplate()
576 
577     /**
578      * Get the title of the document.
579      * 
580      * @return String
581      */
582     public String getTitle()
583     {
584         return this.title;
585     } //-- String getTitle()
586 
587     /**
588      * Method hashCode.
589      * 
590      * @return int
591      */
592     public int hashCode()
593     {
594         int result = 17;
595 
596         result = 37 * result + ( title != null ? title.hashCode() : 0 );
597         result = 37 * result + ( author != null ? author.hashCode() : 0 );
598         result = 37 * result + ( authors != null ? authors.hashCode() : 0 );
599         result = 37 * result + ( subject != null ? subject.hashCode() : 0 );
600         result = 37 * result + ( keywords != null ? keywords.hashCode() : 0 );
601         result = 37 * result + ( keyWords != null ? keyWords.hashCode() : 0 );
602         result = 37 * result + ( pageSize != null ? pageSize.hashCode() : 0 );
603         result = 37 * result + ( generator != null ? generator.hashCode() : 0 );
604         result = 37 * result + ( description != null ? description.hashCode() : 0 );
605         result = 37 * result + ( initialCreator != null ? initialCreator.hashCode() : 0 );
606         result = 37 * result + ( creator != null ? creator.hashCode() : 0 );
607         result = 37 * result + ( printedBy != null ? printedBy.hashCode() : 0 );
608         result = 37 * result + ( creationDate != null ? creationDate.hashCode() : 0 );
609         result = 37 * result + ( creationdate != null ? creationdate.hashCode() : 0 );
610         result = 37 * result + ( date != null ? date.hashCode() : 0 );
611         result = 37 * result + ( modifydate != null ? modifydate.hashCode() : 0 );
612         result = 37 * result + ( printDate != null ? printDate.hashCode() : 0 );
613         result = 37 * result + ( printdate != null ? printdate.hashCode() : 0 );
614         result = 37 * result + ( template != null ? template.hashCode() : 0 );
615         result = 37 * result + ( hyperlinkBehaviour != null ? hyperlinkBehaviour.hashCode() : 0 );
616         result = 37 * result + ( language != null ? language.hashCode() : 0 );
617         result = 37 * result + (int) ( editingCycles ^ ( editingCycles >>> 32 ) );
618         result = 37 * result + (int) ( editingDuration ^ ( editingDuration >>> 32 ) );
619         result = 37 * result + ( documentStatistic != null ? documentStatistic.hashCode() : 0 );
620         result = 37 * result + ( confidential ? 0 : 1 );
621         result = 37 * result + ( draft ? 0 : 1 );
622 
623         return result;
624     } //-- int hashCode()
625 
626     /**
627      * Get whether the content of the document is in some sense
628      * confidential.
629      * 
630      * @return boolean
631      */
632     public boolean isConfidential()
633     {
634         return this.confidential;
635     } //-- boolean isConfidential()
636 
637     /**
638      * Get whether the content of the document is in some sense
639      * preliminary.
640      * 
641      * @return boolean
642      */
643     public boolean isDraft()
644     {
645         return this.draft;
646     } //-- boolean isDraft()
647 
648     /**
649      * Method removeAuthor.
650      * 
651      * @param documentAuthor
652      */
653     public void removeAuthor( DocumentAuthor documentAuthor )
654     {
655         getAuthors().remove( documentAuthor );
656     } //-- void removeAuthor( DocumentAuthor )
657 
658     /**
659      * Method removeKeyWord.
660      * 
661      * @param string
662      */
663     public void removeKeyWord( String string )
664     {
665         getKeyWords().remove( string );
666     } //-- void removeKeyWord( String )
667 
668     /**
669      * Set the unique author of the document, usually as a String
670      * of "firstName lastName". For
671      *             more authors, you could use the &lt;authors/&gt;
672      * tag.
673      * 
674      * @param author
675      */
676     public void setAuthor( String author )
677     {
678         this.author = author;
679     } //-- void setAuthor( String )
680 
681     /**
682      * Set the authors of the document. The names of the entities
683      * that
684      *             are primarily responsible for the content of the
685      * document.
686      * 
687      * @param authors
688      */
689     public void setAuthors( java.util.List<DocumentAuthor> authors )
690     {
691         this.authors = authors;
692     } //-- void setAuthors( java.util.List )
693 
694     /**
695      * Set whether the content of the document is in some sense
696      * confidential.
697      * 
698      * @param confidential
699      */
700     public void setConfidential( boolean confidential )
701     {
702         this.confidential = confidential;
703     } //-- void setConfidential( boolean )
704 
705     /**
706      * Set the date and time when the document was created
707      * initially.
708      *             Use the ISO 8601 format
709      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
710      * 
711      * @param creationDate
712      */
713     public void setCreationDate( java.util.Date creationDate )
714     {
715         this.creationDate = creationDate;
716     } //-- void setCreationDate( java.util.Date )
717 
718     /**
719      * Set the date as String (recommended format is ISO 8601) when
720      * the document was created initially.
721      *             Only used if <code>creationDate</code> is not
722      * set.
723      *             @since 1.1.1.
724      * 
725      * @param creationdate
726      */
727     public void setCreationdate( String creationdate )
728     {
729         this.creationdate = creationdate;
730     } //-- void setCreationdate( String )
731 
732     /**
733      * Set the name of the person who last modified the document.
734      * 
735      * @param creator
736      */
737     public void setCreator( String creator )
738     {
739         this.creator = creator;
740     } //-- void setCreator( String )
741 
742     /**
743      * Set the date and time when the document was last modified.
744      *             Use the ISO 8601 format
745      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
746      * 
747      * @param date
748      */
749     public void setDate( java.util.Date date )
750     {
751         this.date = date;
752     } //-- void setDate( java.util.Date )
753 
754     /**
755      * Set a brief description of the document.
756      * 
757      * @param description
758      */
759     public void setDescription( String description )
760     {
761         this.description = description;
762     } //-- void setDescription( String )
763 
764     /**
765      * Set the statistics of the document, for example, the page
766      * count,
767      *             word count, etc.
768      * 
769      * @param documentStatistic
770      */
771     public void setDocumentStatistic( DocumentStatistic documentStatistic )
772     {
773         this.documentStatistic = documentStatistic;
774     } //-- void setDocumentStatistic( DocumentStatistic )
775 
776     /**
777      * Set whether the content of the document is in some sense
778      * preliminary.
779      * 
780      * @param draft
781      */
782     public void setDraft( boolean draft )
783     {
784         this.draft = draft;
785     } //-- void setDraft( boolean )
786 
787     /**
788      * Set the number of editing cycles the document has been
789      * through.
790      * 
791      * @param editingCycles
792      */
793     public void setEditingCycles( long editingCycles )
794     {
795         this.editingCycles = editingCycles;
796     } //-- void setEditingCycles( long )
797 
798     /**
799      * Set the total time spent editing the document.
800      * 
801      * @param editingDuration
802      */
803     public void setEditingDuration( long editingDuration )
804     {
805         this.editingDuration = editingDuration;
806     } //-- void setEditingDuration( long )
807 
808     /**
809      * Set a string that identifies the application or tool that
810      * was
811      *              used to create or last modify the document.
812      * 
813      * @param generator
814      */
815     public void setGenerator( String generator )
816     {
817         this.generator = generator;
818     } //-- void setGenerator( String )
819 
820     /**
821      * Set the hyperlink-behaviour element specifies the default
822      * behavior
823      *             for hyperlinks in the document.
824      * 
825      * @param hyperlinkBehaviour
826      */
827     public void setHyperlinkBehaviour( DocumentHyperlinkBehaviour hyperlinkBehaviour )
828     {
829         this.hyperlinkBehaviour = hyperlinkBehaviour;
830     } //-- void setHyperlinkBehaviour( DocumentHyperlinkBehaviour )
831 
832     /**
833      * Set the name of the person who created the document
834      * initially.
835      * 
836      * @param initialCreator
837      */
838     public void setInitialCreator( String initialCreator )
839     {
840         this.initialCreator = initialCreator;
841     } //-- void setInitialCreator( String )
842 
843     /**
844      * Set a keyword pertaining to the document. The metadata can
845      * contain any
846      *             number of keyword elements, each element
847      * specifying one keyword.
848      * 
849      * @param keyWords
850      */
851     public void setKeyWords( java.util.List<String> keyWords )
852     {
853         this.keyWords = keyWords;
854     } //-- void setKeyWords( java.util.List )
855 
856     /**
857      * Set the keywords for the document, usually as a String of
858      * comma separated keywords.
859      *             @deprecated use the &lt;keyWords/&gt; tag
860      * instead of.
861      * 
862      * @param keywords
863      */
864     public void setKeywords( String keywords )
865     {
866         this.keywords = keywords;
867     } //-- void setKeywords( String )
868 
869     /**
870      * Set the default language of the document. The language is
871      * represented by
872      *             a two or three letter Language Code taken from
873      * the ISO 639 standard,
874      *             optionally followed by a hyphen (-) and a
875      * two-letter Country Code
876      *             taken from the ISO 3166 standard.
877      * 
878      * @param language
879      */
880     public void setLanguage( String language )
881     {
882         this.language = language;
883     } //-- void setLanguage( String )
884 
885     /**
886      * Set the date as String (recommended format is ISO 8601) when
887      * the document was last modified.
888      *             Only used if <code>date</code> is not set.
889      *             @since 1.1.1.
890      * 
891      * @param modifydate
892      */
893     public void setModifydate( String modifydate )
894     {
895         this.modifydate = modifydate;
896     } //-- void setModifydate( String )
897 
898     /**
899      * Set the pagesize of the document.
900      *             At least "US", "USLetter" and "A4" should be
901      * supported.
902      * 
903      * @param pageSize
904      */
905     public void setPageSize( String pageSize )
906     {
907         this.pageSize = pageSize;
908     } //-- void setPageSize( String )
909 
910     /**
911      * Set the date and time when the document was last printed.
912      *             Use the ISO 8601 format
913      * "yyyy-MM-dd'T'HH:mm:ss.SSS" in xml.
914      * 
915      * @param printDate
916      */
917     public void setPrintDate( java.util.Date printDate )
918     {
919         this.printDate = printDate;
920     } //-- void setPrintDate( java.util.Date )
921 
922     /**
923      * Set the date as String (recommended format is ISO 8601) when
924      * the document was last printed.
925      *             Only used if <code>printDate</code> is not set.
926      *             @since 1.1.1.
927      * 
928      * @param printdate
929      */
930     public void setPrintdate( String printdate )
931     {
932         this.printdate = printdate;
933     } //-- void setPrintdate( String )
934 
935     /**
936      * Set the name of the person who last printed the document.
937      * 
938      * @param printedBy
939      */
940     public void setPrintedBy( String printedBy )
941     {
942         this.printedBy = printedBy;
943     } //-- void setPrintedBy( String )
944 
945     /**
946      * Set the subject of the document.
947      * 
948      * @param subject
949      */
950     public void setSubject( String subject )
951     {
952         this.subject = subject;
953     } //-- void setSubject( String )
954 
955     /**
956      * Set a template that was used to create the document.
957      * 
958      * @param template
959      */
960     public void setTemplate( DocumentTemplate template )
961     {
962         this.template = template;
963     } //-- void setTemplate( DocumentTemplate )
964 
965     /**
966      * Set the title of the document.
967      * 
968      * @param title
969      */
970     public void setTitle( String title )
971     {
972         this.title = title;
973     } //-- void setTitle( String )
974 
975     /**
976      * Method toString.
977      * 
978      * @return String
979      */
980     public java.lang.String toString()
981     {
982         StringBuilder buf = new StringBuilder( 128 );
983 
984         buf.append( "title = '" );
985         buf.append( getTitle() );
986         buf.append( "'" );
987         buf.append( "\n" ); 
988         buf.append( "author = '" );
989         buf.append( getAuthor() );
990         buf.append( "'" );
991         buf.append( "\n" ); 
992         buf.append( "authors = '" );
993         buf.append( getAuthors() );
994         buf.append( "'" );
995         buf.append( "\n" ); 
996         buf.append( "subject = '" );
997         buf.append( getSubject() );
998         buf.append( "'" );
999         buf.append( "\n" ); 
1000         buf.append( "keywords = '" );
1001         buf.append( getKeywords() );
1002         buf.append( "'" );
1003         buf.append( "\n" ); 
1004         buf.append( "keyWords = '" );
1005         buf.append( getKeyWords() );
1006         buf.append( "'" );
1007         buf.append( "\n" ); 
1008         buf.append( "pageSize = '" );
1009         buf.append( getPageSize() );
1010         buf.append( "'" );
1011         buf.append( "\n" ); 
1012         buf.append( "generator = '" );
1013         buf.append( getGenerator() );
1014         buf.append( "'" );
1015         buf.append( "\n" ); 
1016         buf.append( "description = '" );
1017         buf.append( getDescription() );
1018         buf.append( "'" );
1019         buf.append( "\n" ); 
1020         buf.append( "initialCreator = '" );
1021         buf.append( getInitialCreator() );
1022         buf.append( "'" );
1023         buf.append( "\n" ); 
1024         buf.append( "creator = '" );
1025         buf.append( getCreator() );
1026         buf.append( "'" );
1027         buf.append( "\n" ); 
1028         buf.append( "printedBy = '" );
1029         buf.append( getPrintedBy() );
1030         buf.append( "'" );
1031         buf.append( "\n" ); 
1032         buf.append( "creationDate = '" );
1033         buf.append( getCreationDate() );
1034         buf.append( "'" );
1035         buf.append( "\n" ); 
1036         buf.append( "creationdate = '" );
1037         buf.append( getCreationdate() );
1038         buf.append( "'" );
1039         buf.append( "\n" ); 
1040         buf.append( "date = '" );
1041         buf.append( getDate() );
1042         buf.append( "'" );
1043         buf.append( "\n" ); 
1044         buf.append( "modifydate = '" );
1045         buf.append( getModifydate() );
1046         buf.append( "'" );
1047         buf.append( "\n" ); 
1048         buf.append( "printDate = '" );
1049         buf.append( getPrintDate() );
1050         buf.append( "'" );
1051         buf.append( "\n" ); 
1052         buf.append( "printdate = '" );
1053         buf.append( getPrintdate() );
1054         buf.append( "'" );
1055         buf.append( "\n" ); 
1056         buf.append( "template = '" );
1057         buf.append( getTemplate() );
1058         buf.append( "'" );
1059         buf.append( "\n" ); 
1060         buf.append( "hyperlinkBehaviour = '" );
1061         buf.append( getHyperlinkBehaviour() );
1062         buf.append( "'" );
1063         buf.append( "\n" ); 
1064         buf.append( "language = '" );
1065         buf.append( getLanguage() );
1066         buf.append( "'" );
1067         buf.append( "\n" ); 
1068         buf.append( "editingCycles = '" );
1069         buf.append( getEditingCycles() );
1070         buf.append( "'" );
1071         buf.append( "\n" ); 
1072         buf.append( "editingDuration = '" );
1073         buf.append( getEditingDuration() );
1074         buf.append( "'" );
1075         buf.append( "\n" ); 
1076         buf.append( "documentStatistic = '" );
1077         buf.append( getDocumentStatistic() );
1078         buf.append( "'" );
1079         buf.append( "\n" ); 
1080         buf.append( "confidential = '" );
1081         buf.append( isConfidential() );
1082         buf.append( "'" );
1083         buf.append( "\n" ); 
1084         buf.append( "draft = '" );
1085         buf.append( isDraft() );
1086         buf.append( "'" );
1087 
1088         return buf.toString();
1089     } //-- java.lang.String toString()
1090 
1091     
1092             
1093     /**
1094      * @return a comma separated String of all defined keyWords.
1095      * @see #getKeywords()
1096      * @see #getKeyWords()
1097      * @since 1.1.1
1098      */
1099     public String getAllKeyWords()
1100     {
1101         StringBuffer sb = new StringBuffer();
1102         boolean hasKeywords = false;
1103         if ( getKeywords() != null && getKeywords().trim().length() > 0 )
1104         {
1105             java.util.StringTokenizer st = new java.util.StringTokenizer( getKeywords().trim(), "," );
1106             while ( st.hasMoreTokens() )
1107             {
1108                 String s = st.nextToken();
1109 
1110                 sb.append( s.trim() );
1111 
1112                 if ( st.hasMoreTokens() )
1113                 {
1114                     sb.append( ", " );
1115                 }
1116 
1117                 hasKeywords = true;
1118             }
1119         }
1120         if ( getKeyWords() != null )
1121         {
1122             for ( java.util.Iterator it = getKeyWords().iterator(); it.hasNext(); )
1123             {
1124                 String keyword = (String) it.next();
1125 
1126                 if ( hasKeywords )
1127                 {
1128                     sb.append( ", " );
1129                     hasKeywords = false;
1130                 }
1131 
1132                 if ( keyword.trim().length() > 0 )
1133                 {
1134                     sb.append( keyword.trim() );
1135 
1136                     if ( it.hasNext() )
1137                     {
1138                         sb.append( ", " );
1139                     }
1140                 }
1141             }
1142         }
1143 
1144         String ret = sb.toString().trim();
1145         if ( ret.endsWith( "," ) )
1146         {
1147             return ret.substring( 0, ret.length() - 1 );
1148         }
1149 
1150         return ret;
1151     }
1152 
1153     /**
1154      * @return {@link #getAuthor()} if the unique author name is defined. Otherwise, return all authors full names
1155      * comma separated.
1156      * @see #getAuthor()
1157      * @see #getAuthors()
1158      * @since 1.1.1
1159      */
1160     public String getAllAuthorNames()
1161     {
1162         StringBuffer sb = new StringBuffer();
1163         if ( getAuthor() != null && getAuthor().trim().length() > 0 )
1164         {
1165             return getAuthor().trim();
1166         }
1167 
1168         if ( getAuthors() != null )
1169         {
1170             for ( java.util.Iterator it = getAuthors().iterator(); it.hasNext(); )
1171             {
1172                 DocumentAuthor author = (DocumentAuthor) it.next();
1173 
1174                 sb.append( author.getFullName().trim() );
1175 
1176                 if ( it.hasNext() )
1177                 {
1178                     sb.append( ", " );
1179                 }
1180             }
1181         }
1182 
1183         return sb.toString();
1184     }
1185 
1186     /** ISO 8601 date format, i.e. <code>yyyy-MM-dd</code> **/
1187     private static final java.text.DateFormat ISO_8601_FORMAT = new java.text.SimpleDateFormat( "yyyy-MM-dd", java.util.Locale.ENGLISH );
1188 
1189     /**
1190      * Get the date and time when the document was created initially.
1191      *
1192      * @return the <code>getCreationDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
1193      * the <code>creationdate</code>.
1194      * @since 1.1.1
1195      * @see #getCreationDate()
1196      */
1197     public String getCreationdate()
1198     {
1199         if ( getCreationDate() != null )
1200         {
1201             return ISO_8601_FORMAT.format( getCreationDate() );
1202         }
1203 
1204         return this.creationdate;
1205     }
1206 
1207     /**
1208      * Get the date and time when the document was last modified.
1209      *
1210      * @return the <code>getDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
1211      * the <code>modifydate</code>.
1212      * @since 1.1.1
1213      * @see #getDate()
1214      */
1215     public String getModifydate()
1216     {
1217         if ( getDate() != null )
1218         {
1219             return ISO_8601_FORMAT.format( getDate() );
1220         }
1221 
1222         return this.modifydate;
1223     }
1224 
1225     /**
1226      * Get the date and time when the document was last printed.
1227      *
1228      * @return the <code>getPrintDate()</code> if setted, formatted using ISO-8601 English format, otherwise return
1229      * the <code>printdate</code>.
1230      * @since 1.1.1
1231      * @see #getPrintDate()
1232      */
1233     public String getPrintdate()
1234     {
1235         if ( getPrintDate() != null )
1236         {
1237             return ISO_8601_FORMAT.format( getPrintDate() );
1238         }
1239 
1240         return this.printdate;
1241     }
1242             
1243           
1244 }