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);
53 * index of start residue in the source DB
55 public void setStartRes(int startRes);
59 * @return index of start residue in the source DB
61 public int getStartRes();
66 * index of end residue in the source DB
68 public void setEndRes(int endRes);
72 * @return index of end residue in the source DB
74 public int getEndRes();
77 * access a mapping, if present that can be used to map positions from the
78 * associated dataset sequence to the DBRef's sequence frame.
80 * @return null or a valid mapping.
82 public Mapping getMap();
85 * Answers true if this object is either equivalent to, or can be 'improved'
86 * by, the given entry. Specifically, answers true if
88 * <li>source and accession are identical</li>
89 * <li>version is identical, or this version is of the format "someSource:0",
90 * in which case the version for the other entry replaces it</li>
91 * <li>mappings are not compared but if this entry has no mapping, replace
92 * with that for the other entry</li>
98 public boolean updateFrom(DBRefEntryI otherEntry);