xrefs retrieved from Uniprot
authorjprocter <Jim Procter>
Fri, 15 Aug 2008 10:00:51 +0000 (10:00 +0000)
committerjprocter <Jim Procter>
Fri, 15 Aug 2008 10:00:51 +0000 (10:00 +0000)
src/jalview/ws/dbsources/Uniprot.java

index 42f8d72..65141f8 100644 (file)
@@ -196,11 +196,17 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy
       UniprotEntry entry = (UniprotEntry) entries.elementAt(i);\r
       Enumeration e = entry.getDbReference().elements();\r
       Vector onlyPdbEntries = new Vector();\r
+      Vector dbxrefs = new Vector();\r
       while (e.hasMoreElements())\r
       {\r
         PDBEntry pdb = (PDBEntry) e.nextElement();\r
         if (!pdb.getType().equals("PDB"))\r
         {\r
+          DBRefEntry dbr = new DBRefEntry();\r
+          dbr.setSource(pdb.getType());\r
+          dbr.setAccessionId(pdb.getId());\r
+          dbr.setVersion(DBRefSource.UNIPROT+":"+getDbVersion());\r
+          dbxrefs.addElement(dbr);\r
           continue;\r
         }\r
 \r
@@ -220,6 +226,13 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy
                 new DBRefEntry(DBRefSource.UNIPROT, getDbVersion(), en2.nextElement()\r
                         .toString()));\r
       }\r
+      en2 = dbxrefs.elements();\r
+      while (en2.hasMoreElements())\r
+      {\r
+     // we always add as uniprot if we retrieved from uniprot or uniprot name\r
+        sq.addDBRef((DBRefEntry) en2.nextElement());\r
+                    \r
+      }\r
       sq.setPDBId(onlyPdbEntries);\r
       if (entry.getFeature() != null)\r
       {\r