}
protected void populateEntry(final Entry entry, final Element eEntry) throws FeedException {
final Content titleEx = entry.getTitleEx();
if (titleEx != null) {
final Element titleElement = new Element("title", getFeedNamespace());
fillContentElement(titleElement, titleEx);
eEntry.addContent(titleElement);
}
final List<Link> alternateLinks = entry.getAlternateLinks();
if (alternateLinks != null) {
for (final Link link : alternateLinks) {
eEntry.addContent(generateLinkElement(link));
}
}
final List<Link> otherLinks = entry.getOtherLinks();
if (otherLinks != null) {
for (final Link link : otherLinks) {
eEntry.addContent(generateLinkElement(link));
}
}
final List<Category> cats = entry.getCategories();
if (cats != null) {
for (final Category category : cats) {
eEntry.addContent(generateCategoryElement(category));
}
}
final List<SyndPerson> authors = entry.getAuthors();
if (Lists.isNotEmpty(authors)) {
for (final SyndPerson author : authors) {
final Element authorElement = new Element("author", getFeedNamespace());
fillPersonElement(authorElement, author);
eEntry.addContent(authorElement);
}
}
final List<SyndPerson> contributors = entry.getContributors();
if (Lists.isNotEmpty(contributors)) {
for (final SyndPerson contributor : contributors) {
final Element contributorElement = new Element("contributor", getFeedNamespace());
fillPersonElement(contributorElement, contributor);
eEntry.addContent(contributorElement);
}
}
final String id = entry.getId();
if (id != null) {
eEntry.addContent(generateSimpleElement("id", id));
}
final Date updated = entry.getUpdated();
if (updated != null) {
final Element updatedElement = new Element("updated", getFeedNamespace());
updatedElement.addContent(DateParser.formatW3CDateTime(updated, Locale.US));
eEntry.addContent(updatedElement);
}
final Date published = entry.getPublished();
if (published != null) {
final Element publishedElement = new Element("published", getFeedNamespace());
publishedElement.addContent(DateParser.formatW3CDateTime(published, Locale.US));
eEntry.addContent(publishedElement);
}
final List<Content> contents = entry.getContents();
if (Lists.isNotEmpty(contents)) {
final Element contentElement = new Element("content", getFeedNamespace());
final Content content = contents.get(0);
fillContentElement(contentElement, content);
eEntry.addContent(contentElement);
}
final Content summary = entry.getSummary();
if (summary != null) {
final Element summaryElement = new Element("summary", getFeedNamespace());
fillContentElement(summaryElement, summary);
eEntry.addContent(summaryElement);
}