1
2
3
4
5
6
7
8 package org.apache.maven.doxia.document;
9
10
11
12
13
14
15 @SuppressWarnings( "all" )
16 public class DocumentTemplate
17 implements java.io.Serializable
18 {
19
20
21
22
23
24
25
26
27
28
29 private String href;
30
31
32
33
34
35
36 private String title;
37
38
39
40
41
42
43
44
45
46
47 private java.util.Date date;
48
49
50
51
52
53
54
55
56
57 private String modifydate;
58
59
60
61
62
63
64
65
66
67
68
69
70 public boolean equals( Object other )
71 {
72 if ( this == other )
73 {
74 return true;
75 }
76
77 if ( !( other instanceof DocumentTemplate ) )
78 {
79 return false;
80 }
81
82 DocumentTemplate that = (DocumentTemplate) other;
83 boolean result = true;
84
85 result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) );
86 result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
87 result = result && ( getDate() == null ? that.getDate() == null : getDate().equals( that.getDate() ) );
88 result = result && ( getModifydate() == null ? that.getModifydate() == null : getModifydate().equals( that.getModifydate() ) );
89
90 return result;
91 }
92
93
94
95
96
97
98
99
100
101
102 public java.util.Date getDate()
103 {
104 return this.date;
105 }
106
107
108
109
110
111
112 public String getHref()
113 {
114 return this.href;
115 }
116
117
118
119
120
121
122 public String getTitle()
123 {
124 return this.title;
125 }
126
127
128
129
130
131
132 public int hashCode()
133 {
134 int result = 17;
135
136 result = 37 * result + ( href != null ? href.hashCode() : 0 );
137 result = 37 * result + ( title != null ? title.hashCode() : 0 );
138 result = 37 * result + ( date != null ? date.hashCode() : 0 );
139 result = 37 * result + ( modifydate != null ? modifydate.hashCode() : 0 );
140
141 return result;
142 }
143
144
145
146
147
148
149
150
151
152
153 public void setDate( java.util.Date date )
154 {
155 this.date = date;
156 }
157
158
159
160
161
162
163 public void setHref( String href )
164 {
165 this.href = href;
166 }
167
168
169
170
171
172
173
174
175
176 public void setModifydate( String modifydate )
177 {
178 this.modifydate = modifydate;
179 }
180
181
182
183
184
185
186 public void setTitle( String title )
187 {
188 this.title = title;
189 }
190
191
192
193
194
195
196 public java.lang.String toString()
197 {
198 StringBuilder buf = new StringBuilder( 128 );
199
200 buf.append( "href = '" );
201 buf.append( getHref() );
202 buf.append( "'" );
203 buf.append( "\n" );
204 buf.append( "title = '" );
205 buf.append( getTitle() );
206 buf.append( "'" );
207 buf.append( "\n" );
208 buf.append( "date = '" );
209 buf.append( getDate() );
210 buf.append( "'" );
211 buf.append( "\n" );
212 buf.append( "modifydate = '" );
213 buf.append( getModifydate() );
214 buf.append( "'" );
215
216 return buf.toString();
217 }
218
219
220
221
222 private static final java.text.DateFormat ISO_8601_FORMAT = new java.text.SimpleDateFormat( "yyyy-MM-dd", java.util.Locale.ENGLISH );
223
224
225
226
227
228
229
230
231
232 public String getModifydate()
233 {
234 if ( getDate() != null )
235 {
236 return ISO_8601_FORMAT.format( getDate() );
237 }
238
239 return this.modifydate;
240 }
241
242
243 }