JAL-2110 work in progress
[jalview.git] / src / jalview / datamodel / xdb / embl / EmblEntry.java
index cfe87d9..a0e1234 100644 (file)
@@ -212,6 +212,10 @@ public class EmblEntry
         {
           for (DBRefEntry dbref : feature.dbRefs)
           {
+            /*
+             * convert UniProtKB/Swiss-Prot to UNIPROT
+             */
+            dbref.setSource(DBRefUtils.getCanonicalName(dbref.getSource()));
             dna.addDBRef(dbref);
           }
         }
@@ -419,14 +423,13 @@ public class EmblEntry
     }
 
     /*
-     * add dbRefs to sequence, and mappings for Uniprot xrefs
+     * add mappings for Uniprot xrefs
      */
     if (feature.dbRefs != null)
     {
       boolean mappingUsed = false;
       for (DBRefEntry ref : feature.dbRefs)
       {
-        ref.setSource(DBRefUtils.getCanonicalName(ref.getSource()));
         if (ref.getSource().equals(DBRefSource.UNIPROT))
         {
           String proteinSeqName = DBRefSource.UNIPROT + "|"
@@ -482,7 +485,6 @@ public class EmblEntry
             }
           }
         }
-        dna.addDBRef(ref);
       }
       if (noProteinDbref && product != null)
       {