DataType<?> itemClassType, DataType<?> itemXMLType, Mediator mediator,
Factory factory) {
Object key = entry.getKey();
Object data = entry.getData();
if (data instanceof Item) {
Item item = (Item)data;
org.apache.abdera.model.Entry feedEntry = factory.newEntry();
if (key != null) {
feedEntry.setId(key.toString());
}
feedEntry.setTitle(item.getTitle());
feedEntry.setContentAsHtml(item.getContents());
String href = item.getLink();
if (href == null && key != null) {
href = key.toString();
}
if (href != null) {
feedEntry.addLink(href);
}
String related = item.getRelated();
if (related != null) {
feedEntry.addLink(related, "related");
}
String alternate = item.getAlternate();
if (alternate != null) {
feedEntry.addLink(alternate, "alternate");
}
Date date = item.getDate();
if (date != null) {
feedEntry.setUpdated(date);
}
return feedEntry;