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 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 |
591
| public SectionVo() {
|
50 |
| |
51 |
| } |
52 |
| |
53 |
| |
54 |
| |
55 |
| |
56 |
| |
57 |
| |
58 |
344
| public final void setNoNumber(final Boolean noNumber) {
|
59 |
344
| this.noNumber = noNumber;
|
60 |
| } |
61 |
| |
62 |
890
| public final Boolean getNoNumber() {
|
63 |
890
| return noNumber;
|
64 |
| } |
65 |
| |
66 |
| |
67 |
| |
68 |
| |
69 |
| |
70 |
| |
71 |
568
| public final void setTitle(final LatexListVo title) {
|
72 |
568
| this.title = title;
|
73 |
| } |
74 |
| |
75 |
141095
| public final LatexList getTitle() {
|
76 |
141095
| return title;
|
77 |
| } |
78 |
| |
79 |
| |
80 |
| |
81 |
| |
82 |
| |
83 |
| |
84 |
561
| public final void setIntroduction(final LatexListVo introduction) {
|
85 |
561
| this.introduction = introduction;
|
86 |
| } |
87 |
| |
88 |
140065
| public final LatexList getIntroduction() {
|
89 |
140065
| return introduction;
|
90 |
| } |
91 |
| |
92 |
| |
93 |
| |
94 |
| |
95 |
| |
96 |
| |
97 |
342
| public final void setSubsectionList(final SubsectionListVo subsections) {
|
98 |
342
| this.subsectionList = subsections;
|
99 |
| } |
100 |
| |
101 |
153596
| public final SubsectionList getSubsectionList() {
|
102 |
153596
| return subsectionList;
|
103 |
| } |
104 |
| |
105 |
178
| public boolean equals(final Object obj) {
|
106 |
178
| if (!(obj instanceof SectionVo)) {
|
107 |
8
| return false;
|
108 |
| } |
109 |
170
| final SectionVo other = (SectionVo) obj;
|
110 |
170
| 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 |
158
| public int hashCode() {
|
117 |
158
| return (getNoNumber() != null ? getNoNumber().hashCode() : 0)
|
118 |
158
| ^ (getTitle() != null ? 1 ^ getTitle().hashCode() : 0)
|
119 |
158
| ^ (getIntroduction() != null ? 2 ^ getIntroduction().hashCode() : 0)
|
120 |
158
| ^ (getSubsectionList() != null ? 3 ^ getSubsectionList().hashCode() : 0);
|
121 |
| } |
122 |
| |
123 |
130
| public String toString() {
|
124 |
130
| final StringBuffer buffer = new StringBuffer();
|
125 |
130
| buffer.append("Section noNumbering: " + noNumber + "\n");
|
126 |
130
| buffer.append("Section Title: \n");
|
127 |
130
| buffer.append(getTitle() + "\n\n");
|
128 |
130
| buffer.append("Introduction: ");
|
129 |
130
| buffer.append(getIntroduction() + "\n\n");
|
130 |
130
| buffer.append(getSubsectionList() + "\n");
|
131 |
130
| return buffer.toString();
|
132 |
| } |
133 |
| |
134 |
| } |