Repository navigation
Expand file tree
/
Copy pathJournalArticle.java
More file actions
280 lines (246 loc) · 6.22 KB
/
Copy pathJournalArticle.java
File metadata and controls
280 lines (246 loc) · 6.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
/*
* BioJava development code
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. If you do not have a copy,
* see:
*
* http://www.gnu.org/copyleft/lesser.html
*
* Copyright for this code is held jointly by the individual
* authors. These should be listed in @author doc comments.
*
* For more information on the BioJava project and its aims,
* or to join the biojava-l mailing list, visit the home page
* at:
*
* http://www.biojava.org/
*
*/
package org.biojava.nbio.structure;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* PDB-specific
* @author Jules Jacobsen
* @since 1.7
*/
public class JournalArticle implements Serializable {
private static final long serialVersionUID = 5062668226159515468L;
private List<Author> authorList = new ArrayList<Author>();
private List<Author> editorList = new ArrayList<Author>();
private String title = "";
private String ref = "";
private String journalName = "";
private String volume;
private String startPage;
private int publicationDate;
private String publisher = "";
private String refn = "";
private String pmid = "";
private String doi = "";
private boolean published = false;
/**
* Get the list of Authors of the JournalArticle
*
* @return the List of authors
*/
public List<Author> getAuthorList() {
return authorList;
}
public void setAuthorList(List<Author> authorList) {
this.authorList = authorList;
}
/**
* Get the list of editors of the JournalArticle
*
* @return the List of editors
*/
public List<Author> getEditorList() {
return editorList;
}
public void setEditorList(List<Author> editorList) {
this.editorList = editorList;
}
/**
* Get the value of DOI field.
* For example: 10.1016/S0969-2126(02)00720-7
*
* @return the value of doi
*/
public String getDoi() {
return doi;
}
/**
* Set the value of doi
*
* @param doi new value of doi
*/
public void setDoi(String doi) {
this.doi = doi;
}
/**
* Sets the publication state of a JournalArticle - TO BE PUBLISHED == false
* @param state
*/
public void setIsPublished(Boolean state) {
this.published = state;
}
/**
* Get the value of PMID field.
* For example: 12005435
*
* @return the value of pmid
*/
public String getPmid() {
return pmid;
}
/**
* Set the value of pmid
*
* @param pmid new value of pmid
*/
public void setPmid(String pmid) {
this.pmid = pmid;
}
/**
* Get the value of REF field.
* For example: TO BE PUBLISHED
*
* @return the value of ref
*/
public String getRef() {
return ref;
}
/**
* Set the value of the ref.
*
* @param ref new value of ref
*/
public void setRef(String ref) {
this.ref = ref;
}
/**
* Get the value of REFN field.
* For example: ISSN 0969-2126
*
* @return the value of ref
*/
public String getRefn() {
return refn;
}
/**
* Set the value of the refn
*
* @param refn new value of refn
*/
public void setRefn(String refn) {
this.refn = refn;
}
/**
* Get the value of title
*
* @return the value of title
*/
public String getTitle() {
return title;
}
/**
* Set the value of title
*
* @param title new value of title
*/
public void setTitle(String title) {
this.title = title;
}
public String getJournalName() {
return journalName;
}
public void setJournalName(String journalName) {
this.journalName = journalName;
}
public int getPublicationDate() {
return publicationDate;
}
public void setPublicationDate(int publicationDate) {
this.publicationDate = publicationDate;
}
public boolean isPublished() {
return published;
}
public void setPublished(boolean published) {
this.published = published;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public String getStartPage() {
return startPage;
}
public void setStartPage(String startPage) {
this.startPage = startPage;
}
public String getVolume() {
return volume;
}
public void setVolume(String volume) {
this.volume = volume;
}
@Override
public String toString() {
// JRNL AUTH M.HAMMEL,G.SFYROERA,D.RICKLIN,P.MAGOTTI,
// JRNL AUTH 2 J.D.LAMBRIS,B.V.GEISBRECHT
// JRNL TITL A STRUCTURAL BASIS FOR COMPLEMENT INHIBITION BY
// JRNL TITL 2 STAPHYLOCOCCUS AUREUS.
// JRNL REF NAT.IMMUNOL. V. 8 430 2007
// JRNL REFN ISSN 1529-2908
// JRNL PMID 17351618
// JRNL DOI 10.1038/NI1450
String eol = System.getProperty("line.separator");
StringBuilder jrnlString = new StringBuilder();
StringBuilder authString = new StringBuilder("JRNL AUTH ");
StringBuilder titlString = new StringBuilder("JRNL TITL ");
StringBuilder editString = new StringBuilder("JRNL EDIT ");
StringBuilder refString = new StringBuilder("JRNL REF ");
StringBuilder publString = new StringBuilder("JRNL PUBL ");
StringBuilder refnString = new StringBuilder("JRNL REFN ");
StringBuilder pmidString = new StringBuilder("JRNL PMID ");
StringBuilder doiString = new StringBuilder("JRNL DOI ");
for (Author author : authorList) {
authString.append(author).append(",");
}
jrnlString.append(authString).append(eol);
titlString.append(title);
jrnlString.append(titlString).append(eol);
if (!editorList.isEmpty()) {
for (Author editor : editorList) {
editString.append(editor).append(",");
}
jrnlString.append(editString).append(eol);
}
refString.append(ref);
jrnlString.append(refString).append(eol);
if (!publisher.equals("")) {
publString.append(publisher);
jrnlString.append(publString).append(eol);
}
if (!refn.equals("")) {
refnString.append(refn);
jrnlString.append(refnString).append(eol);
}
if (!pmid.equals("")) {
pmidString.append(pmid);
jrnlString.append(pmidString).append(eol);
}
if (!doi.equals("")) {
doiString.append(doi);
jrnlString.append(doiString).append(eol);
}
return jrnlString.toString();
}
}