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