View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 2.1.2,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.doxia.site.decoration;
7   
8   /**
9    * Modify display properties for date published.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class PublishDate
15      implements java.io.Serializable, java.lang.Cloneable
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * Where to place the date published (left, right,
24       * navigation-top, navigation-bottom, bottom).
25       */
26      private String position = "left";
27  
28      /**
29       * Date format to use.
30       */
31      private String format = "yyyy-MM-dd";
32  
33      /**
34       * 
35       *             
36       *               The timezone to use. Use <code>system</code>
37       * for the default locale for this instance
38       *               of the Java Virtual Machine. Refer to
39       * <code>java.util.TimeZone</code> for details.
40       *             
41       *           
42       */
43      private String timezone = "Etc/UTC";
44  
45  
46        //-----------/
47       //- Methods -/
48      //-----------/
49  
50      /**
51       * Method clone.
52       * 
53       * @return PublishDate
54       */
55      public PublishDate clone()
56      {
57          try
58          {
59              PublishDate copy = (PublishDate) super.clone();
60  
61              return copy;
62          }
63          catch ( java.lang.Exception ex )
64          {
65              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
66                  + " does not support clone()" ).initCause( ex );
67          }
68      } //-- PublishDate clone()
69  
70      /**
71       * Method equals.
72       * 
73       * @param other a other object.
74       * @return boolean
75       */
76      public boolean equals( Object other )
77      {
78          if ( this == other )
79          {
80              return true;
81          }
82  
83          if ( !( other instanceof PublishDate ) )
84          {
85              return false;
86          }
87  
88          PublishDate that = (PublishDate) other;
89          boolean result = true;
90  
91          result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
92          result = result && ( getFormat() == null ? that.getFormat() == null : getFormat().equals( that.getFormat() ) );
93          result = result && ( getTimezone() == null ? that.getTimezone() == null : getTimezone().equals( that.getTimezone() ) );
94  
95          return result;
96      } //-- boolean equals( Object )
97  
98      /**
99       * Get date format to use.
100      * 
101      * @return String
102      */
103     public String getFormat()
104     {
105         return this.format;
106     } //-- String getFormat()
107 
108     /**
109      * Get where to place the date published (left, right,
110      * navigation-top, navigation-bottom, bottom).
111      * 
112      * @return String
113      */
114     public String getPosition()
115     {
116         return this.position;
117     } //-- String getPosition()
118 
119     /**
120      * Get the timezone to use. Use <code>system</code> for the
121      * default locale for this instance
122      *               of the Java Virtual Machine. Refer to
123      * <code>java.util.TimeZone</code> for details.
124      * 
125      * @return String
126      */
127     public String getTimezone()
128     {
129         return this.timezone;
130     } //-- String getTimezone()
131 
132     /**
133      * Method hashCode.
134      * 
135      * @return int
136      */
137     public int hashCode()
138     {
139         int result = 17;
140 
141         result = 37 * result + ( position != null ? position.hashCode() : 0 );
142         result = 37 * result + ( format != null ? format.hashCode() : 0 );
143         result = 37 * result + ( timezone != null ? timezone.hashCode() : 0 );
144 
145         return result;
146     } //-- int hashCode()
147 
148     /**
149      * Set date format to use.
150      * 
151      * @param format a format object.
152      */
153     public void setFormat( String format )
154     {
155         this.format = format;
156     } //-- void setFormat( String )
157 
158     /**
159      * Set where to place the date published (left, right,
160      * navigation-top, navigation-bottom, bottom).
161      * 
162      * @param position a position object.
163      */
164     public void setPosition( String position )
165     {
166         this.position = position;
167     } //-- void setPosition( String )
168 
169     /**
170      * Set the timezone to use. Use <code>system</code> for the
171      * default locale for this instance
172      *               of the Java Virtual Machine. Refer to
173      * <code>java.util.TimeZone</code> for details.
174      * 
175      * @param timezone a timezone object.
176      */
177     public void setTimezone( String timezone )
178     {
179         this.timezone = timezone;
180     } //-- void setTimezone( String )
181 
182     /**
183      * Method toString.
184      * 
185      * @return String
186      */
187     public java.lang.String toString()
188     {
189         StringBuilder buf = new StringBuilder( 128 );
190 
191         buf.append( "position = '" );
192         buf.append( getPosition() );
193         buf.append( "'" );
194         buf.append( "\n" ); 
195         buf.append( "format = '" );
196         buf.append( getFormat() );
197         buf.append( "'" );
198         buf.append( "\n" ); 
199         buf.append( "timezone = '" );
200         buf.append( getTimezone() );
201         buf.append( "'" );
202 
203         return buf.toString();
204     } //-- java.lang.String toString()
205 
206 }