X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fapi%2FDBRefEntryI.java;h=52ee381454316a90ba1cd0b3d268c1c5bf688204;hb=fecb7871ff2ec644c4f3c9ea513df7c0fce30514;hp=32245b3354c03d9e1ddb3c65914b95c780f698a7;hpb=7596cd64543481df859a9bd2e73a3b3bb6b2e42c;p=jalview.git diff --git a/src/jalview/api/DBRefEntryI.java b/src/jalview/api/DBRefEntryI.java index 32245b3..52ee381 100644 --- a/src/jalview/api/DBRefEntryI.java +++ b/src/jalview/api/DBRefEntryI.java @@ -70,4 +70,25 @@ public interface DBRefEntryI * @return */ public boolean updateFrom(DBRefEntryI otherEntry); + + /** + * Answers true if the ref looks like a primary (direct) database reference.
+ * The only way a dbref's mappings can be fully verified is via the local + * sequence frame, so rather than use isPrimaryCandidate directly, please use + * SequenceI.getPrimaryDbRefs().
+ * 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. + * + * @return true if this reference provides a primary accession for the + * associated sequence object + */ + public boolean isPrimaryCandidate(); }