From: jprocter Date: Fri, 15 Aug 2008 10:00:51 +0000 (+0000) Subject: xrefs retrieved from Uniprot X-Git-Tag: Release_2_4~26 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a8d30fa38a5d3e9cccf08aa446ca8ab00469bfd4;p=jalview.git xrefs retrieved from Uniprot --- diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 42f8d72..65141f8 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -196,11 +196,17 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy UniprotEntry entry = (UniprotEntry) entries.elementAt(i); Enumeration e = entry.getDbReference().elements(); Vector onlyPdbEntries = new Vector(); + Vector dbxrefs = new Vector(); while (e.hasMoreElements()) { PDBEntry pdb = (PDBEntry) e.nextElement(); if (!pdb.getType().equals("PDB")) { + DBRefEntry dbr = new DBRefEntry(); + dbr.setSource(pdb.getType()); + dbr.setAccessionId(pdb.getId()); + dbr.setVersion(DBRefSource.UNIPROT+":"+getDbVersion()); + dbxrefs.addElement(dbr); continue; } @@ -220,6 +226,13 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy new DBRefEntry(DBRefSource.UNIPROT, getDbVersion(), en2.nextElement() .toString())); } + en2 = dbxrefs.elements(); + while (en2.hasMoreElements()) + { + // we always add as uniprot if we retrieved from uniprot or uniprot name + sq.addDBRef((DBRefEntry) en2.nextElement()); + + } sq.setPDBId(onlyPdbEntries); if (entry.getFeature() != null) {