Merge branch 'develop' into efficiency/JAL-2034_JAL-1421
[jalview.git] / src / jalview / datamodel / DBRefEntry.java
index 738c4dc..a641b1b 100755 (executable)
@@ -25,8 +25,6 @@ import jalview.api.DBRefEntryI;
 public class DBRefEntry implements DBRefEntryI
 {
   String source = "", version = "", accessionId = "";
-
-  private int startRes, endRes;
   /**
    * maps from associated sequence to the database sequence's coordinate system
    */
@@ -112,7 +110,7 @@ public class DBRefEntry implements DBRefEntryI
    * @return
    */
   @Override
-  public boolean updateFrom(DBRefEntry other)
+  public boolean updateFrom(DBRefEntryI other)
   {
     if (other == null)
     {
@@ -150,6 +148,7 @@ public class DBRefEntry implements DBRefEntryI
      * otherwise the versions have to match
      */
     String otherVersion = other.getVersion();
+      
     if ((version == null || version.equals("0") || version.endsWith(":0"))
             && otherVersion != null)
     {
@@ -157,7 +156,9 @@ public class DBRefEntry implements DBRefEntryI
     }
     else
     {
-      if (!version.equalsIgnoreCase(otherVersion))
+      if (version != null
+              && (otherVersion == null || !version
+                      .equalsIgnoreCase(otherVersion)))
       {
         return false;
       }
@@ -279,28 +280,4 @@ public class DBRefEntry implements DBRefEntryI
   {
     return getSrcAccString();
   }
-
-  @Override
-  public int getStartRes()
-  {
-    return startRes;
-  }
-
-  @Override
-  public void setStartRes(int startRes)
-  {
-    this.startRes = startRes;
-  }
-
-  @Override
-  public int getEndRes()
-  {
-    return endRes;
-  }
-
-  @Override
-  public void setEndRes(int endRes)
-  {
-    this.endRes = endRes;
-  }
 }