This does not seem to work out of the box because the converter for RSS 2.0 is ignoring the (optional) source element.
You could write you own converter and set the source yourself from the item's source attribute. I put the value ("AP" from you feed) into the author field here:
public class MyConverterForRSS20 extends ConverterForRSS20 {
public MyConverterForRSS20() {
this("rss_2.0");
}
protected MyConverterForRSS20(String type) {
super(type);
}
@Override
protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) {
SyndEntry syndEntry = super.createSyndEntry(item, preserveWireItem);
Source source = item.getSource();
if (source != null) {
SyndFeed syndFeed = new SyndFeedImpl();
syndFeed.setLink(source.getUrl());
syndFeed.setAuthor(source.getValue());
syndEntry.setSource(syndFeed);
}
return syndEntry;
}
}
Fortunately, the custom converter can be easily plugged into rome by changing the rome.properties
file and setting MyConverterForRSS20
instead of com.sun.syndication.feed.synd.impl.ConverterForRSS20
(last line of file):
# Feed Conversor implementation classes
#
Converter.classes=com.sun.syndication.feed.synd.impl.ConverterForAtom10 \
com.sun.syndication.feed.synd.impl.ConverterForAtom03 \
com.sun.syndication.feed.synd.impl.ConverterForRSS090 \
com.sun.syndication.feed.synd.impl.ConverterForRSS091Netscape \
com.sun.syndication.feed.synd.impl.ConverterForRSS091Userland \
com.sun.syndication.feed.synd.impl.ConverterForRSS092 \
com.sun.syndication.feed.synd.impl.ConverterForRSS093 \
com.sun.syndication.feed.synd.impl.ConverterForRSS094 \
com.sun.syndication.feed.synd.impl.ConverterForRSS10 \
MyConverterForRSS20