2013-05-21 10:17:29 +02:00
|
|
|
package com.commafeed.backend.rome;
|
|
|
|
|
|
|
|
|
|
import org.jdom.Element;
|
|
|
|
|
|
|
|
|
|
import com.sun.syndication.feed.rss.Description;
|
|
|
|
|
import com.sun.syndication.feed.rss.Item;
|
|
|
|
|
import com.sun.syndication.io.impl.RSS090Parser;
|
|
|
|
|
|
2013-07-26 16:00:02 +02:00
|
|
|
/**
|
|
|
|
|
* Support description tag for RSS09
|
|
|
|
|
*
|
|
|
|
|
*/
|
2013-05-21 10:17:29 +02:00
|
|
|
public class RSS090DescriptionParser extends RSS090Parser {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected Item parseItem(Element rssRoot, Element eItem) {
|
|
|
|
|
Item item = super.parseItem(rssRoot, eItem);
|
|
|
|
|
|
|
|
|
|
Element e = eItem.getChild("description", getRSSNamespace());
|
|
|
|
|
if (e != null) {
|
|
|
|
|
Description desc = new Description();
|
|
|
|
|
desc.setValue(e.getText());
|
|
|
|
|
item.setDescription(desc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|