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.Axiom; |
21 |
| import org.qedeq.kernel.base.module.Formula; |
22 |
| import org.qedeq.kernel.base.module.FunctionDefinition; |
23 |
| import org.qedeq.kernel.base.module.LatexList; |
24 |
| import org.qedeq.kernel.base.module.PredicateDefinition; |
25 |
| import org.qedeq.kernel.base.module.Proposition; |
26 |
| import org.qedeq.kernel.base.module.Rule; |
27 |
| import org.qedeq.kernel.base.module.VariableList; |
28 |
| import org.qedeq.kernel.utility.EqualsUtility; |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
| |
34 |
| |
35 |
| |
36 |
| |
37 |
| |
38 |
| |
39 |
| |
40 |
| |
41 |
| public class PredicateDefinitionVo implements PredicateDefinition { |
42 |
| |
43 |
| |
44 |
| private String argumentNumber; |
45 |
| |
46 |
| |
47 |
| private String name; |
48 |
| |
49 |
| |
50 |
| |
51 |
| |
52 |
| private String latexPattern; |
53 |
| |
54 |
| |
55 |
| |
56 |
| private VariableList variableList; |
57 |
| |
58 |
| |
59 |
| private Formula formula; |
60 |
| |
61 |
| |
62 |
| private LatexList description; |
63 |
| |
64 |
| |
65 |
| |
66 |
| |
67 |
424
| public PredicateDefinitionVo() {
|
68 |
| |
69 |
| } |
70 |
| |
71 |
0
| public Axiom getAxiom() {
|
72 |
0
| return null;
|
73 |
| } |
74 |
| |
75 |
1296
| public PredicateDefinition getPredicateDefinition() {
|
76 |
1296
| return this;
|
77 |
| } |
78 |
| |
79 |
0
| public FunctionDefinition getFunctionDefinition() {
|
80 |
0
| return null;
|
81 |
| } |
82 |
| |
83 |
0
| public Proposition getProposition() {
|
84 |
0
| return null;
|
85 |
| } |
86 |
| |
87 |
0
| public Rule getRule() {
|
88 |
0
| return null;
|
89 |
| } |
90 |
| |
91 |
| |
92 |
| |
93 |
| |
94 |
| |
95 |
| |
96 |
380
| public final void setArgumentNumber(final String argumentNumber) {
|
97 |
380
| this.argumentNumber = argumentNumber;
|
98 |
| } |
99 |
| |
100 |
1414
| public final String getArgumentNumber() {
|
101 |
1414
| return argumentNumber;
|
102 |
| } |
103 |
| |
104 |
| |
105 |
| |
106 |
| |
107 |
| |
108 |
| |
109 |
| |
110 |
380
| public void setName(final String name) {
|
111 |
380
| this.name = name;
|
112 |
| } |
113 |
| |
114 |
1448
| public String getName() {
|
115 |
1448
| return name;
|
116 |
| } |
117 |
| |
118 |
| |
119 |
| |
120 |
| |
121 |
| |
122 |
| |
123 |
| |
124 |
| |
125 |
380
| public final void setLatexPattern(final String latexPattern) {
|
126 |
380
| this.latexPattern = latexPattern;
|
127 |
| } |
128 |
| |
129 |
2233
| public final String getLatexPattern() {
|
130 |
2233
| return latexPattern;
|
131 |
| } |
132 |
| |
133 |
| |
134 |
| |
135 |
| |
136 |
| |
137 |
| |
138 |
| |
139 |
294
| public final void setVariableList(final VariableListVo variables) {
|
140 |
294
| this.variableList = variables;
|
141 |
| } |
142 |
| |
143 |
4190
| public final VariableList getVariableList() {
|
144 |
4190
| return variableList;
|
145 |
| } |
146 |
| |
147 |
| |
148 |
| |
149 |
| |
150 |
| |
151 |
| |
152 |
263
| public final void setFormula(final FormulaVo formulaOrTerm) {
|
153 |
263
| this.formula = formulaOrTerm;
|
154 |
| } |
155 |
| |
156 |
4468
| public final Formula getFormula() {
|
157 |
4468
| return formula;
|
158 |
| } |
159 |
| |
160 |
| |
161 |
| |
162 |
| |
163 |
| |
164 |
| |
165 |
125
| public final void setDescription(final LatexListVo description) {
|
166 |
125
| this.description = description;
|
167 |
| } |
168 |
| |
169 |
1405
| public LatexList getDescription() {
|
170 |
1405
| return description;
|
171 |
| } |
172 |
| |
173 |
245
| public boolean equals(final Object obj) {
|
174 |
245
| if (!(obj instanceof PredicateDefinition)) {
|
175 |
10
| return false;
|
176 |
| } |
177 |
235
| final PredicateDefinition other = (PredicateDefinition) obj;
|
178 |
235
| return EqualsUtility.equals(getArgumentNumber(), other.getArgumentNumber())
|
179 |
| && EqualsUtility.equals(getName(), other.getName()) |
180 |
| && EqualsUtility.equals(getLatexPattern(), other.getLatexPattern()) |
181 |
| && EqualsUtility.equals(getVariableList(), other.getVariableList()) |
182 |
| && EqualsUtility.equals(getFormula(), other.getFormula()) |
183 |
| && EqualsUtility.equals(getDescription(), other.getDescription()); |
184 |
| } |
185 |
| |
186 |
235
| public int hashCode() {
|
187 |
235
| return (getArgumentNumber() != null ? getArgumentNumber().hashCode() : 0)
|
188 |
235
| ^ (getName() != null ? 1 ^ getName().hashCode() : 0)
|
189 |
235
| ^ (getLatexPattern() != null ? 2 ^ getLatexPattern().hashCode() : 0)
|
190 |
235
| ^ (getVariableList() != null ? 3 ^ getVariableList().hashCode() : 0)
|
191 |
235
| ^ (getFormula() != null ? 4 ^ getFormula().hashCode() : 0)
|
192 |
235
| ^ (getDescription() != null ? 5 ^ getDescription().hashCode() : 0);
|
193 |
| } |
194 |
| |
195 |
182
| public String toString() {
|
196 |
182
| final StringBuffer buffer = new StringBuffer();
|
197 |
182
| buffer.append("Predicate Definition arguments=" + getArgumentNumber() + "\n");
|
198 |
182
| buffer.append("\tname=" + getName() + "\n");
|
199 |
182
| buffer.append("\tpattern=" + getLatexPattern() + "\n");
|
200 |
182
| buffer.append("\tvariables=" + getVariableList() + "\n");
|
201 |
182
| buffer.append("\tformula/term:\n" + getFormula() + "\n");
|
202 |
182
| buffer.append("\tdescription:\n" + getDescription() + "\n");
|
203 |
182
| return buffer.toString();
|
204 |
| } |
205 |
| |
206 |
| |
207 |
| } |