Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jani Halinen 2014-04-03 22:27:26 +03:00
commit ad3e301213
2 changed files with 24 additions and 0 deletions

View file

@ -36,6 +36,8 @@ import com.sun.syndication.feed.synd.SyndEnclosureImpl;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndEntryImpl;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndImage;
import com.sun.syndication.feed.synd.SyndImageImpl;
import com.sun.syndication.feed.synd.SyndLink;
import com.sun.syndication.feed.synd.SyndLinkImpl;
import com.sun.syndication.feed.synd.SyndPerson;
@ -72,6 +74,16 @@ public class ConverterForAtom03 implements Converter {
syndFeed.setEncoding(aFeed.getEncoding());
syndFeed.setStyleSheet(aFeed.getStyleSheet());
if (aFeed.getLogo() != null) {
SyndImage image = new SyndImageImpl();
image.setUrl(aFeed.getLogo());
syndFeed.setImage(image);
} else if (aFeed.getIcon() != null) {
SyndImage image = new SyndImageImpl();
image.setUrl(aFeed.getIcon());
syndFeed.setImage(image);
}
syndFeed.setUri(aFeed.getId());
syndFeed.setTitle(aFeed.getTitle());

View file

@ -39,6 +39,8 @@ import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndEntryImpl;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndFeedImpl;
import com.sun.syndication.feed.synd.SyndImage;
import com.sun.syndication.feed.synd.SyndImageImpl;
import com.sun.syndication.feed.synd.SyndLink;
import com.sun.syndication.feed.synd.SyndLinkImpl;
import com.sun.syndication.feed.synd.SyndPerson;
@ -74,6 +76,16 @@ public class ConverterForAtom10 implements Converter {
syndFeed.setEncoding(aFeed.getEncoding());
syndFeed.setStyleSheet(aFeed.getStyleSheet());
if (aFeed.getLogo() != null) {
SyndImage image = new SyndImageImpl();
image.setUrl(aFeed.getLogo());
syndFeed.setImage(image);
} else if (aFeed.getIcon() != null) {
SyndImage image = new SyndImageImpl();
image.setUrl(aFeed.getIcon());
syndFeed.setImage(image);
}
syndFeed.setUri(aFeed.getId());
final Content aTitle = aFeed.getTitleEx();