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 DocumentModel
17 implements java.io.Serializable
18 {
19
20
21
22
23
24
25
26
27
28
29
30 private String outputName;
31
32
33
34
35
36
37 private DocumentMeta meta;
38
39
40
41
42
43
44
45 private DocumentTOC toc;
46
47
48
49
50
51
52
53 private DocumentCover cover;
54
55
56
57
58 private String modelEncoding = "UTF-8";
59
60
61
62
63
64
65
66
67
68
69
70
71 public boolean equals( Object other )
72 {
73 if ( this == other )
74 {
75 return true;
76 }
77
78 if ( !( other instanceof DocumentModel ) )
79 {
80 return false;
81 }
82
83 DocumentModel that = (DocumentModel) other;
84 boolean result = true;
85
86 result = result && ( getOutputName() == null ? that.getOutputName() == null : getOutputName().equals( that.getOutputName() ) );
87 result = result && ( getMeta() == null ? that.getMeta() == null : getMeta().equals( that.getMeta() ) );
88 result = result && ( getToc() == null ? that.getToc() == null : getToc().equals( that.getToc() ) );
89 result = result && ( getCover() == null ? that.getCover() == null : getCover().equals( that.getCover() ) );
90
91 return result;
92 }
93
94
95
96
97
98
99
100 public DocumentCover getCover()
101 {
102 return this.cover;
103 }
104
105
106
107
108
109
110 public DocumentMeta getMeta()
111 {
112 return this.meta;
113 }
114
115
116
117
118
119
120 public String getModelEncoding()
121 {
122 return this.modelEncoding;
123 }
124
125
126
127
128
129
130 public String getOutputName()
131 {
132 return this.outputName;
133 }
134
135
136
137
138
139
140 public DocumentTOC getToc()
141 {
142 return this.toc;
143 }
144
145
146
147
148
149
150 public int hashCode()
151 {
152 int result = 17;
153
154 result = 37 * result + ( outputName != null ? outputName.hashCode() : 0 );
155 result = 37 * result + ( meta != null ? meta.hashCode() : 0 );
156 result = 37 * result + ( toc != null ? toc.hashCode() : 0 );
157 result = 37 * result + ( cover != null ? cover.hashCode() : 0 );
158
159 return result;
160 }
161
162
163
164
165
166
167
168 public void setCover( DocumentCover cover )
169 {
170 this.cover = cover;
171 }
172
173
174
175
176
177
178 public void setMeta( DocumentMeta meta )
179 {
180 this.meta = meta;
181 }
182
183
184
185
186
187
188 public void setModelEncoding( String modelEncoding )
189 {
190 this.modelEncoding = modelEncoding;
191 }
192
193
194
195
196
197
198 public void setOutputName( String outputName )
199 {
200 this.outputName = outputName;
201 }
202
203
204
205
206
207
208 public void setToc( DocumentTOC toc )
209 {
210 this.toc = toc;
211 }
212
213
214
215
216
217
218 public java.lang.String toString()
219 {
220 StringBuilder buf = new StringBuilder( 128 );
221
222 buf.append( "outputName = '" );
223 buf.append( getOutputName() );
224 buf.append( "'" );
225 buf.append( "\n" );
226 buf.append( "meta = '" );
227 buf.append( getMeta() );
228 buf.append( "'" );
229 buf.append( "\n" );
230 buf.append( "toc = '" );
231 buf.append( getToc() );
232 buf.append( "'" );
233 buf.append( "\n" );
234 buf.append( "cover = '" );
235 buf.append( getCover() );
236 buf.append( "'" );
237
238 return buf.toString();
239 }
240
241 }