74f008074027068c34921f3f7e7ca4c37372fcde
[jalview.git] / src / jalview / io / xdb / genbank / GenBankReference.java
1 package jalview.io.xdb.genbank;
2
3 public class GenBankReference {
4         private int order;
5         private int begin;
6         private int end;
7         private String descriptor;
8         private String authors;
9         private String title;
10         private String journal;
11         private String pubmed;
12         private String medline;
13         private String consortia;
14         private String remark;
15
16         public GenBankReference() {
17                 super();
18         }
19
20         public String getDescriptor() {
21                 return descriptor;
22         }
23
24         public void setDescriptor(String descriptor) {
25                 this.descriptor = descriptor;
26         }
27
28         public String getAuthors() {
29                 return authors;
30         }
31
32         public void setAuthors(String authors) {
33                 this.authors = authors;
34         }
35
36         public String getTitle() {
37                 return title;
38         }
39
40         public void setTitle(String title) {
41                 this.title = title;
42         }
43
44         public String getJournal() {
45                 return journal;
46         }
47
48         public void setJournal(String journal) {
49                 this.journal = journal;
50         }
51
52         public String getPubmed() {
53                 return pubmed;
54         }
55
56         public void setPubmed(String pubmed) {
57                 this.pubmed = pubmed;
58         }
59
60         public int getOrder() {
61                 return order;
62         }
63
64         public void setOrder(int order) {
65                 this.order = order;
66         }
67         public int getBegin() {
68                 return begin;
69         }
70
71         public void setBegin(int begin) {
72                 this.begin = begin;
73         }
74
75         public int getEnd() {
76                 return end;
77         }
78
79         public void setEnd(int end) {
80                 this.end = end;
81         }
82         
83         
84         public String getMedline() {
85                 return medline;
86         }
87
88         public void setMedline(String medline) {
89                 this.medline = medline;
90         }
91
92         public String getConsortia() {
93                 return consortia;
94         }
95
96         public void setConsortia(String consortia) {
97                 this.consortia = consortia;
98         }
99
100         public String getRemark() {
101                 return remark;
102         }
103
104         public void setRemark(String remark) {
105                 this.remark = remark;
106         }
107
108         public String toString(){
109 //              References has the following format
110 //              REFERENCE   1  (bases 1 to 1976)
111 //                AUTHORS   Spritz,R.A., DeRiel,J.K., Forget,B.G. and Weissman,S.M.
112 //                TITLE     Complete nucleotide sequence of the human delta-globin gene
113 //                JOURNAL   Cell 21 (3), 639-646 (1980)
114 //                 PUBMED   7438204
115                 
116                 StringBuffer buf = new StringBuffer();
117                 buf.append("REFERENCE   ").append(this.getOrder()).append("  (bases ").append(this.getBegin()).append(" to ").append(this.getEnd()).append(")\n");
118                 if (this.getAuthors()!=null)
119                         buf.append("  AUTHORS   ").append(this.getAuthors()).append("\n");
120                 if (this.getTitle()!=null)
121                         buf.append("  TITLE     ").append(this.getTitle()).append("\n");
122                 if (this.getJournal()!=null)
123                         buf.append("  JOURNAL   ").append(this.getJournal()).append("\n");
124                 if (this.getPubmed()!=null)
125                         buf.append("  PUBMED   ").append(this.getPubmed()).append("\n");;
126                 if (this.getMedline()!=null)
127                         buf.append("  MEDLINE   ").append(this.getMedline()).append("\n");;
128                 if (this.getRemark()!=null)
129                         buf.append("  REMARK   ").append(this.getRemark()).append("\n");;
130                 if (this.getConsortia()!=null)
131                         buf.append("  CONSRTM   ").append(this.getConsortia()).append("\n");;
132                 return buf.toString();
133         }
134         
135 }