Jalview.isJS() --> Platform.isJS(), DBRefEntry[] --> List<DBRefEntry>
[jalview.git] / src / jalview / datamodel / SequenceI.java
index 48615f0..9e9758c 100755 (executable)
@@ -22,6 +22,7 @@ package jalview.datamodel;
 
 import jalview.datamodel.features.SequenceFeaturesI;
 import jalview.util.MapList;
+import jalview.ws.params.InvalidArgumentException;
 
 import java.util.BitSet;
 import java.util.Iterator;
@@ -353,14 +354,20 @@ public interface SequenceI extends ASequenceI
   /**
    * set the array of Database references for the sequence.
    * 
+   * BH 2019.01.25 added throw
+   * 
    * @param dbs
+ * @throws InvalidArgumentException 
    * @deprecated - use is discouraged since side-effects may occur if DBRefEntry
    *             set are not normalised.
+   * @throws InvalidArgumentException if the is not one created by Sequence itself
    */
   @Deprecated
-  public void setDBRefs(DBRefEntry[] dbs);
+  public void setDBRefs(List<DBRefEntry> dbs) throws InvalidArgumentException;
+
+  public List<DBRefEntry> getDBRefs();
 
-  public DBRefEntry[] getDBRefs();
+  public void getDBRefsFrom(SequenceI seq);
 
   /**
    * add the given entry to the list of DBRefs for this sequence, or replace a
@@ -576,4 +583,6 @@ public interface SequenceI extends ASequenceI
    * @return first residue not contained in regions
    */
   public int firstResidueOutsideIterator(Iterator<int[]> it);
+
 }
+