JAL-1238 method to test if DAS source is a primary reference source
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 18 Jan 2013 15:55:32 +0000 (15:55 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 18 Jan 2013 15:55:32 +0000 (15:55 +0000)
src/jalview/ws/dbsources/das/api/jalviewSourceI.java
src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java

index 1511e6b..308bc21 100644 (file)
@@ -74,4 +74,10 @@ public interface jalviewSourceI
    */
   boolean isNewerThan(jalviewSourceI jalviewSourceI);
 
+  /**
+   * test if the source is a reference source for the authority
+   * @return
+   */
+  boolean isReferenceSource();
+
 }
index 7bb6436..9650b8c 100644 (file)
@@ -99,6 +99,7 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
       throw new Exception("Source " + source.getTitle()
               + " does not support the sequence command.");
     }
+    this.tier = 1+((jsrc.isLocal() || jsrc.isReferenceSource()) ? 0 : 1);
     this.source = source;
     this.dbname = dbname;
     this.dbrefname = dbrefname.toUpperCase();