3 import jalview.datamodel.Mapping;
5 //JBPComment: this is a datamodel API - so it should be in datamodel (it's a peer of SequenceI)
7 public interface DBRefEntryI
9 public boolean equalRef(DBRefEntryI entry);
13 * @return Source DB name for this entry
15 public String getSource();
19 * @return Accession Id for this entry
21 public String getAccessionId();
26 * Accession Id for this entry
28 public void setAccessionId(String accessionId);
33 * Source DB name for this entry
35 public void setSource(String source);
39 * @return Source DB version for this entry
41 public String getVersion();
46 * Source DB version for this entry
48 public void setVersion(String version);
51 * access a mapping, if present that can be used to map positions from the
52 * associated dataset sequence to the DBRef's sequence frame.
54 * @return null or a valid mapping.
56 public Mapping getMap();
59 * Answers true if this object is either equivalent to, or can be 'improved'
60 * by, the given entry. Specifically, answers true if
62 * <li>source and accession are identical</li>
63 * <li>version is identical, or this version is of the format "someSource:0",
64 * in which case the version for the other entry replaces it</li>
65 * <li>mappings are not compared but if this entry has no mapping, replace
66 * with that for the other entry</li>
72 public boolean updateFrom(DBRefEntryI otherEntry);
75 * Method to distinguish between direct and indirect database references
77 * primary references indicate the local sequence data directly corresponds
78 * with the database record. All other references are secondary. direct
79 * references indicate that part or all of the local sequence data can be
80 * mapped with another sequence, enabling annotation transfer.
81 * cross-references indicate the local sequence data can be corresponded to
82 * some other linear coordinate system via a transformation.
84 * This method is also sufficient to distinguish direct DBRefEntry mappings
85 * from other relationships - e.g. coding relationships (imply a 1:3/3:1
86 * mapping), but not transcript relationships, which imply a (possibly
87 * non-contiguous) 1:1 mapping
89 * The only way a dbref's mappings can be fully verified is via the local
90 * sequence frame, so rather than use isPrimary directly, please use
91 * SequenceI.getPrimaryDbRefs()
93 * @return true if this reference provides a primary accession for the
94 * associated sequence object
96 public boolean isPrimary();