public static void mergeAuthors(SyndEntry entry) { if (CollectionUtils.isEmpty(entry.getAuthors())) { entry.setAuthors(Collections.singletonList(entry.getAuthor())); } }
@Override public EmailAddress getFrom() { if (from == null) { final SyndPerson author = (SyndPerson) rssEntry.getAuthors().get(0); from = new EmailAddress(author.getName(), author.getEmail()); } return from; }
protected Item createRSSItem(SyndEntry sEntry) { Item item = super.createRSSItem(sEntry); if (sEntry.getAuthors()!=null && sEntry.getAuthors().size() > 0) { SyndPerson author = (SyndPerson)sEntry.getAuthors().get(0); item.setAuthor(author.getEmail()); } Guid guid = null; String uri = sEntry.getUri(); if (uri!=null) { guid = new Guid(); guid.setPermaLink(false); guid.setValue(uri); } else { String link = sEntry.getLink(); if (link!=null) { guid = new Guid(); guid.setPermaLink(true); guid.setValue(link); } } item.setGuid(guid); return item; }
protected Item createRSSItem(SyndEntry sEntry) { Item item = super.createRSSItem(sEntry); if (sEntry.getAuthors()!=null && sEntry.getAuthors().size() > 0) { SyndPerson author = (SyndPerson)sEntry.getAuthors().get(0); item.setAuthor(author.getEmail()); } Guid guid = null; String uri = sEntry.getUri(); if (uri!=null) { guid = new Guid(); guid.setPermaLink(false); guid.setValue(uri); } else { String link = sEntry.getLink(); if (link!=null) { guid = new Guid(); guid.setPermaLink(true); guid.setValue(link); } } item.setGuid(guid); return item; }
private static List<Document> extractDocuments(Pair<SyndFeed, List<SyndEntry>> feedEntry) { List<Document> ret = new ArrayList<>(); feedEntry.getRight().forEach(e -> { FeedUtils.mergeAuthors(e); String description = e.getDescription() != null ? FeedUtils.clean(e.getDescription().getValue()) : StringUtils.EMPTY; if (description.length() > FeedConstants.MAX_DESCRIP_LEN) { description = FeedUtils.truncate(description, FeedConstants.MAX_DESCRIP_LEN); } ret.add(Document.of( StringEscapeUtils.unescapeHtml4(e.getTitle()), e.getPublishedDate(), e.getAuthors(), description, e.getLink(), feedEntry.getLeft().getTitle() )); }); return ret; }
@Override protected Item createRSSItem(SyndEntry sEntry) { Item item = super.createRSSItem(sEntry); if (sEntry.getAuthors()!=null && sEntry.getAuthors().size() > 0) { SyndPerson author = (SyndPerson)sEntry.getAuthors().get(0); item.setAuthor(author.getEmail()); } Guid guid = null; String uri = sEntry.getUri(); if (uri!=null) { guid = new Guid(); guid.setPermaLink(false); guid.setValue(uri); } else { String link = sEntry.getLink(); if (link!=null) { guid = new Guid(); guid.setPermaLink(true); guid.setValue(link); } } item.setGuid(guid); SyndLink comments = sEntry.findRelatedLink("comments"); if(comments != null && (comments.getType() == null || comments.getType().endsWith("html"))){ item.setComments(comments.getHref()); } return item; }
@Override protected Item createRSSItem(SyndEntry sEntry) { Item item = super.createRSSItem(sEntry); if (sEntry.getAuthors()!=null && sEntry.getAuthors().size() > 0) { SyndPerson author = (SyndPerson)sEntry.getAuthors().get(0); item.setAuthor(author.getEmail()); } Guid guid = null; String uri = sEntry.getUri(); if (uri!=null) { guid = new Guid(); guid.setPermaLink(false); guid.setValue(uri); } else { String link = sEntry.getLink(); if (link!=null) { guid = new Guid(); guid.setPermaLink(true); guid.setValue(link); } } item.setGuid(guid); SyndLink comments = sEntry.findRelatedLink("comments"); if(comments != null && (comments.getType() == null || comments.getType().endsWith("html"))){ item.setComments(comments.getHref()); } return item; }
@SuppressWarnings("unchecked") List<SyndContent> contents = entry.getContents(); SyndPerson person = (SyndPerson) entry.getAuthors().get(0); String author = person.getName(); String username = getUsername(person);
List sAuthors = sEntry.getAuthors(); if (sAuthors!=null && sAuthors.size() > 0) { aEntry.setAuthors(createAtomPersons(sAuthors));
List sAuthors = sEntry.getAuthors(); if (sAuthors!=null && sAuthors.size() > 0) { aEntry.setAuthors(createAtomPersons(sAuthors));
List sAuthors = sEntry.getAuthors(); if (sAuthors!=null && sAuthors.size() > 0) { aEntry.setAuthors(createAtomPersons(sAuthors));
aEntry.setContents(createAtomContents(syndContents)); List authors = sEntry.getAuthors(); if (authors!=null && authors.size() > 0) { aEntry.setAuthors(ConverterForAtom03.createAtomPersons(authors));
aEntry.setContents(createAtomContents(syndContents)); List authors = sEntry.getAuthors(); if (authors!=null && authors.size() > 0) { aEntry.setAuthors(ConverterForAtom03.createAtomPersons(authors));
aEntry.setContents(createAtomContents(syndContents)); List authors = sEntry.getAuthors(); if (authors!=null && authors.size() > 0) { aEntry.setAuthors(ConverterForAtom03.createAtomPersons(authors));
List sAuthors = sEntry.getAuthors(); if (sAuthors!=null && sAuthors.size() > 0) { aEntry.setAuthors(createAtomPersons(sAuthors));
aEntry.setContents(createAtomContents(syndContents)); List authors = sEntry.getAuthors(); if (authors!=null && authors.size() > 0) { aEntry.setAuthors(ConverterForAtom03.createAtomPersons(authors));