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