Package com.sun.syndication.feed.rss

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


    }


    @Override
    protected WireFeed createRealFeed(String type,SyndFeed syndFeed) {
        Channel channel = (Channel) super.createRealFeed(type,syndFeed);
        List cats = syndFeed.getCategories();    //c
        if (cats.size()>0) {
            channel.setCategories(createRSSCategories(cats));
        }
        return channel;
    }
View Full Code Here


     * @return the parsed Channel bean.
     */
    protected WireFeed parseChannel(Element rssRoot) {
        Element eChannel = rssRoot.getChild("channel", getRSSNamespace());

        Channel channel = new Channel(getType());

        Element e = eChannel.getChild("title",getRSSNamespace());
        if (e!=null) {
            channel.setTitle(e.getText());
        }
        e = eChannel.getChild("link",getRSSNamespace());
        if (e!=null) {
            channel.setLink(e.getText());
        }
        e = eChannel.getChild("description",getRSSNamespace());
        if (e!=null) {
            channel.setDescription(e.getText());
        }

        channel.setImage(parseImage(rssRoot));

        channel.setTextInput(parseTextInput(rssRoot));

        // Unfortunately Microsoft's SSE extension has a special case of
        // effectively putting the sharing channel module inside the RSS tag
        // and not inside the channel itself. So we also need to look for
        // channel modules from the root RSS element.
        List allFeedModules = new ArrayList();
        List rootModules = parseFeedModules(rssRoot);
        List channelModules = parseFeedModules(eChannel);
        if (rootModules != null) {
            allFeedModules.addAll(rootModules);
        }
        if (channelModules != null) {
            allFeedModules.addAll(channelModules);
        }
        channel.setModules(allFeedModules);
        channel.setItems(parseItems(rssRoot));

        List foreignMarkup =
            extractForeignMarkup(eChannel, channel, getRSSNamespace());
        if (foreignMarkup.size() > 0) {
            channel.setForeignMarkup(foreignMarkup);
        }         
        return channel;
    }
View Full Code Here

        super(type);
    }

    @Override
    public void copyInto(WireFeed feed,SyndFeed syndFeed) {
        Channel channel = (Channel) feed;
        super.copyInto(channel,syndFeed);
        if (channel.getUri() != null) {
          syndFeed.setUri(channel.getUri());
        } else {
          // if URI is not set use the value for link
          syndFeed.setUri(channel.getLink());
        }
    }
View Full Code Here

        return syndEntry;
    }

    @Override
    protected WireFeed createRealFeed(String type,SyndFeed syndFeed) {
        Channel channel = (Channel) super.createRealFeed(type,syndFeed);       
        if (syndFeed.getUri() != null) {
          channel.setUri(syndFeed.getUri());
        } else {
          // if URI is not set use the value for link
          channel.setUri(syndFeed.getLink());
        }
       
        return channel;
    }
View Full Code Here

            return items;
        }

        @Override
        protected Channel newFeed() {
            Channel channel = super.newFeed();
            channel.setTitle("Computoser - computser-generaces music");
            channel.setDescription(baseUrl);
            channel.setLink(baseUrl + "/rss");
            channel.setEncoding("utf-8");
            return channel;
        }
View Full Code Here

              System.out.println("[ERROR] Error obtaining geodata url: ["
                  + georssUrlStr + "]: Message: "+e.getMessage()+": skipping and continuing");
              continue;
            }

            Channel c = (Channel) feed;
            List<Item> items = (List<Item>) c.getItems();
            for (Item item : items) {
              GeoRSSModule geoRSSModule = (GeoRSSModule) item
                  .getModule(GeoRSSModule.GEORSS_GEORSS_URI);
              if (geoRSSModule == null)
                geoRSSModule = (GeoRSSModule) item
View Full Code Here

              System.out.println("[ERROR] Error obtaining geodata url: ["
                  + georssUrlStr + "]: Message: "+e.getMessage()+": skipping and continuing");
              continue;
            }

            Channel c = (Channel) feed;
            List<Item> items = (List<Item>) c.getItems();
            for (Item item : items) {
              GeoRSSModule geoRSSModule = (GeoRSSModule) item
                  .getModule(GeoRSSModule.GEORSS_GEORSS_URI);
              if (geoRSSModule == null)
                geoRSSModule = (GeoRSSModule) item
View Full Code Here

@Component(value="surveyRssFeedView")
public class SurveyRssFeedView extends AbstractBaseRssFeedView{

    @Override
    protected Channel newFeed() {
        final Channel channel = new Channel("rss_2.0");
        channel.setPubDate(new Date());
        channel.setDescription("RSS Description");
        channel.setTitle("Survey Published");
        channel.setLink("link");
        channel.setCopyright("2011");
        channel.setPubDate(new Date());
        return  channel;
    }
View Full Code Here

@Component(value="profileRssFeedView")
public class ProfileRssFeedView extends AbstractBaseRssFeedView{

    @Override
    protected Channel newFeed() {
        final Channel channel = new Channel("rss_2.0");
        channel.setPubDate(new Date());
        channel.setDescription("RSS Description");
        channel.setTitle("Profile RSS");
        channel.setLink("link");
        channel.setCopyright("2011");
        channel.setPubDate(new Date());
        return  channel;
    }
View Full Code Here

@Component(value="pollRssFeedView")
public class PollRssFeedView extends AbstractBaseRssFeedView{

    @Override
    protected Channel newFeed() {
        final Channel channel = new Channel("rss_2.0");
        channel.setPubDate(new Date());
        channel.setDescription("RSS Description");
        channel.setTitle("Poll Published");
        channel.setLink("link");
        channel.setCopyright("2011");
        channel.setPubDate(new Date());
        return  channel;
    }
View Full Code Here

TOP

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

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.