diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java index baea28b..dab8725 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java @@ -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; @@ -71,6 +73,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()); diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java index 87ffe49..9f42648 100644 --- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java +++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java @@ -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; @@ -73,6 +75,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());