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 |
118
| public HeaderVo() {
|
63 |
| |
64 |
| } |
65 |
| |
66 |
| |
67 |
| |
68 |
| |
69 |
| |
70 |
80
| public final void setSpecification(final SpecificationVo specification) {
|
71 |
80
| this.specification = specification;
|
72 |
| } |
73 |
| |
74 |
749
| public final Specification getSpecification() {
|
75 |
749
| return specification;
|
76 |
| } |
77 |
| |
78 |
| |
79 |
| |
80 |
| |
81 |
| |
82 |
| |
83 |
80
| public final void setTitle(final LatexListVo title) {
|
84 |
80
| this.title = title;
|
85 |
| } |
86 |
| |
87 |
719
| public final LatexList getTitle() {
|
88 |
719
| return title;
|
89 |
| } |
90 |
| |
91 |
| |
92 |
| |
93 |
| |
94 |
| |
95 |
| |
96 |
80
| public final void setSummary(final LatexListVo summary) {
|
97 |
80
| this.summary = summary;
|
98 |
| } |
99 |
| |
100 |
677
| public final LatexList getSummary() {
|
101 |
677
| return summary;
|
102 |
| } |
103 |
| |
104 |
| |
105 |
| |
106 |
| |
107 |
| |
108 |
| |
109 |
80
| public final void setAuthorList(final AuthorListVo authors) {
|
110 |
80
| this.authorList = authors;
|
111 |
| } |
112 |
| |
113 |
692
| public final AuthorList getAuthorList() {
|
114 |
692
| return authorList;
|
115 |
| } |
116 |
| |
117 |
| |
118 |
| |
119 |
| |
120 |
| |
121 |
| |
122 |
64
| public final void setImportList(final ImportListVo imports) {
|
123 |
64
| this.importList = imports;
|
124 |
| } |
125 |
| |
126 |
678
| public final ImportList getImportList() {
|
127 |
678
| return importList;
|
128 |
| } |
129 |
| |
130 |
| |
131 |
| |
132 |
| |
133 |
| |
134 |
| |
135 |
58
| public final void setUsedByList(final UsedByListVo usedby) {
|
136 |
58
| this.usedByList = usedby;
|
137 |
| } |
138 |
| |
139 |
613
| public final UsedByList getUsedByList() {
|
140 |
613
| return usedByList;
|
141 |
| } |
142 |
| |
143 |
| |
144 |
| |
145 |
| |
146 |
| |
147 |
| |
148 |
80
| public final void setEmail(final String email) {
|
149 |
80
| this.email = email;
|
150 |
| } |
151 |
| |
152 |
706
| public final String getEmail() {
|
153 |
706
| return email;
|
154 |
| } |
155 |
| |
156 |
169
| public boolean equals(final Object obj) {
|
157 |
169
| if (!(obj instanceof HeaderVo)) {
|
158 |
15
| return false;
|
159 |
| } |
160 |
154
| final HeaderVo other = (HeaderVo) obj;
|
161 |
154
| 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 |
143
| public int hashCode() {
|
171 |
143
| return (getSpecification() != null ? getSpecification().hashCode() : 0)
|
172 |
143
| ^ (getTitle() != null ? 1 ^ getTitle().hashCode() : 0)
|
173 |
143
| ^ (getSummary() != null ? 2 ^ getSummary().hashCode() : 0)
|
174 |
143
| ^ (getAuthorList() != null ? 3 ^ getAuthorList().hashCode() : 0)
|
175 |
143
| ^ (getImportList() != null ? 4 ^ getImportList().hashCode() : 0)
|
176 |
143
| ^ (getUsedByList() != null ? 5 ^ getUsedByList().hashCode() : 0)
|
177 |
143
| ^ (getEmail() != null ? 6 ^ getEmail().hashCode() : 0);
|
178 |
| } |
179 |
| |
180 |
87
| public String toString() {
|
181 |
87
| final StringBuffer buffer = new StringBuffer("Header\n");
|
182 |
87
| buffer.append(getSpecification() + "\n");
|
183 |
87
| buffer.append("Title: ");
|
184 |
87
| buffer.append(getTitle() + "\n\n");
|
185 |
87
| buffer.append("Abstract: ");
|
186 |
87
| buffer.append(getSummary() + "\n\n");
|
187 |
87
| buffer.append(getAuthorList() + "\n");
|
188 |
87
| buffer.append(getImportList() + "\n");
|
189 |
87
| buffer.append(getUsedByList() + "\n");
|
190 |
87
| if (getEmail() != null) {
|
191 |
61
| buffer.append("\nModule email: <" + getEmail() + ">");
|
192 |
| } |
193 |
87
| return buffer.toString();
|
194 |
| } |
195 |
| |
196 |
| } |