|
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.LatexList; |
|
21 |
| import org.qedeq.kernel.base.module.Section; |
|
22 |
| import org.qedeq.kernel.base.module.SubsectionList; |
|
23 |
| import org.qedeq.kernel.utility.EqualsUtility; |
|
24 |
| |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
| public final class SectionVo implements Section { |
|
33 |
| |
|
34 |
| |
|
35 |
| private Boolean noNumber; |
|
36 |
| |
|
37 |
| |
|
38 |
| private LatexList title; |
|
39 |
| |
|
40 |
| |
|
41 |
| private LatexList introduction; |
|
42 |
| |
|
43 |
| |
|
44 |
| private SubsectionList subsectionList; |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
| |
|
49 |
369
| public SectionVo() {
|
|
50 |
| |
|
51 |
| } |
|
52 |
| |
|
53 |
| |
|
54 |
| |
|
55 |
| |
|
56 |
| |
|
57 |
| |
|
58 |
221
| public final void setNoNumber(final Boolean noNumber) {
|
|
59 |
221
| this.noNumber = noNumber;
|
|
60 |
| } |
|
61 |
| |
|
62 |
744
| public final Boolean getNoNumber() {
|
|
63 |
744
| return noNumber;
|
|
64 |
| } |
|
65 |
| |
|
66 |
| |
|
67 |
| |
|
68 |
| |
|
69 |
| |
|
70 |
| |
|
71 |
346
| public final void setTitle(final LatexListVo title) {
|
|
72 |
346
| this.title = title;
|
|
73 |
| } |
|
74 |
| |
|
75 |
1381
| public final LatexList getTitle() {
|
|
76 |
1381
| return title;
|
|
77 |
| } |
|
78 |
| |
|
79 |
| |
|
80 |
| |
|
81 |
| |
|
82 |
| |
|
83 |
| |
|
84 |
345
| public final void setIntroduction(final LatexListVo introduction) {
|
|
85 |
345
| this.introduction = introduction;
|
|
86 |
| } |
|
87 |
| |
|
88 |
1349
| public final LatexList getIntroduction() {
|
|
89 |
1349
| return introduction;
|
|
90 |
| } |
|
91 |
| |
|
92 |
| |
|
93 |
| |
|
94 |
| |
|
95 |
| |
|
96 |
| |
|
97 |
214
| public final void setSubsectionList(final SubsectionListVo subsections) {
|
|
98 |
214
| this.subsectionList = subsections;
|
|
99 |
| } |
|
100 |
| |
|
101 |
3342
| public final SubsectionList getSubsectionList() {
|
|
102 |
3342
| return subsectionList;
|
|
103 |
| } |
|
104 |
| |
|
105 |
171
| public boolean equals(final Object obj) {
|
|
106 |
171
| if (!(obj instanceof SectionVo)) {
|
|
107 |
8
| return false;
|
|
108 |
| } |
|
109 |
163
| final SectionVo other = (SectionVo) obj;
|
|
110 |
163
| return EqualsUtility.equals(getNoNumber(), other.getNoNumber())
|
|
111 |
| && EqualsUtility.equals(getTitle(), other.getTitle()) |
|
112 |
| && EqualsUtility.equals(getIntroduction(), other.getIntroduction()) |
|
113 |
| && EqualsUtility.equals(getSubsectionList(), other.getSubsectionList()); |
|
114 |
| } |
|
115 |
| |
|
116 |
156
| public int hashCode() {
|
|
117 |
156
| return (getNoNumber() != null ? getNoNumber().hashCode() : 0)
|
|
118 |
156
| ^ (getTitle() != null ? 1 ^ getTitle().hashCode() : 0)
|
|
119 |
156
| ^ (getIntroduction() != null ? 2 ^ getIntroduction().hashCode() : 0)
|
|
120 |
156
| ^ (getSubsectionList() != null ? 3 ^ getSubsectionList().hashCode() : 0);
|
|
121 |
| } |
|
122 |
| |
|
123 |
128
| public String toString() {
|
|
124 |
128
| final StringBuffer buffer = new StringBuffer();
|
|
125 |
128
| buffer.append("Section noNumbering: " + noNumber + "\n");
|
|
126 |
128
| buffer.append("Section Title: \n");
|
|
127 |
128
| buffer.append(getTitle() + "\n\n");
|
|
128 |
128
| buffer.append("Introduction: ");
|
|
129 |
128
| buffer.append(getIntroduction() + "\n\n");
|
|
130 |
128
| buffer.append(getSubsectionList() + "\n");
|
|
131 |
128
| return buffer.toString();
|
|
132 |
| } |
|
133 |
| |
|
134 |
| } |