Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
19   121   13   1.46
0   59   0.68   13
13     1  
1    
 
  DefaultReference       Line # 26 19 13 100% 1.0
 
  (19)
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
4    *
5    * "Hilbert II" is free software; you can redistribute
6    * it and/or modify it under the terms of the GNU General Public
7    * License as published by the Free Software Foundation; either
8    * version 2 of the License, or (at your option) any later version.
9    *
10    * This program is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    * GNU General Public License for more details.
14    */
15   
16    package org.qedeq.kernel.bo.module;
17   
18    import org.qedeq.base.utility.EqualsUtility;
19   
20   
21    /**
22    * A reference to a QEDEQ module or one of its parts.
23    *
24    * @author Michael Meyling
25    */
 
26    public class DefaultReference implements Reference {
27   
28    /** In this node the reference is in. */
29    private final KernelNodeBo nodeCurrent;
30   
31    /** To this QEDEQ module the reference points. */
32    private final KernelQedeqBo qedeqGoal;
33   
34    /** Label for the external QEDEQ module the reference points to. */
35    private final String qedeqGoalLabel;
36   
37    /** To this node the reference points to. */
38    private final KernelNodeBo nodeGoal;
39   
40    /** Label for the node the reference points to. */
41    private final String nodeGoalLabel;
42   
43    /** To this sub node label the reference points. */
44    private final String subLabel;
45   
46    /** To this proof line label the reference points to. */
47    private final String proofLineLabel;
48   
49    /**
50    * Constructor.
51    *
52    * @param nodeCurrent In this node the reference is in.
53    * @param qedeqGoal To this external QEDEQ module the reference points to.
54    * @param qedeqGoalLabel Label for the external QEDEQ module the reference points to.
55    * @param nodeGoal To this node the reference points to.
56    * @param nodeGoalLabel Label for the node the reference points to.
57    * @param subLabel To this sub node label the reference points.
58    * @param proofLineLabel To this proof line label the reference points to.
59    */
 
60  9620 toggle 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  9620 this.nodeCurrent = nodeCurrent;
65  9620 this.qedeqGoal = qedeqGoal;
66  9620 this.qedeqGoalLabel = qedeqGoalLabel;
67  9620 this.nodeGoal = nodeGoal;
68  9620 this.nodeGoalLabel = nodeGoalLabel;
69  9620 this.subLabel = subLabel;
70  9620 this.proofLineLabel = proofLineLabel;
71    }
72   
 
73  537 toggle public boolean isExternalModuleReference() {
74  537 return isExternal() && !isNodeReference();
75    }
76   
 
77  149 toggle public KernelQedeqBo getExternalQedeq() {
78  149 return qedeqGoal;
79    }
80   
 
81  219 toggle public String getExternalQedeqLabel() {
82  219 return qedeqGoalLabel;
83    }
84   
 
85  3253 toggle public KernelNodeBo getNode() {
86  3253 return nodeGoal;
87    }
88   
 
89  4360 toggle public String getNodeLabel() {
90  4360 return nodeGoalLabel;
91    }
92   
 
93  5022 toggle public String getProofLineLabel() {
94  5022 return proofLineLabel;
95    }
96   
 
97  190 toggle public String getSubLabel() {
98  190 return subLabel;
99    }
100   
 
101  1978 toggle public boolean isExternal() {
102  1978 return qedeqGoalLabel != null && qedeqGoalLabel.length() > 0;
103    }
104   
 
105  8686 toggle public boolean isNodeLocalReference() {
106  8686 return EqualsUtility.equals(nodeGoal, nodeCurrent);
107    }
108   
 
109  538 toggle public boolean isNodeReference() {
110  538 return nodeGoalLabel != null && nodeGoalLabel.length() > 0;
111    }
112   
 
113  5653 toggle public boolean isSubReference() {
114  5653 return subLabel != null && subLabel.length() > 0;
115    }
116   
 
117  5653 toggle public boolean isProofLineReference() {
118  5653 return proofLineLabel != null && proofLineLabel.length() > 0;
119    }
120   
121    }