|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| package org.qedeq.kernel.dto.module; |
|
19 |
| |
|
20 |
| import org.qedeq.kernel.base.module.AuthorList; |
|
21 |
| import org.qedeq.kernel.base.module.Header; |
|
22 |
| import org.qedeq.kernel.base.module.ImportList; |
|
23 |
| import org.qedeq.kernel.base.module.LatexList; |
|
24 |
| import org.qedeq.kernel.base.module.Specification; |
|
25 |
| import org.qedeq.kernel.base.module.UsedByList; |
|
26 |
| import org.qedeq.kernel.utility.EqualsUtility; |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
| |
|
33 |
| |
|
34 |
| |
|
35 |
| |
|
36 |
| public final class HeaderVo implements Header { |
|
37 |
| |
|
38 |
| |
|
39 |
| private Specification specification; |
|
40 |
| |
|
41 |
| |
|
42 |
| private LatexList title; |
|
43 |
| |
|
44 |
| |
|
45 |
| private LatexList summary; |
|
46 |
| |
|
47 |
| |
|
48 |
| private AuthorList authorList; |
|
49 |
| |
|
50 |
| |
|
51 |
| private ImportList importList; |
|
52 |
| |
|
53 |
| |
|
54 |
| private UsedByList usedByList; |
|
55 |
| |
|
56 |
| |
|
57 |
| private String email; |
|
58 |
| |
|
59 |
| |
|
60 |
| |
|
61 |
| |
|
62 |
92
| public HeaderVo() {
|
|
63 |
| |
|
64 |
| } |
|
65 |
| |
|
66 |
| |
|
67 |
| |
|
68 |
| |
|
69 |
| |
|
70 |
54
| public final void setSpecification(final Specification specification) {
|
|
71 |
54
| this.specification = specification;
|
|
72 |
| } |
|
73 |
| |
|
74 |
569
| public final Specification getSpecification() {
|
|
75 |
569
| return specification;
|
|
76 |
| } |
|
77 |
| |
|
78 |
| |
|
79 |
| |
|
80 |
| |
|
81 |
| |
|
82 |
| |
|
83 |
54
| public final void setTitle(final LatexList title) {
|
|
84 |
54
| this.title = title;
|
|
85 |
| } |
|
86 |
| |
|
87 |
559
| public final LatexList getTitle() {
|
|
88 |
559
| return title;
|
|
89 |
| } |
|
90 |
| |
|
91 |
| |
|
92 |
| |
|
93 |
| |
|
94 |
| |
|
95 |
| |
|
96 |
54
| public final void setSummary(final LatexList summary) {
|
|
97 |
54
| this.summary = summary;
|
|
98 |
| } |
|
99 |
| |
|
100 |
527
| public final LatexList getSummary() {
|
|
101 |
527
| return summary;
|
|
102 |
| } |
|
103 |
| |
|
104 |
| |
|
105 |
| |
|
106 |
| |
|
107 |
| |
|
108 |
| |
|
109 |
54
| public final void setAuthorList(final AuthorList authors) {
|
|
110 |
54
| this.authorList = authors;
|
|
111 |
| } |
|
112 |
| |
|
113 |
527
| public final AuthorList getAuthorList() {
|
|
114 |
527
| return authorList;
|
|
115 |
| } |
|
116 |
| |
|
117 |
| |
|
118 |
| |
|
119 |
| |
|
120 |
| |
|
121 |
| |
|
122 |
48
| public final void setImportList(final ImportList imports) {
|
|
123 |
48
| this.importList = imports;
|
|
124 |
| } |
|
125 |
| |
|
126 |
508
| public final ImportList getImportList() {
|
|
127 |
508
| return importList;
|
|
128 |
| } |
|
129 |
| |
|
130 |
| |
|
131 |
| |
|
132 |
| |
|
133 |
| |
|
134 |
| |
|
135 |
45
| public final void setUsedByList(final UsedByList usedby) {
|
|
136 |
45
| this.usedByList = usedby;
|
|
137 |
| } |
|
138 |
| |
|
139 |
470
| public final UsedByList getUsedByList() {
|
|
140 |
470
| return usedByList;
|
|
141 |
| } |
|
142 |
| |
|
143 |
| |
|
144 |
| |
|
145 |
| |
|
146 |
| |
|
147 |
| |
|
148 |
30
| public final void setEmail(final String email) {
|
|
149 |
30
| this.email = email;
|
|
150 |
| } |
|
151 |
| |
|
152 |
545
| public final String getEmail() {
|
|
153 |
545
| return email;
|
|
154 |
| } |
|
155 |
| |
|
156 |
131
| public boolean equals(final Object obj) {
|
|
157 |
131
| if (!(obj instanceof HeaderVo)) {
|
|
158 |
12
| return false;
|
|
159 |
| } |
|
160 |
119
| final HeaderVo other = (HeaderVo) obj;
|
|
161 |
119
| return EqualsUtility.equals(getSpecification(), other.getSpecification())
|
|
162 |
| && EqualsUtility.equals(getTitle(), other.getTitle()) |
|
163 |
| && EqualsUtility.equals(getSummary(), other.getSummary()) |
|
164 |
| && EqualsUtility.equals(getAuthorList(), other.getAuthorList()) |
|
165 |
| && EqualsUtility.equals(getImportList(), other.getImportList()) |
|
166 |
| && EqualsUtility.equals(getUsedByList(), other.getUsedByList()) |
|
167 |
| && EqualsUtility.equals(getEmail(), other.getEmail()); |
|
168 |
| } |
|
169 |
| |
|
170 |
126
| public int hashCode() {
|
|
171 |
126
| return (getSpecification() != null ? getSpecification().hashCode() : 0)
|
|
172 |
126
| ^ (getTitle() != null ? 1 ^ getTitle().hashCode() : 0)
|
|
173 |
126
| ^ (getSummary() != null ? 2 ^ getSummary().hashCode() : 0)
|
|
174 |
126
| ^ (getAuthorList() != null ? 3 ^ getAuthorList().hashCode() : 0)
|
|
175 |
126
| ^ (getImportList() != null ? 4 ^ getImportList().hashCode() : 0)
|
|
176 |
126
| ^ (getUsedByList() != null ? 5 ^ getUsedByList().hashCode() : 0)
|
|
177 |
126
| ^ (getEmail() != null ? 6 ^ getEmail().hashCode() : 0);
|
|
178 |
| } |
|
179 |
| |
|
180 |
70
| public String toString() {
|
|
181 |
70
| final StringBuffer buffer = new StringBuffer("Header\n");
|
|
182 |
70
| buffer.append(getSpecification() + "\n");
|
|
183 |
70
| buffer.append("Title: ");
|
|
184 |
70
| buffer.append(getTitle() + "\n\n");
|
|
185 |
70
| buffer.append("Abstract: ");
|
|
186 |
70
| buffer.append(getSummary() + "\n\n");
|
|
187 |
70
| buffer.append(getAuthorList() + "\n");
|
|
188 |
70
| buffer.append(getImportList() + "\n");
|
|
189 |
70
| buffer.append(getUsedByList() + "\n");
|
|
190 |
70
| if (getEmail() != null) {
|
|
191 |
44
| buffer.append("\nModule email: <" + getEmail() + ">");
|
|
192 |
| } |
|
193 |
70
| return buffer.toString();
|
|
194 |
| } |
|
195 |
| |
|
196 |
| } |