public class DBRefFetcher\r
implements Runnable\r
{\r
- AlignmentI dataset;\r
+ SequenceI [] dataset;\r
AlignFrame af;\r
CutAndPasteTransfer output = new CutAndPasteTransfer();\r
StringBuffer sbuffer = new StringBuffer();\r
* @param align DOCUMENT ME!\r
* @param ap DOCUMENT ME!\r
*/\r
- public DBRefFetcher(AlignmentI align, AlignFrame af)\r
+ public DBRefFetcher(SequenceI [] seqs, AlignFrame af)\r
{\r
this.af = af;\r
- this.dataset = align.getDataset();\r
+ SequenceI [] ds = new SequenceI[seqs.length];\r
+ for (int i = 0; i < seqs.length; i++)\r
+ {\r
+ if(seqs[i].getDatasetSequence()!=null)\r
+ ds[i] = seqs[i].getDatasetSequence();\r
+ else\r
+ ds[i] = seqs[i];\r
+ }\r
+ this.dataset = ds;\r
}\r
\r
public boolean fetchDBRefs(boolean waitTillFinished)\r
try\r
{\r
int seqIndex = 0;\r
- Vector sequences = dataset.getSequences();\r
\r
- while (seqIndex < sequences.size())\r
+ while (seqIndex < dataset.length)\r
{\r
StringBuffer queryString = new StringBuffer("uniprot:");\r
\r
- for (int i = 0; (seqIndex < sequences.size()) && (i < 50);\r
+ for (int i = 0; (seqIndex < dataset.length) && (i < 50);\r
seqIndex++, i++)\r
{\r
- Sequence sequence = (Sequence) sequences.get(seqIndex);\r
+ SequenceI sequence = dataset[seqIndex];\r
DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(sequence.\r
getDBRef(), new String[]\r
{\r