*/
private Entry createFeedEntry(org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry) {
Object key = entry.getKey();
Object data = entry.getData();
if (data instanceof Item) {
Item item = (Item)data;
Entry feedEntry = new Entry();
feedEntry.setId(key.toString());
feedEntry.setTitle(item.getTitle());
String value = item.getContents();
if (value != null) {
Content content = new Content();
content.setType("text/xml");
content.setValue(value);
List<Content> contents = new ArrayList<Content>();
contents.add(content);
feedEntry.setContents(contents);
}
String href = item.getLink();
if (href == null) {
href = key.toString();
}
Link link = new Link();
link.setRel("edit");
link.setHref(href);
feedEntry.getOtherLinks().add(link);
link = new Link();
link.setRel("alternate");
link.setHref(href);
feedEntry.getAlternateLinks().add(link);
Date date = item.getDate();
if (date == null) {
date = new Date();
}
feedEntry.setCreated(date);
return feedEntry;