X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2FDBRefEntryI.java;h=2ce7e4a3ed7980ee5a13e00de24edfd7f9093b6c;hb=f7c9911a43d7b85a3f0097eb99825b73f3a95713;hp=731c25895417568cabe3acb9b86a8b770d960920;hpb=1503bcb2b548b7f6bc11bcbf081455ab94839099;p=jalview.git diff --git a/src/jalview/api/DBRefEntryI.java b/src/jalview/api/DBRefEntryI.java index 731c258..2ce7e4a 100644 --- a/src/jalview/api/DBRefEntryI.java +++ b/src/jalview/api/DBRefEntryI.java @@ -1,19 +1,99 @@ package jalview.api; +import jalview.datamodel.Mapping; + +//JBPComment: this is a datamodel API - so it should be in datamodel (it's a peer of SequenceI) public interface DBRefEntryI { public boolean equalRef(DBRefEntryI entry); + /** + * + * @return Source DB name for this entry + */ public String getSource(); - public String getVersion(); - + /** + * + * @return Accession Id for this entry + */ public String getAccessionId(); + /** + * + * @param accessionId + * Accession Id for this entry + */ public void setAccessionId(String accessionId); + /** + * + * @param source + * Source DB name for this entry + */ public void setSource(String source); + /** + * + * @return Source DB version for this entry + */ + public String getVersion(); + + /** + * + * @param version + * Source DB version for this entry + */ public void setVersion(String version); + + /** + * + * @param startRes + * index of start residue in the source DB + */ + public void setStartRes(int startRes); + + /** + * + * @return index of start residue in the source DB + */ + public int getStartRes(); + + /** + * + * @param endRes + * index of end residue in the source DB + */ + public void setEndRes(int endRes); + + /** + * + * @return index of end residue in the source DB + */ + public int getEndRes(); + + /** + * access a mapping, if present that can be used to map positions from the + * associated dataset sequence to the DBRef's sequence frame. + * + * @return null or a valid mapping. + */ + public Mapping getMap(); + + /** + * Answers true if this object is either equivalent to, or can be 'improved' + * by, the given entry. Specifically, answers true if + * + * + * @param otherEntry + * @return + */ + public boolean updateFrom(DBRefEntryI otherEntry); }