11 |
13 Sep 07 |
nicklas |
1 |
///////////////////////////////////////////////////////////////// |
11 |
13 Sep 07 |
nicklas |
2 |
// |
11 |
13 Sep 07 |
nicklas |
// Copyright (C) 2005 Affymetrix, Inc. |
11 |
13 Sep 07 |
nicklas |
4 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is free software; you can redistribute it and/or modify |
11 |
13 Sep 07 |
nicklas |
// it under the terms of the GNU Lesser General Public License as published |
11 |
13 Sep 07 |
nicklas |
// by the Free Software Foundation; either version 2.1 of the License, |
11 |
13 Sep 07 |
nicklas |
// or (at your option) any later version. |
11 |
13 Sep 07 |
nicklas |
9 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is distributed in the hope that it will be useful, but |
11 |
13 Sep 07 |
nicklas |
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 |
13 Sep 07 |
nicklas |
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// for more details. |
11 |
13 Sep 07 |
nicklas |
14 |
// |
11 |
13 Sep 07 |
nicklas |
// You should have received a copy of the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// along with this library; if not, write to the Free Software Foundation, Inc., |
11 |
13 Sep 07 |
nicklas |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
11 |
13 Sep 07 |
nicklas |
18 |
// |
11 |
13 Sep 07 |
nicklas |
19 |
///////////////////////////////////////////////////////////////// |
11 |
13 Sep 07 |
nicklas |
20 |
|
11 |
13 Sep 07 |
nicklas |
21 |
package affymetrix.fusion.chp; |
11 |
13 Sep 07 |
nicklas |
22 |
import affymetrix.vector.*; |
11 |
13 Sep 07 |
nicklas |
23 |
import affymetrix.gcos.chp.*; |
11 |
13 Sep 07 |
nicklas |
24 |
import affymetrix.calvin.data.*; |
11 |
13 Sep 07 |
nicklas |
25 |
import java.util.*; |
11 |
13 Sep 07 |
nicklas |
26 |
|
11 |
13 Sep 07 |
nicklas |
/** Stores results for a resequencing analysis. */ |
11 |
13 Sep 07 |
nicklas |
28 |
public class FusionResequencingResults { |
11 |
13 Sep 07 |
nicklas |
29 |
|
11 |
13 Sep 07 |
nicklas |
/** The GCOS probe set results object. */ |
11 |
13 Sep 07 |
nicklas |
31 |
private ResequencingResults gcosResult; |
11 |
13 Sep 07 |
nicklas |
32 |
|
11 |
13 Sep 07 |
nicklas |
/** Sets the GCOS probe set results object. |
11 |
13 Sep 07 |
nicklas |
* @param r The GCOS probe set results object. |
11 |
13 Sep 07 |
nicklas |
35 |
*/ |
11 |
13 Sep 07 |
nicklas |
36 |
public void setGCOSObject(ResequencingResults r) { gcosResult=r; } |
11 |
13 Sep 07 |
nicklas |
37 |
|
11 |
13 Sep 07 |
nicklas |
/** The calvin probe set results object. */ |
11 |
13 Sep 07 |
nicklas |
39 |
private CHPData calvinResult; |
11 |
13 Sep 07 |
nicklas |
40 |
|
11 |
13 Sep 07 |
nicklas |
/** Sets the calvin object. |
11 |
13 Sep 07 |
nicklas |
* @param r The calvin data file object. |
11 |
13 Sep 07 |
nicklas |
43 |
*/ |
11 |
13 Sep 07 |
nicklas |
44 |
public void setCalvinObject(CHPData r) { calvinResult=r; } |
11 |
13 Sep 07 |
nicklas |
45 |
|
11 |
13 Sep 07 |
nicklas |
/** Clears the members. */ |
11 |
13 Sep 07 |
nicklas |
47 |
public void clear() { |
11 |
13 Sep 07 |
nicklas |
48 |
gcosResult = null; |
11 |
13 Sep 07 |
nicklas |
49 |
calvinResult = null; |
11 |
13 Sep 07 |
nicklas |
50 |
} |
11 |
13 Sep 07 |
nicklas |
51 |
|
11 |
13 Sep 07 |
nicklas |
/** Creates a new instance of FusionResequencingResults */ |
11 |
13 Sep 07 |
nicklas |
53 |
public FusionResequencingResults() { |
11 |
13 Sep 07 |
nicklas |
54 |
clear(); |
11 |
13 Sep 07 |
nicklas |
55 |
} |
11 |
13 Sep 07 |
nicklas |
56 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the called bases. |
11 |
13 Sep 07 |
nicklas |
* @return The array of called bases. |
11 |
13 Sep 07 |
nicklas |
59 |
*/ |
11 |
13 Sep 07 |
nicklas |
60 |
public AffxCharVector getCalledBases() { |
11 |
13 Sep 07 |
nicklas |
61 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
62 |
{ |
11 |
13 Sep 07 |
nicklas |
63 |
AffxCharVector calledBases = new AffxCharVector(); |
11 |
13 Sep 07 |
nicklas |
64 |
int n = gcosResult.getCalledBasesSize(); |
11 |
13 Sep 07 |
nicklas |
65 |
calledBases.setSize(n); |
11 |
13 Sep 07 |
nicklas |
66 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
67 |
calledBases.setChar(i, gcosResult.getCalledBase(i)); |
11 |
13 Sep 07 |
nicklas |
68 |
return calledBases; |
11 |
13 Sep 07 |
nicklas |
69 |
} |
11 |
13 Sep 07 |
nicklas |
70 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
71 |
{ |
11 |
13 Sep 07 |
nicklas |
72 |
int n = calvinResult.getEntryCount(); |
11 |
13 Sep 07 |
nicklas |
73 |
AffxCharVector calledBases = new AffxCharVector(); |
11 |
13 Sep 07 |
nicklas |
74 |
calledBases.setSize(n); |
11 |
13 Sep 07 |
nicklas |
75 |
CHPReseqEntry entry = new CHPReseqEntry(); |
11 |
13 Sep 07 |
nicklas |
76 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
77 |
{ |
11 |
13 Sep 07 |
nicklas |
78 |
calvinResult.getEntry(i, entry); |
11 |
13 Sep 07 |
nicklas |
79 |
calledBases.setChar(i, entry.getCall()); |
11 |
13 Sep 07 |
nicklas |
80 |
} |
11 |
13 Sep 07 |
nicklas |
81 |
return calledBases; |
11 |
13 Sep 07 |
nicklas |
82 |
} |
11 |
13 Sep 07 |
nicklas |
83 |
return null; |
11 |
13 Sep 07 |
nicklas |
84 |
} |
11 |
13 Sep 07 |
nicklas |
85 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the called base at the given index. |
11 |
13 Sep 07 |
nicklas |
* @param index The index to the called bases array. |
11 |
13 Sep 07 |
nicklas |
* @return The called base. |
11 |
13 Sep 07 |
nicklas |
89 |
*/ |
11 |
13 Sep 07 |
nicklas |
90 |
public char getCalledBase(int index) { |
11 |
13 Sep 07 |
nicklas |
91 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
92 |
return gcosResult.getCalledBase(index); |
11 |
13 Sep 07 |
nicklas |
93 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
94 |
{ |
11 |
13 Sep 07 |
nicklas |
95 |
CHPReseqEntry entry = new CHPReseqEntry(); |
11 |
13 Sep 07 |
nicklas |
96 |
calvinResult.getEntry(index, entry); |
11 |
13 Sep 07 |
nicklas |
97 |
return entry.getCall(); |
11 |
13 Sep 07 |
nicklas |
98 |
} |
11 |
13 Sep 07 |
nicklas |
99 |
return ' '; |
11 |
13 Sep 07 |
nicklas |
100 |
} |
11 |
13 Sep 07 |
nicklas |
101 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the size of the called bases array. |
11 |
13 Sep 07 |
nicklas |
* @return The size of the called bases array. |
11 |
13 Sep 07 |
nicklas |
104 |
*/ |
11 |
13 Sep 07 |
nicklas |
105 |
public int getCalledBasesSize() { |
11 |
13 Sep 07 |
nicklas |
106 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
107 |
{ |
11 |
13 Sep 07 |
nicklas |
108 |
AffxCharVector calledBases = new AffxCharVector(); |
11 |
13 Sep 07 |
nicklas |
109 |
return gcosResult.getCalledBasesSize(); |
11 |
13 Sep 07 |
nicklas |
110 |
} |
11 |
13 Sep 07 |
nicklas |
111 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
112 |
{ |
11 |
13 Sep 07 |
nicklas |
113 |
return calvinResult.getEntryCount(); |
11 |
13 Sep 07 |
nicklas |
114 |
} |
11 |
13 Sep 07 |
nicklas |
115 |
return 0; |
11 |
13 Sep 07 |
nicklas |
116 |
} |
11 |
13 Sep 07 |
nicklas |
117 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the scores. |
11 |
13 Sep 07 |
nicklas |
* @return The array of scores. |
11 |
13 Sep 07 |
nicklas |
120 |
*/ |
11 |
13 Sep 07 |
nicklas |
121 |
public AffxFloatVector getScores() { |
11 |
13 Sep 07 |
nicklas |
122 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
123 |
{ |
11 |
13 Sep 07 |
nicklas |
124 |
AffxFloatVector scores = new AffxFloatVector(); |
11 |
13 Sep 07 |
nicklas |
125 |
int n = gcosResult.getScoresSize(); |
11 |
13 Sep 07 |
nicklas |
126 |
scores.setSize(n); |
11 |
13 Sep 07 |
nicklas |
127 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
128 |
scores.setFloat(i, gcosResult.getScore(i)); |
11 |
13 Sep 07 |
nicklas |
129 |
return scores; |
11 |
13 Sep 07 |
nicklas |
130 |
} |
11 |
13 Sep 07 |
nicklas |
131 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
132 |
{ |
11 |
13 Sep 07 |
nicklas |
133 |
int n = calvinResult.getEntryCount(); |
11 |
13 Sep 07 |
nicklas |
134 |
AffxFloatVector scores = new AffxFloatVector(); |
11 |
13 Sep 07 |
nicklas |
135 |
scores.setSize(n); |
11 |
13 Sep 07 |
nicklas |
136 |
CHPReseqEntry entry = new CHPReseqEntry(); |
11 |
13 Sep 07 |
nicklas |
137 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
138 |
{ |
11 |
13 Sep 07 |
nicklas |
139 |
calvinResult.getEntry(i, entry); |
11 |
13 Sep 07 |
nicklas |
140 |
scores.setFloat(i, entry.getScore()); |
11 |
13 Sep 07 |
nicklas |
141 |
} |
11 |
13 Sep 07 |
nicklas |
142 |
return scores; |
11 |
13 Sep 07 |
nicklas |
143 |
} |
11 |
13 Sep 07 |
nicklas |
144 |
return null; |
11 |
13 Sep 07 |
nicklas |
145 |
} |
11 |
13 Sep 07 |
nicklas |
146 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the score at the given index. |
11 |
13 Sep 07 |
nicklas |
* @param index The index to the scores array. |
11 |
13 Sep 07 |
nicklas |
* @return The score. |
11 |
13 Sep 07 |
nicklas |
150 |
*/ |
11 |
13 Sep 07 |
nicklas |
151 |
public float getScore(int index) { |
11 |
13 Sep 07 |
nicklas |
152 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
153 |
return gcosResult.getScore(index); |
11 |
13 Sep 07 |
nicklas |
154 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
155 |
{ |
11 |
13 Sep 07 |
nicklas |
156 |
CHPReseqEntry entry = new CHPReseqEntry(); |
11 |
13 Sep 07 |
nicklas |
157 |
calvinResult.getEntry(index, entry); |
11 |
13 Sep 07 |
nicklas |
158 |
return entry.getScore(); |
11 |
13 Sep 07 |
nicklas |
159 |
} |
11 |
13 Sep 07 |
nicklas |
160 |
return 0.0f; |
11 |
13 Sep 07 |
nicklas |
161 |
} |
11 |
13 Sep 07 |
nicklas |
162 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the size of the scores array. |
11 |
13 Sep 07 |
nicklas |
* @return The size of the scores array. |
11 |
13 Sep 07 |
nicklas |
165 |
*/ |
11 |
13 Sep 07 |
nicklas |
166 |
public int getScoresSize() { |
11 |
13 Sep 07 |
nicklas |
167 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
168 |
return gcosResult.getScoresSize(); |
11 |
13 Sep 07 |
nicklas |
169 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
170 |
{ |
11 |
13 Sep 07 |
nicklas |
171 |
return calvinResult.getEntryCount(); |
11 |
13 Sep 07 |
nicklas |
172 |
} |
11 |
13 Sep 07 |
nicklas |
173 |
return 0; |
11 |
13 Sep 07 |
nicklas |
174 |
} |
11 |
13 Sep 07 |
nicklas |
175 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the force calls. |
11 |
13 Sep 07 |
nicklas |
* @return The array of force calls. |
11 |
13 Sep 07 |
nicklas |
178 |
*/ |
11 |
13 Sep 07 |
nicklas |
179 |
public Vector getForceCalls() { |
11 |
13 Sep 07 |
nicklas |
180 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
181 |
{ |
11 |
13 Sep 07 |
nicklas |
182 |
Vector force = new Vector(); |
11 |
13 Sep 07 |
nicklas |
183 |
int n=gcosResult.getForceCallsSize(); |
11 |
13 Sep 07 |
nicklas |
184 |
force.setSize(n); |
11 |
13 Sep 07 |
nicklas |
185 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
186 |
{ |
11 |
13 Sep 07 |
nicklas |
187 |
ForceCallType f = gcosResult.getForceCall(i); |
11 |
13 Sep 07 |
nicklas |
188 |
FusionForceCallType ff = new FusionForceCallType(); |
11 |
13 Sep 07 |
nicklas |
189 |
ff.setCall(f.getCall()); |
11 |
13 Sep 07 |
nicklas |
190 |
ff.setPosition(f.getPosition()); |
11 |
13 Sep 07 |
nicklas |
191 |
ff.setReason(f.getReason()); |
11 |
13 Sep 07 |
nicklas |
192 |
force.set(i, ff); |
11 |
13 Sep 07 |
nicklas |
193 |
} |
11 |
13 Sep 07 |
nicklas |
194 |
return force; |
11 |
13 Sep 07 |
nicklas |
195 |
} |
11 |
13 Sep 07 |
nicklas |
196 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
197 |
{ |
11 |
13 Sep 07 |
nicklas |
198 |
Vector force = new Vector(); |
11 |
13 Sep 07 |
nicklas |
199 |
int n = calvinResult.getForceCnt(); |
11 |
13 Sep 07 |
nicklas |
200 |
force.setSize(n); |
11 |
13 Sep 07 |
nicklas |
201 |
CHPReseqForceCall f = new CHPReseqForceCall(); |
11 |
13 Sep 07 |
nicklas |
202 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
203 |
{ |
11 |
13 Sep 07 |
nicklas |
204 |
calvinResult.getForceCall(i, f); |
11 |
13 Sep 07 |
nicklas |
205 |
FusionForceCallType ff = new FusionForceCallType(); |
11 |
13 Sep 07 |
nicklas |
206 |
ff.setCall(f.getCall()); |
11 |
13 Sep 07 |
nicklas |
207 |
ff.setPosition(f.getPosition()); |
11 |
13 Sep 07 |
nicklas |
208 |
ff.setReason((byte)f.getReason()); |
11 |
13 Sep 07 |
nicklas |
209 |
force.set(i, ff); |
11 |
13 Sep 07 |
nicklas |
210 |
} |
11 |
13 Sep 07 |
nicklas |
211 |
return force; |
11 |
13 Sep 07 |
nicklas |
212 |
} |
11 |
13 Sep 07 |
nicklas |
213 |
return null; |
11 |
13 Sep 07 |
nicklas |
214 |
} |
11 |
13 Sep 07 |
nicklas |
215 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the force call at the given index. |
11 |
13 Sep 07 |
nicklas |
* @param index The index to the force calls array. |
11 |
13 Sep 07 |
nicklas |
* @return The force call. |
11 |
13 Sep 07 |
nicklas |
219 |
*/ |
11 |
13 Sep 07 |
nicklas |
220 |
public FusionForceCallType getForceCall(int index) { |
11 |
13 Sep 07 |
nicklas |
221 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
222 |
{ |
11 |
13 Sep 07 |
nicklas |
223 |
ForceCallType gcosForce = gcosResult.getForceCall(index); |
11 |
13 Sep 07 |
nicklas |
224 |
FusionForceCallType force = new FusionForceCallType(); |
11 |
13 Sep 07 |
nicklas |
225 |
force.setCall(gcosForce.getCall()); |
11 |
13 Sep 07 |
nicklas |
226 |
force.setPosition(gcosForce.getPosition()); |
11 |
13 Sep 07 |
nicklas |
227 |
force.setReason(gcosForce.getReason()); |
11 |
13 Sep 07 |
nicklas |
228 |
return force; |
11 |
13 Sep 07 |
nicklas |
229 |
} |
11 |
13 Sep 07 |
nicklas |
230 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
231 |
{ |
11 |
13 Sep 07 |
nicklas |
232 |
CHPReseqForceCall f = new CHPReseqForceCall(); |
11 |
13 Sep 07 |
nicklas |
233 |
calvinResult.getForceCall(index, f); |
11 |
13 Sep 07 |
nicklas |
234 |
FusionForceCallType force = new FusionForceCallType(); |
11 |
13 Sep 07 |
nicklas |
235 |
force.setCall(f.getCall()); |
11 |
13 Sep 07 |
nicklas |
236 |
force.setPosition(f.getPosition()); |
11 |
13 Sep 07 |
nicklas |
237 |
force.setReason((byte)f.getReason()); |
11 |
13 Sep 07 |
nicklas |
238 |
return force; |
11 |
13 Sep 07 |
nicklas |
239 |
} |
11 |
13 Sep 07 |
nicklas |
240 |
return null; |
11 |
13 Sep 07 |
nicklas |
241 |
} |
11 |
13 Sep 07 |
nicklas |
242 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the size of the force calls array. |
11 |
13 Sep 07 |
nicklas |
* @return The size of the force calls array. |
11 |
13 Sep 07 |
nicklas |
245 |
*/ |
11 |
13 Sep 07 |
nicklas |
246 |
public int getForceCallsSize() { |
11 |
13 Sep 07 |
nicklas |
247 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
248 |
return gcosResult.getForceCallsSize(); |
11 |
13 Sep 07 |
nicklas |
249 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
250 |
return calvinResult.getForceCnt(); |
11 |
13 Sep 07 |
nicklas |
251 |
return 0; |
11 |
13 Sep 07 |
nicklas |
252 |
} |
11 |
13 Sep 07 |
nicklas |
253 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the original called bases. |
11 |
13 Sep 07 |
nicklas |
* @return The array of original calls. |
11 |
13 Sep 07 |
nicklas |
256 |
*/ |
11 |
13 Sep 07 |
nicklas |
257 |
public Vector getOrigCalls() { |
11 |
13 Sep 07 |
nicklas |
258 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
259 |
{ |
11 |
13 Sep 07 |
nicklas |
260 |
Vector bases = new Vector(); |
11 |
13 Sep 07 |
nicklas |
261 |
int n=gcosResult.getOrigCallsSize(); |
11 |
13 Sep 07 |
nicklas |
262 |
bases.setSize(n); |
11 |
13 Sep 07 |
nicklas |
263 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
264 |
{ |
11 |
13 Sep 07 |
nicklas |
265 |
BaseCallType gcosBase = gcosResult.getOrigCall(i); |
11 |
13 Sep 07 |
nicklas |
266 |
FusionBaseCallType base = new FusionBaseCallType(); |
11 |
13 Sep 07 |
nicklas |
267 |
base.setCall(gcosBase.getCall()); |
11 |
13 Sep 07 |
nicklas |
268 |
base.setPosition(gcosBase.getPosition()); |
11 |
13 Sep 07 |
nicklas |
269 |
bases.set(i, base); |
11 |
13 Sep 07 |
nicklas |
270 |
} |
11 |
13 Sep 07 |
nicklas |
271 |
return bases; |
11 |
13 Sep 07 |
nicklas |
272 |
} |
11 |
13 Sep 07 |
nicklas |
273 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
274 |
{ |
11 |
13 Sep 07 |
nicklas |
275 |
Vector bases = new Vector(); |
11 |
13 Sep 07 |
nicklas |
276 |
int n = calvinResult.getOrigCnt(); |
11 |
13 Sep 07 |
nicklas |
277 |
bases.setSize(n); |
11 |
13 Sep 07 |
nicklas |
278 |
CHPReseqOrigCall calvinBase = new CHPReseqOrigCall(); |
11 |
13 Sep 07 |
nicklas |
279 |
for (int i=0; i<n; i++) |
11 |
13 Sep 07 |
nicklas |
280 |
{ |
11 |
13 Sep 07 |
nicklas |
281 |
calvinResult.getOrigCall(i, calvinBase); |
11 |
13 Sep 07 |
nicklas |
282 |
FusionBaseCallType base = new FusionBaseCallType(); |
11 |
13 Sep 07 |
nicklas |
283 |
base.setCall(calvinBase.getCall()); |
11 |
13 Sep 07 |
nicklas |
284 |
base.setPosition(calvinBase.getPosition()); |
11 |
13 Sep 07 |
nicklas |
285 |
bases.set(i, base); |
11 |
13 Sep 07 |
nicklas |
286 |
} |
11 |
13 Sep 07 |
nicklas |
287 |
return bases; |
11 |
13 Sep 07 |
nicklas |
288 |
} |
11 |
13 Sep 07 |
nicklas |
289 |
return null; |
11 |
13 Sep 07 |
nicklas |
290 |
} |
11 |
13 Sep 07 |
nicklas |
291 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the original called base at the given index. |
11 |
13 Sep 07 |
nicklas |
* @param index The index to the original calls array. |
11 |
13 Sep 07 |
nicklas |
* @return The original call. |
11 |
13 Sep 07 |
nicklas |
295 |
*/ |
11 |
13 Sep 07 |
nicklas |
296 |
public FusionBaseCallType getOrigCall(int index) { |
11 |
13 Sep 07 |
nicklas |
297 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
298 |
{ |
11 |
13 Sep 07 |
nicklas |
299 |
BaseCallType gcosBase = gcosResult.getOrigCall(index); |
11 |
13 Sep 07 |
nicklas |
300 |
FusionBaseCallType base = new FusionBaseCallType(); |
11 |
13 Sep 07 |
nicklas |
301 |
base.setCall(gcosBase.getCall()); |
11 |
13 Sep 07 |
nicklas |
302 |
base.setPosition(gcosBase.getPosition()); |
11 |
13 Sep 07 |
nicklas |
303 |
return base; |
11 |
13 Sep 07 |
nicklas |
304 |
} |
11 |
13 Sep 07 |
nicklas |
305 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
306 |
{ |
11 |
13 Sep 07 |
nicklas |
307 |
CHPReseqOrigCall calvinBase = new CHPReseqOrigCall(); |
11 |
13 Sep 07 |
nicklas |
308 |
calvinResult.getOrigCall(index, calvinBase); |
11 |
13 Sep 07 |
nicklas |
309 |
FusionBaseCallType base = new FusionBaseCallType(); |
11 |
13 Sep 07 |
nicklas |
310 |
base.setCall(calvinBase.getCall()); |
11 |
13 Sep 07 |
nicklas |
311 |
base.setPosition(calvinBase.getPosition()); |
11 |
13 Sep 07 |
nicklas |
312 |
return base; |
11 |
13 Sep 07 |
nicklas |
313 |
} |
11 |
13 Sep 07 |
nicklas |
314 |
return null; |
11 |
13 Sep 07 |
nicklas |
315 |
} |
11 |
13 Sep 07 |
nicklas |
316 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the size of the original calls array. |
11 |
13 Sep 07 |
nicklas |
* @return The size of the original calls array. |
11 |
13 Sep 07 |
nicklas |
319 |
*/ |
11 |
13 Sep 07 |
nicklas |
320 |
public int getOrigCallsSize() { |
11 |
13 Sep 07 |
nicklas |
321 |
if (gcosResult != null) |
11 |
13 Sep 07 |
nicklas |
322 |
return gcosResult.getOrigCallsSize(); |
11 |
13 Sep 07 |
nicklas |
323 |
else if (calvinResult != null) |
11 |
13 Sep 07 |
nicklas |
324 |
return calvinResult.getOrigCnt(); |
11 |
13 Sep 07 |
nicklas |
325 |
return 0; |
11 |
13 Sep 07 |
nicklas |
326 |
} |
11 |
13 Sep 07 |
nicklas |
327 |
} |