1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.qedeq.kernel.bo.module;
17
18 import org.qedeq.base.utility.EqualsUtility;
19
20
21
22
23
24
25
26 public class DefaultReference implements Reference {
27
28
29 private final KernelNodeBo nodeCurrent;
30
31
32 private final KernelQedeqBo qedeqGoal;
33
34
35 private final String qedeqGoalLabel;
36
37
38 private final KernelNodeBo nodeGoal;
39
40
41 private final String nodeGoalLabel;
42
43
44 private final String subLabel;
45
46
47 private final String proofLineLabel;
48
49
50
51
52
53
54
55
56
57
58
59
60 public DefaultReference(final KernelNodeBo nodeCurrent,
61 final KernelQedeqBo qedeqGoal, final String qedeqGoalLabel,
62 final KernelNodeBo nodeGoal, final String nodeGoalLabel,
63 final String subLabel, final String proofLineLabel) {
64 this.nodeCurrent = nodeCurrent;
65 this.qedeqGoal = qedeqGoal;
66 this.qedeqGoalLabel = qedeqGoalLabel;
67 this.nodeGoal = nodeGoal;
68 this.nodeGoalLabel = nodeGoalLabel;
69 this.subLabel = subLabel;
70 this.proofLineLabel = proofLineLabel;
71 }
72
73 public boolean isExternalModuleReference() {
74 return isExternal() && !isNodeReference();
75 }
76
77 public KernelQedeqBo getExternalQedeq() {
78 return qedeqGoal;
79 }
80
81 public String getExternalQedeqLabel() {
82 return qedeqGoalLabel;
83 }
84
85 public KernelNodeBo getNode() {
86 return nodeGoal;
87 }
88
89 public String getNodeLabel() {
90 return nodeGoalLabel;
91 }
92
93 public String getProofLineLabel() {
94 return proofLineLabel;
95 }
96
97 public String getSubLabel() {
98 return subLabel;
99 }
100
101 public boolean isExternal() {
102 return qedeqGoalLabel != null && qedeqGoalLabel.length() > 0;
103 }
104
105 public boolean isNodeLocalReference() {
106 return EqualsUtility.equals(nodeGoal, nodeCurrent);
107 }
108
109 public boolean isNodeReference() {
110 return nodeGoalLabel != null && nodeGoalLabel.length() > 0;
111 }
112
113 public boolean isSubReference() {
114 return subLabel != null && subLabel.length() > 0;
115 }
116
117 public boolean isProofLineReference() {
118 return proofLineLabel != null && proofLineLabel.length() > 0;
119 }
120
121 }