|
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.Subsection; |
|
22 |
| import org.qedeq.kernel.utility.EqualsUtility; |
|
23 |
| |
|
24 |
| |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| public final class SubsectionVo implements Subsection { |
|
32 |
| |
|
33 |
| |
|
34 |
| private String id; |
|
35 |
| |
|
36 |
| |
|
37 |
| private String level; |
|
38 |
| |
|
39 |
| |
|
40 |
| private LatexList title; |
|
41 |
| |
|
42 |
| |
|
43 |
| private LatexList latex; |
|
44 |
| |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
188
| public SubsectionVo() {
|
|
49 |
| |
|
50 |
| } |
|
51 |
| |
|
52 |
| |
|
53 |
| |
|
54 |
| |
|
55 |
| |
|
56 |
| |
|
57 |
77
| public final void setId(final String label) {
|
|
58 |
77
| this.id = label;
|
|
59 |
| } |
|
60 |
| |
|
61 |
217
| public final String getId() {
|
|
62 |
217
| return id;
|
|
63 |
| } |
|
64 |
| |
|
65 |
| |
|
66 |
| |
|
67 |
| |
|
68 |
| |
|
69 |
| |
|
70 |
77
| public final void setLevel(final String level) {
|
|
71 |
77
| this.level = level;
|
|
72 |
| } |
|
73 |
| |
|
74 |
260
| public final String getLevel() {
|
|
75 |
260
| return level;
|
|
76 |
| } |
|
77 |
| |
|
78 |
| |
|
79 |
| |
|
80 |
| |
|
81 |
| |
|
82 |
| |
|
83 |
120
| public final void setTitle(final LatexListVo title) {
|
|
84 |
120
| this.title = title;
|
|
85 |
| } |
|
86 |
| |
|
87 |
540
| public final LatexList getTitle() {
|
|
88 |
540
| return title;
|
|
89 |
| } |
|
90 |
| |
|
91 |
| |
|
92 |
| |
|
93 |
| |
|
94 |
| |
|
95 |
| |
|
96 |
138
| public final void setLatex(final LatexListVo latexText) {
|
|
97 |
138
| this.latex = latexText;
|
|
98 |
| } |
|
99 |
| |
|
100 |
507
| public final LatexList getLatex() {
|
|
101 |
507
| return latex;
|
|
102 |
| } |
|
103 |
| |
|
104 |
57
| public boolean equals(final Object obj) {
|
|
105 |
57
| if (!(obj instanceof SubsectionVo)) {
|
|
106 |
6
| return false;
|
|
107 |
| } |
|
108 |
51
| final SubsectionVo subsection = (SubsectionVo) obj;
|
|
109 |
51
| return EqualsUtility.equals(getId(), subsection.getId())
|
|
110 |
| && EqualsUtility.equals(getLevel(), subsection.getLevel()) |
|
111 |
| && EqualsUtility.equals(getTitle(), subsection.getTitle()) |
|
112 |
| && EqualsUtility.equals(getLatex(), subsection.getLatex()); |
|
113 |
| } |
|
114 |
| |
|
115 |
58
| public int hashCode() {
|
|
116 |
58
| return (getId() != null ? getId().hashCode() : 0)
|
|
117 |
58
| ^ (getLevel() != null ? 1 ^ getLevel().hashCode() : 0)
|
|
118 |
58
| ^ (getTitle() != null ? 2 ^ getTitle().hashCode() : 0)
|
|
119 |
58
| ^ (getLatex() != null ? 3 ^ getLatex().hashCode() : 0);
|
|
120 |
| } |
|
121 |
| |
|
122 |
36
| public String toString() {
|
|
123 |
36
| final StringBuffer buffer = new StringBuffer();
|
|
124 |
36
| buffer.append("Subsection\t");
|
|
125 |
36
| buffer.append("Label: " + getId());
|
|
126 |
36
| buffer.append("\tLevel: " + getLevel() + "\n");
|
|
127 |
36
| buffer.append("Title: ");
|
|
128 |
36
| buffer.append(getTitle() + "\n\n");
|
|
129 |
36
| buffer.append("Pre: ");
|
|
130 |
36
| buffer.append(getLatex() + "\n\n");
|
|
131 |
36
| return buffer.toString();
|
|
132 |
| } |
|
133 |
| |
|
134 |
| } |