}
@Override
protected SyndEntry createSyndEntry(final Item item, final boolean preserveWireItem) {
final SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem);
// adding native feed author to DC creators list
final String author = item.getAuthor();
if (author != null) {
final List<String> creators = ((DCModule) syndEntry.getModule(DCModule.URI)).getCreators();
if (!creators.contains(author)) {
// using a set to remove duplicates
final Set<String> s = new LinkedHashSet<String>();
// DC creators
s.addAll(creators);
// feed native author
s.add(author);
creators.clear();
creators.addAll(s);
}
}
final Guid guid = item.getGuid();
final String itemLink = item.getLink();
if (guid != null) {
final String guidValue = guid.getValue();
syndEntry.setUri(guidValue);
if (itemLink == null && guid.isPermaLink()) {
syndEntry.setLink(guidValue);
}
} else {
syndEntry.setUri(itemLink);
}
if (item.getComments() != null) {
final SyndLinkImpl comments = new SyndLinkImpl();
comments.setRel("comments");