X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fxdb%2Fgenbank%2FGenBankReference.java;fp=src%2Fjalview%2Fio%2Fxdb%2Fgenbank%2FGenBankReference.java;h=17ad8b4422194338d86af2f71ac6f859014dcc7a;hb=96f10f96255b4e9bb88601ce01adbf5faf16544c;hp=74f008074027068c34921f3f7e7ca4c37372fcde;hpb=2d63cfb4d8f84de5f40670bb301ee8a22db321ff;p=jalview.git diff --git a/src/jalview/io/xdb/genbank/GenBankReference.java b/src/jalview/io/xdb/genbank/GenBankReference.java index 74f0080..17ad8b4 100644 --- a/src/jalview/io/xdb/genbank/GenBankReference.java +++ b/src/jalview/io/xdb/genbank/GenBankReference.java @@ -1,135 +1,176 @@ package jalview.io.xdb.genbank; -public class GenBankReference { - private int order; - private int begin; - private int end; - private String descriptor; - private String authors; - private String title; - private String journal; - private String pubmed; - private String medline; - private String consortia; - private String remark; - - public GenBankReference() { - super(); - } - - public String getDescriptor() { - return descriptor; - } - - public void setDescriptor(String descriptor) { - this.descriptor = descriptor; - } - - public String getAuthors() { - return authors; - } - - public void setAuthors(String authors) { - this.authors = authors; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getJournal() { - return journal; - } - - public void setJournal(String journal) { - this.journal = journal; - } - - public String getPubmed() { - return pubmed; - } - - public void setPubmed(String pubmed) { - this.pubmed = pubmed; - } - - public int getOrder() { - return order; - } - - public void setOrder(int order) { - this.order = order; - } - public int getBegin() { - return begin; - } - - public void setBegin(int begin) { - this.begin = begin; - } - - public int getEnd() { - return end; - } - - public void setEnd(int end) { - this.end = end; - } - - - public String getMedline() { - return medline; - } - - public void setMedline(String medline) { - this.medline = medline; - } - - public String getConsortia() { - return consortia; - } - - public void setConsortia(String consortia) { - this.consortia = consortia; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public String toString(){ -// References has the following format -// REFERENCE 1 (bases 1 to 1976) -// AUTHORS Spritz,R.A., DeRiel,J.K., Forget,B.G. and Weissman,S.M. -// TITLE Complete nucleotide sequence of the human delta-globin gene -// JOURNAL Cell 21 (3), 639-646 (1980) -// PUBMED 7438204 - - StringBuffer buf = new StringBuffer(); - buf.append("REFERENCE ").append(this.getOrder()).append(" (bases ").append(this.getBegin()).append(" to ").append(this.getEnd()).append(")\n"); - if (this.getAuthors()!=null) - buf.append(" AUTHORS ").append(this.getAuthors()).append("\n"); - if (this.getTitle()!=null) - buf.append(" TITLE ").append(this.getTitle()).append("\n"); - if (this.getJournal()!=null) - buf.append(" JOURNAL ").append(this.getJournal()).append("\n"); - if (this.getPubmed()!=null) - buf.append(" PUBMED ").append(this.getPubmed()).append("\n");; - if (this.getMedline()!=null) - buf.append(" MEDLINE ").append(this.getMedline()).append("\n");; - if (this.getRemark()!=null) - buf.append(" REMARK ").append(this.getRemark()).append("\n");; - if (this.getConsortia()!=null) - buf.append(" CONSRTM ").append(this.getConsortia()).append("\n");; - return buf.toString(); - } - +public class GenBankReference +{ + private int order; + + private int begin; + + private int end; + + private String descriptor; + + private String authors; + + private String title; + + private String journal; + + private String pubmed; + + private String medline; + + private String consortia; + + private String remark; + + public GenBankReference() + { + super(); + } + + public String getDescriptor() + { + return descriptor; + } + + public void setDescriptor(String descriptor) + { + this.descriptor = descriptor; + } + + public String getAuthors() + { + return authors; + } + + public void setAuthors(String authors) + { + this.authors = authors; + } + + public String getTitle() + { + return title; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getJournal() + { + return journal; + } + + public void setJournal(String journal) + { + this.journal = journal; + } + + public String getPubmed() + { + return pubmed; + } + + public void setPubmed(String pubmed) + { + this.pubmed = pubmed; + } + + public int getOrder() + { + return order; + } + + public void setOrder(int order) + { + this.order = order; + } + + public int getBegin() + { + return begin; + } + + public void setBegin(int begin) + { + this.begin = begin; + } + + public int getEnd() + { + return end; + } + + public void setEnd(int end) + { + this.end = end; + } + + public String getMedline() + { + return medline; + } + + public void setMedline(String medline) + { + this.medline = medline; + } + + public String getConsortia() + { + return consortia; + } + + public void setConsortia(String consortia) + { + this.consortia = consortia; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public String toString() + { + // References has the following format + // REFERENCE 1 (bases 1 to 1976) + // AUTHORS Spritz,R.A., DeRiel,J.K., Forget,B.G. and Weissman,S.M. + // TITLE Complete nucleotide sequence of the human delta-globin gene + // JOURNAL Cell 21 (3), 639-646 (1980) + // PUBMED 7438204 + + StringBuffer buf = new StringBuffer(); + buf.append("REFERENCE ").append(this.getOrder()).append(" (bases ") + .append(this.getBegin()).append(" to ").append(this.getEnd()) + .append(")\n"); + if (this.getAuthors() != null) + buf.append(" AUTHORS ").append(this.getAuthors()).append("\n"); + if (this.getTitle() != null) + buf.append(" TITLE ").append(this.getTitle()).append("\n"); + if (this.getJournal() != null) + buf.append(" JOURNAL ").append(this.getJournal()).append("\n"); + if (this.getPubmed() != null) + buf.append(" PUBMED ").append(this.getPubmed()).append("\n"); + ; + if (this.getMedline() != null) + buf.append(" MEDLINE ").append(this.getMedline()).append("\n"); + ; + if (this.getRemark() != null) + buf.append(" REMARK ").append(this.getRemark()).append("\n"); + ; + if (this.getConsortia() != null) + buf.append(" CONSRTM ").append(this.getConsortia()).append("\n"); + ; + return buf.toString(); + } + }