/** * Collects things from given xrefs. * @param xrefs * @return whatever collected */ private Set<String> harvestXrefs(Set<PublicationXref> xrefs, String dbID) { Set<String> set = new HashSet<String>(); for (PublicationXref xref : xrefs) { if (xref.getDb() != null && xref.getDb().equalsIgnoreCase(dbID)) if (xref.getId() != null && !xref.getId().isEmpty()) set.add(xref.getId()); } return set; }
PublicationXref pubXref = (PublicationXref) xref; Publication publication = new Publication(); publication.setSource(pubXref.getDb()); publication.setId(pubXref.getId()); publication.setTitle(pubXref.getTitle()); publication.setYear(pubXref.getYear()); for (String author : pubXref.getAuthor()) { publication.setAuthor(author); for (String source : pubXref.getSource()) { publication.setJournal(source);
PublicationXref pubXref = (PublicationXref) xref; Publication publication = new Publication(); publication.setSource(pubXref.getDb()); publication.setId(pubXref.getId()); publication.setTitle(pubXref.getTitle()); publication.setYear(pubXref.getYear()); for (String author : pubXref.getAuthor()) { publication.setAuthor(author); for (String source : pubXref.getSource()) { publication.setJournal(source);
PublicationXref xl = (PublicationXref) link; temp.append(" "); if (!xl.getAuthor().isEmpty()) { temp.append(xl.getAuthor().toString() + " et al., "); if (xl.getTitle() != null) { temp.append(xl.getTitle()); if (!xl.getSource().isEmpty()) { temp.append(" (" + xl.getSource().toString()); if (xl.getYear() > 0) { temp.append(", " + xl.getYear());
PublicationXref xl = (PublicationXref) link; temp.append(" "); if (!xl.getAuthor().isEmpty()) { temp.append(xl.getAuthor().toString() + " et al., "); if (xl.getTitle() != null) { temp.append(xl.getTitle()); if (!xl.getSource().isEmpty()) { temp.append(" (" + xl.getSource().toString()); if (xl.getYear() > 0) { temp.append(", " + xl.getYear());