1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.qedeq.kernel.xml.handler.module;
17
18 import org.qedeq.kernel.se.dto.module.ModusPonensVo;
19 import org.qedeq.kernel.xml.common.XmlSyntaxException;
20 import org.qedeq.kernel.xml.handler.common.AbstractSimpleHandler;
21 import org.qedeq.kernel.xml.handler.common.SimpleAttributes;
22
23
24
25
26
27
28
29 public class ModusPonensHandler extends AbstractSimpleHandler {
30
31
32 private ModusPonensVo modusPonens;
33
34
35
36
37
38
39 public ModusPonensHandler(final AbstractSimpleHandler handler) {
40 super(handler, "MP");
41 }
42
43 public final void init() {
44 modusPonens = null;
45 }
46
47
48
49
50
51
52 public final ModusPonensVo getModusPonensVo() {
53 return modusPonens;
54 }
55
56 public final void startElement(final String name, final SimpleAttributes attributes)
57 throws XmlSyntaxException {
58 if (getStartTag().equals(name)) {
59 modusPonens = new ModusPonensVo(attributes.getString("ref1"),
60 attributes.getString("ref2"));
61 } else {
62 throw XmlSyntaxException.createUnexpectedTagException(name);
63 }
64 }
65
66 public final void endElement(final String name) throws XmlSyntaxException {
67 if (getStartTag().equals(name)) {
68
69 } else {
70 throw XmlSyntaxException.createUnexpectedTagException(name);
71 }
72 }
73
74 }