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