DBRefEntry[] entryRefs = jalview.util.DBRefUtils.selectRefs(entry\r
.getDBRef(), new String[]\r
{ dbSource });\r
+ if (entryRefs==null) {\r
+ System.err.println("Dud dbSource string ? no entryrefs selected for "+dbSource+ " on "+entry.getName());\r
+ continue;\r
+ }\r
for (int j = 0; j < entryRefs.length; j++)\r
- {\r
- String accessionId = entryRefs[j].getAccessionId(); // .getAccession().elementAt(j).toString();\r
- // match up on accessionId\r
- if (seqRefs.containsKey(accessionId.toUpperCase()))\r
{\r
- Vector seqs = (Vector) seqRefs.get(accessionId);\r
- for (int jj = 0; jj < seqs.size(); jj++)\r
+ String accessionId = entryRefs[j].getAccessionId(); // .getAccession().elementAt(j).toString();\r
+ // match up on accessionId\r
+ if (seqRefs.containsKey(accessionId.toUpperCase()))\r
{\r
- sequence = (SequenceI) seqs.elementAt(jj);\r
- if (!sequenceMatches.contains(sequence))\r
+ Vector seqs = (Vector) seqRefs.get(accessionId);\r
+ for (int jj = 0; jj < seqs.size(); jj++)\r
{\r
- sequenceMatches.addElement(sequence);\r
+ sequence = (SequenceI) seqs.elementAt(jj);\r
+ if (!sequenceMatches.contains(sequence))\r
+ {\r
+ sequenceMatches.addElement(sequence);\r
+ }\r
}\r
}\r
}\r
- }\r
- if (sequenceMatches.size() == 0)\r
- {\r
- // failed to match directly on accessionId==query so just compare all\r
- // sequences to entry\r
+ if (sequenceMatches.size() == 0)\r
+ {\r
+ // failed to match directly on accessionId==query so just compare all\r
+ // sequences to entry\r
Enumeration e = seqRefs.keys();\r
while (e.hasMoreElements())\r
{\r