Merge branch 'refactor/JAL-2106_sourceDbRef_revision' into trailm
[jalview.git] / src / jalview / api / DBRefEntryI.java
index 32245b3..701acb6 100644 (file)
@@ -70,4 +70,28 @@ public interface DBRefEntryI
    * @return
    */
   public boolean updateFrom(DBRefEntryI otherEntry);
+
+  /**
+   * Method to distinguish between direct and indirect database references
+   * 
+   * primary references indicate the local sequence data directly corresponds
+   * with the database record. All other references are secondary. direct
+   * references indicate that part or all of the local sequence data can be
+   * mapped with another sequence, enabling annotation transfer.
+   * cross-references indicate the local sequence data can be corresponded to
+   * some other linear coordinate system via a transformation.
+   * 
+   * This method is also sufficient to distinguish direct DBRefEntry mappings
+   * from other relationships - e.g. coding relationships (imply a 1:3/3:1
+   * mapping), but not transcript relationships, which imply a (possibly
+   * non-contiguous) 1:1 mapping
+   * 
+   * The only way a dbref's mappings can be fully verified is via the local
+   * sequence frame, so rather than use isPrimary directly, please use
+   * SequenceI.getPrimaryDbRefs()
+   *
+   * @return true if this reference provides a primary accession for the
+   *         associated sequence object
+   */
+  public boolean isPrimary();
 }