Coverage Report - org.apache.maven.doxia.docrenderer.document.DocumentMeta
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentMeta
25%
14/55
0%
0/54
1,267
 
 1  
 /*
 2  
  * $Id$
 3  
  */
 4  
 
 5  
 package org.apache.maven.doxia.docrenderer.document;
 6  
 
 7  
   //---------------------------------/
 8  
  //- Imported classes and packages -/
 9  
 //---------------------------------/
 10  
 
 11  
 import java.util.Date;
 12  
 
 13  
 /**
 14  
  * Element that contains some meta information about the document.
 15  
  * 
 16  
  * @version $Revision$ $Date$
 17  
  */
 18  1
 public class DocumentMeta implements java.io.Serializable {
 19  
 
 20  
 
 21  
       //--------------------------/
 22  
      //- Class/Member Variables -/
 23  
     //--------------------------/
 24  
 
 25  
     /**
 26  
      * Field title
 27  
      */
 28  
     private String title;
 29  
 
 30  
     /**
 31  
      * Field author
 32  
      */
 33  
     private String author;
 34  
 
 35  
     /**
 36  
      * Field subject
 37  
      */
 38  
     private String subject;
 39  
 
 40  
     /**
 41  
      * Field keywords
 42  
      */
 43  
     private String keywords;
 44  
 
 45  
     /**
 46  
      * Field pageSize
 47  
      */
 48  
     private String pageSize;
 49  
 
 50  
 
 51  
       //-----------/
 52  
      //- Methods -/
 53  
     //-----------/
 54  
 
 55  
     /**
 56  
      * Method equals
 57  
      * 
 58  
      * @param other
 59  
      */
 60  
     public boolean equals(Object other)
 61  
     {
 62  0
         if ( this == other)
 63  
         {
 64  0
             return true;
 65  
         }
 66  
         
 67  0
         if ( !(other instanceof DocumentMeta) )
 68  
         {
 69  0
             return false;
 70  
         }
 71  
         
 72  0
         DocumentMeta that = (DocumentMeta) other;
 73  0
         boolean result = true;
 74  0
         result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
 75  0
         result = result && ( getAuthor() == null ? that.getAuthor() == null : getAuthor().equals( that.getAuthor() ) );
 76  0
         result = result && ( getSubject() == null ? that.getSubject() == null : getSubject().equals( that.getSubject() ) );
 77  0
         result = result && ( getKeywords() == null ? that.getKeywords() == null : getKeywords().equals( that.getKeywords() ) );
 78  0
         result = result && ( getPageSize() == null ? that.getPageSize() == null : getPageSize().equals( that.getPageSize() ) );
 79  0
         return result;
 80  
     } //-- boolean equals(Object) 
 81  
 
 82  
     /**
 83  
      * Get The author of the document.
 84  
      */
 85  
     public String getAuthor()
 86  
     {
 87  2
         return this.author;
 88  
     } //-- String getAuthor() 
 89  
 
 90  
     /**
 91  
      * Get The keywords of the document
 92  
      */
 93  
     public String getKeywords()
 94  
     {
 95  2
         return this.keywords;
 96  
     } //-- String getKeywords() 
 97  
 
 98  
     /**
 99  
      * Get The pagesize of the document
 100  
      */
 101  
     public String getPageSize()
 102  
     {
 103  0
         return this.pageSize;
 104  
     } //-- String getPageSize() 
 105  
 
 106  
     /**
 107  
      * Get The subject of the document.
 108  
      */
 109  
     public String getSubject()
 110  
     {
 111  2
         return this.subject;
 112  
     } //-- String getSubject() 
 113  
 
 114  
     /**
 115  
      * Get Title of the document.
 116  
      */
 117  
     public String getTitle()
 118  
     {
 119  5
         return this.title;
 120  
     } //-- String getTitle() 
 121  
 
 122  
     /**
 123  
      * Method hashCode
 124  
      */
 125  
     public int hashCode()
 126  
     {
 127  0
         int result = 17;
 128  
         long tmp;
 129  0
         result = 37 * result + ( title != null ? title.hashCode() : 0 );
 130  0
         result = 37 * result + ( author != null ? author.hashCode() : 0 );
 131  0
         result = 37 * result + ( subject != null ? subject.hashCode() : 0 );
 132  0
         result = 37 * result + ( keywords != null ? keywords.hashCode() : 0 );
 133  0
         result = 37 * result + ( pageSize != null ? pageSize.hashCode() : 0 );
 134  0
         return result;
 135  
     } //-- int hashCode() 
 136  
 
 137  
     /**
 138  
      * Set The author of the document.
 139  
      * 
 140  
      * @param author
 141  
      */
 142  
     public void setAuthor(String author)
 143  
     {
 144  1
         this.author = author;
 145  1
     } //-- void setAuthor(String) 
 146  
 
 147  
     /**
 148  
      * Set The keywords of the document
 149  
      * 
 150  
      * @param keywords
 151  
      */
 152  
     public void setKeywords(String keywords)
 153  
     {
 154  1
         this.keywords = keywords;
 155  1
     } //-- void setKeywords(String) 
 156  
 
 157  
     /**
 158  
      * Set The pagesize of the document
 159  
      * 
 160  
      * @param pageSize
 161  
      */
 162  
     public void setPageSize(String pageSize)
 163  
     {
 164  0
         this.pageSize = pageSize;
 165  0
     } //-- void setPageSize(String) 
 166  
 
 167  
     /**
 168  
      * Set The subject of the document.
 169  
      * 
 170  
      * @param subject
 171  
      */
 172  
     public void setSubject(String subject)
 173  
     {
 174  1
         this.subject = subject;
 175  1
     } //-- void setSubject(String) 
 176  
 
 177  
     /**
 178  
      * Set Title of the document.
 179  
      * 
 180  
      * @param title
 181  
      */
 182  
     public void setTitle(String title)
 183  
     {
 184  1
         this.title = title;
 185  1
     } //-- void setTitle(String) 
 186  
 
 187  
     /**
 188  
      * Method toString
 189  
      */
 190  
     public java.lang.String toString()
 191  
     {
 192  0
         StringBuffer buf = new StringBuffer();
 193  0
         buf.append( "title = '" );
 194  0
         buf.append( getTitle() + "'" );
 195  0
         buf.append( "\n" ); 
 196  0
         buf.append( "author = '" );
 197  0
         buf.append( getAuthor() + "'" );
 198  0
         buf.append( "\n" ); 
 199  0
         buf.append( "subject = '" );
 200  0
         buf.append( getSubject() + "'" );
 201  0
         buf.append( "\n" ); 
 202  0
         buf.append( "keywords = '" );
 203  0
         buf.append( getKeywords() + "'" );
 204  0
         buf.append( "\n" ); 
 205  0
         buf.append( "pageSize = '" );
 206  0
         buf.append( getPageSize() + "'" );
 207  0
         return buf.toString();
 208  
     } //-- java.lang.String toString() 
 209  
 
 210  
 
 211  1
     private String modelEncoding = "UTF-8";
 212  
 
 213  
     public void setModelEncoding( String modelEncoding )
 214  
     {
 215  0
         this.modelEncoding = modelEncoding;
 216  0
     }
 217  
 
 218  
     public String getModelEncoding()
 219  
     {
 220  0
         return modelEncoding;
 221  
     }
 222  
 }