From a8d30fa38a5d3e9cccf08aa446ca8ab00469bfd4 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 15 Aug 2008 10:00:51 +0000 Subject: [PATCH] xrefs retrieved from Uniprot --- src/jalview/ws/dbsources/Uniprot.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) { -- 1.7.10.2