Package com.sun.syndication.feed.rss

Examples of com.sun.syndication.feed.rss.Image


     *
     * @param rssRoot the root element of the RSS document to parse for image information.
     * @return the parsed image bean.
     */
    protected Image parseImage(Element rssRoot) {
        Image image = null;
        Element eImage = getImage(rssRoot);
        if (eImage!=null) {
            image = new Image();

            Element e = eImage.getChild("title",getRSSNamespace());
            if (e!=null) {
                image.setTitle(e.getText());
            }
            e = eImage.getChild("url",getRSSNamespace());
            if (e!=null) {
                image.setUrl(e.getText());
            }
            e = eImage.getChild("link",getRSSNamespace());
            if (e!=null) {
                image.setLink(e.getText());
            }
        }
        return image;
    }
View Full Code Here


        channel.setManagingEditor(syndFeed.getAuthor());
        return channel;
    }

    protected Image createRSSImage(SyndImageI sImage) {
        Image image = super.createRSSImage(sImage);
        image.setDescription(sImage.getDescription());
        return image;
    }
View Full Code Here

        syndFeed.setTitle(channel.getTitle());
        syndFeed.setLink(channel.getLink());
        syndFeed.setDescription(channel.getDescription());
        syndFeed.setPublishedDate(channel.getPubDate());

        Image image = channel.getImage();
        if (image!=null) {
            syndFeed.setImage(createSyndImage(image));
        }

        List items = channel.getItems();
View Full Code Here

        }
        return channel;
    }

    protected Image createRSSImage(SyndImageI sImage) {
        Image image = new Image();
        image.setTitle(sImage.getTitle());
        image.setUrl(sImage.getUrl());
        image.setLink(sImage.getLink());
        return image;
    }
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.rss.Image

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.