public XBELCitation convert(Citation source) {
if (source == null) {
return null;
}
XBELCitation xc = new XBELCitation();
xc.setDate(source.getDate());
xc.setComment(source.getComment());
xc.setReference(source.getReference());
xc.setName(source.getName());
org.openbel.framework.common.enums.CitationType type = source.getType();
if (type != null) {
CitationType ct = CitationType.fromValue(type.getDisplayValue());
xc.setType(ct);
}
List<String> authors = source.getAuthors();
if (hasItems(authors)) {
AuthorGroup ag = new AuthorGroup();
List<String> xauthors = ag.getAuthor();
for (final String author : authors) {
xauthors.add(author);
}
xc.setAuthorGroup(ag);
}
return xc;
}