if (itemClassType.getPhysical() == Item.class) {
String key = feedEntry.getId().toString();
Item item = new Item();
item.setTitle(feedEntry.getTitle().toString());
TextContent content = (TextContent)feedEntry.getContent();
item.setContents(content.getContent().getPlainText());
for (com.google.gdata.data.Link link : feedEntry.getLinks()) {
if (link.getRel() == null || "self".equals(link.getRel())) {
if (item.getLink() == null) {
item.setLink(link.getHref().toString());
}
} else if ("related".equals(link.getRel())) {
item.setRelated(link.getHref().toString());
} else if ("alternate".equals(link.getRel())) {
item.setAlternate(link.getHref().toString());
}
}
Date date = new Date(feedEntry.getUpdated().getValue());
item.setDate(date);
return new Entry<Object, Object>(key, item);
} else {
String key = null;
if (feedEntry.getId() != null) {
key = feedEntry.getId();
}
// Create the item from XML
if (feedEntry.getContent() == null) {
return null;
}
TextContent content = (TextContent)feedEntry.getContent();
String value = content.getContent().getPlainText();
Object data = mediator.mediate(value, itemXMLType, itemClassType, null);
return new Entry<Object, Object>(key, data);
}
} else {
return null;