1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.lum.statement.config.context.util; |
17 |
|
|
18 |
|
import java.util.List; |
19 |
|
|
20 |
|
import org.kuali.student.lum.lu.dto.CluInfo; |
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@link |
37 |
|
|
|
|
| 0% |
Uncovered Elements: 72 (72) |
Complexity: 21 |
Complexity Density: 0.52 |
|
38 |
|
public class NLCluSet { |
39 |
|
|
40 |
|
private String cluSetId; |
41 |
|
private List<CluInfo> cluList; |
42 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
43 |
0
|
public NLCluSet(String cluSetId, List<CluInfo> cluList) {... |
44 |
0
|
this.cluSetId = cluSetId; |
45 |
0
|
this.cluList = cluList; |
46 |
|
} |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
@return |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
53 |
0
|
public String getCluSetId() {... |
54 |
0
|
return cluSetId; |
55 |
|
} |
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
@return |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0
|
public List<CluInfo> getCluList() {... |
63 |
0
|
return this.cluList; |
64 |
|
} |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
@param |
70 |
|
@return |
71 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
72 |
0
|
public String getCluAsShortName(int index) {... |
73 |
0
|
return this.cluList.get(index).getOfficialIdentifier().getShortName(); |
74 |
|
} |
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
@param |
79 |
|
@return |
80 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
0
|
public String getCluAsCode(int index) {... |
82 |
0
|
return this.cluList.get(index).getOfficialIdentifier().getCode(); |
83 |
|
} |
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
@return |
90 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 4 |
Complexity Density: 0.4 |
|
91 |
0
|
public String getCluSetAsShortName() {... |
92 |
0
|
StringBuilder sb = new StringBuilder(); |
93 |
0
|
if (this.cluList.size() > 1) { |
94 |
0
|
sb.append("("); |
95 |
|
} |
96 |
0
|
for(CluInfo clu : this.cluList) { |
97 |
0
|
sb.append(clu.getOfficialIdentifier().getShortName()); |
98 |
0
|
if (this.cluList.indexOf(clu) < (this.cluList.size() - 1)) { |
99 |
0
|
sb.append(", "); |
100 |
|
} |
101 |
|
} |
102 |
0
|
if (this.cluList.size() > 1) { |
103 |
0
|
sb.append(")"); |
104 |
|
} |
105 |
0
|
return getString(sb); |
106 |
|
} |
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
@return |
113 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 4 |
Complexity Density: 0.4 |
|
114 |
0
|
public String getCluSetAsLongName() {... |
115 |
0
|
StringBuilder sb = new StringBuilder(); |
116 |
0
|
if (this.cluList.size() > 1) { |
117 |
0
|
sb.append("("); |
118 |
|
} |
119 |
0
|
for(CluInfo clu : this.cluList) { |
120 |
0
|
sb.append(clu.getOfficialIdentifier().getLongName()); |
121 |
0
|
if (this.cluList.indexOf(clu) < (this.cluList.size() - 1)) { |
122 |
0
|
sb.append(", "); |
123 |
|
} |
124 |
|
} |
125 |
0
|
if (this.cluList.size() > 1) { |
126 |
0
|
sb.append(")"); |
127 |
|
} |
128 |
0
|
return getString(sb); |
129 |
|
} |
130 |
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
@return |
136 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 4 |
Complexity Density: 0.4 |
|
137 |
0
|
public String getCluSetAsCode() {... |
138 |
0
|
StringBuilder sb = new StringBuilder(); |
139 |
0
|
if (this.cluList.size() > 1) { |
140 |
0
|
sb.append("("); |
141 |
|
} |
142 |
0
|
for(CluInfo clu : this.cluList) { |
143 |
0
|
sb.append(clu.getOfficialIdentifier().getCode()); |
144 |
0
|
if (this.cluList.indexOf(clu) < (this.cluList.size() - 1)) { |
145 |
0
|
sb.append(", "); |
146 |
|
} |
147 |
|
} |
148 |
0
|
if (this.cluList.size() > 1) { |
149 |
0
|
sb.append(")"); |
150 |
|
} |
151 |
0
|
return getString(sb); |
152 |
|
} |
153 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
154 |
0
|
private String getString(StringBuilder sb) {... |
155 |
0
|
return (sb.length() == 0 ? "No CLUs available in CluSet" : sb.toString()); |
156 |
|
} |
157 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
158 |
0
|
public String toString() {... |
159 |
0
|
if(this.cluList == null) { |
160 |
0
|
return "Null CluSet"; |
161 |
|
} |
162 |
0
|
return "id=" + this.cluSetId; |
163 |
|
} |
164 |
|
} |