3 import jalview.datamodel.DBRefEntry;
4 import jalview.datamodel.Mapping;
6 //JBPComment: this is a datamodel API - so it should be in datamodel (it's a peer of SequenceI)
8 public interface DBRefEntryI
10 public boolean equalRef(DBRefEntryI entry);
14 * @return Source DB name for this entry
16 public String getSource();
20 * @return Accession Id for this entry
22 public String getAccessionId();
27 * Accession Id for this entry
29 public void setAccessionId(String accessionId);
34 * Source DB name for this entry
36 public void setSource(String source);
40 * @return Source DB version for this entry
42 public String getVersion();
47 * Source DB version for this entry
49 public void setVersion(String version);
54 * index of start residue in the source DB
56 public void setStartRes(int startRes);
60 * @return index of start residue in the source DB
62 public int getStartRes();
67 * index of end residue in the source DB
69 public void setEndRes(int endRes);
73 * @return index of end residue in the source DB
75 public int getEndRes();
77 public Mapping getMap();
80 * Answers true if this object is either equivalent to, or can be 'improved'
81 * by, the given entry. Specifically, answers true if
83 * <li>source and accession are identical</li>
84 * <li>version is identical, or this version is of the format "someSource:0",
85 * in which case the version for the other entry replaces it</li>
86 * <li>mappings are not compared but if this entry has no mapping, replace
87 * with that for the other entry</li>
93 public boolean updateFrom(DBRefEntry otherEntry);