JAL-1942 JAL-1479 refactored SequenceI.getDBRef/SequenceI.setDBRef to SequenceI.getDB...
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 5 Nov 2015 12:58:32 +0000 (12:58 +0000)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 5 Nov 2015 12:58:32 +0000 (12:58 +0000)
src/MCview/PDBfile.java
src/jalview/datamodel/Sequence.java
src/jalview/datamodel/SequenceGroup.java
src/jalview/datamodel/SequenceI.java
test/jalview/analysis/AlignmentUtilsTests.java

index a7ecc52..58611e2 100755 (executable)
@@ -25,6 +25,7 @@ import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
 import jalview.io.FileParse;
@@ -312,7 +313,7 @@ public class PDBfile extends jalview.io.AlignFile
 
     DBRefEntry sourceDBRef = new DBRefEntry();
     sourceDBRef.setAccessionId(id);
-    sourceDBRef.setSource("PDB");
+    sourceDBRef.setSource(DBRefSource.PDB);
     sourceDBRef.setStartRes(pdbSequence.getStart());
     sourceDBRef.setEndRes(pdbSequence.getEnd());
     pdbSequence.setSourceDBRef(sourceDBRef);
index fd710bd..ac2f9c1 100755 (executable)
@@ -912,7 +912,7 @@ public class Sequence extends ASequence implements SequenceI
   }
 
   @Override
-  public void setDBRef(DBRefEntry[] dbref)
+  public void setDBRefs(DBRefEntry[] dbref)
   {
     dbrefs = dbref;
   }
@@ -1080,8 +1080,8 @@ public class Sequence extends ASequence implements SequenceI
       datasetSequence.setDescription(getDescription());
       setSequenceFeatures(null);
       // move database references onto dataset sequence
-      datasetSequence.setDBRef(getDBRefs());
-      setDBRef(null);
+      datasetSequence.setDBRefs(getDBRefs());
+      setDBRefs(null);
       datasetSequence.setPDBId(getAllPDBEntries());
       setPDBId(null);
       datasetSequence.updatePDBIds();
index d79a5f7..0e8fa17 100755 (executable)
@@ -209,7 +209,7 @@ public class SequenceGroup implements AnnotatedCollectionI
       if (seqs[ipos] != null)
       {
         seqs[ipos].setDescription(seq.getDescription());
-        seqs[ipos].setDBRef(seq.getDBRefs());
+        seqs[ipos].setDBRefs(seq.getDBRefs());
         seqs[ipos].setSequenceFeatures(seq.getSequenceFeatures());
         if (seq.getDatasetSequence() != null)
         {
index 50f88f3..f1cba43 100755 (executable)
@@ -298,7 +298,7 @@ public interface SequenceI extends ASequenceI
 
   public void setVamsasId(String id);
 
-  public void setDBRef(DBRefEntry[] dbs);
+  public void setDBRefs(DBRefEntry[] dbs);
 
   public DBRefEntry[] getDBRefs();
 
index 9756849..74e4940 100644 (file)
@@ -988,7 +988,7 @@ public class AlignmentUtilsTests
     assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1));
 
     // now the other way round
-    seq1.setDBRef(null);
+    seq1.setDBRefs(null);
     seq2.addDBRef(new DBRefEntry("EMBL", "1", "A12345"));
     assertTrue(AlignmentUtils.haveCrossRef(seq1, seq2));
     assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1));