Package com.sun.syndication.io

Examples of com.sun.syndication.io.SyndFeedInput.build()


    }

    public void testReadAtom1() throws FeedException {
        SyndFeedInput input = new SyndFeedInput();

        SyndFeed result = input.build(new InputSource(getClass().getResourceAsStream("/be/hikage/xml/rome/atom_1.0.xml")));

        assertEquals("RSS Veille Techno", result.getTitle());
        assertEquals("http://svn.cyg.be/", result.getLink());
        assertEquals(1, result.getEntries().size());
    }
View Full Code Here


        try
        {
            URL feedUrl = new URL(url);
            SyndFeedInput input = new SyndFeedInput();

            SyndFeed feed = input.build(new XmlReader(feedUrl));

            RssInfo rssInfo = new RssInfo(feed, new Integer(prefs.getValue("itemdisplayed", "15")).intValue(), new Boolean(prefs
                    .getValue("openinpopup", "true")).booleanValue(), new Boolean(prefs.getValue("showdescription", "true"))
                    .booleanValue(), new Boolean(prefs.getValue("showtitle", "true")).booleanValue(), new Boolean(prefs.getValue(
                    "showtextinput", "true")).booleanValue());
View Full Code Here

                feed = (Feed)input.build(new XmlReader(new URL(uri)));
            } else {

                // Read an RSS feed and convert it to an Atom feed
                SyndFeedInput input = new SyndFeedInput();
                SyndFeed syndFeed = input.build(new XmlReader(new URL(uri)));
                feed = (Feed)syndFeed.createWireFeed("atom_1.0");
            }
           
            //FIXME Support conversion to data-api entries
           
View Full Code Here

        try
        {
            URL feedUrl = new URL(url);
            SyndFeedInput input = new SyndFeedInput();

            SyndFeed feed = input.build(new XmlReader(feedUrl));

            RssInfo rssInfo = new RssInfo(feed, new Integer(prefs.getValue("itemdisplayed", "15")).intValue(), new Boolean(prefs
                    .getValue("openinpopup", "true")).booleanValue(), new Boolean(prefs.getValue("showdescription", "true"))
                    .booleanValue(), new Boolean(prefs.getValue("showtitle", "true")).booleanValue(), new Boolean(prefs.getValue(
                    "showtextinput", "true")).booleanValue());
View Full Code Here

                feed = (Feed)input.build(new XmlReader(new URL(uri)));
            } else {

                // Read an RSS feed and convert it to an Atom feed
                SyndFeedInput input = new SyndFeedInput();
                SyndFeed syndFeed = input.build(new XmlReader(new URL(uri)));
                feed = (Feed)syndFeed.createWireFeed("atom_1.0");
            }
            msg.setBody(feed);

        } catch (MalformedURLException e) {
View Full Code Here

    URLConnection conn = ConnectionUtils.openReadConnection(feedUrl, username, password);
    InputStream is = conn.getInputStream();
    SyndFeedInput input = new SyndFeedInput();
    SyndFeed feed = null;
    try {
      feed = input.build(new XmlReader(is));
    } catch (FeedException f) {
      throw new GitBlitException(f);
    }
    is.close();
    List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();
View Full Code Here

        throws IOException, FeedParserException
    {
        try
        {
            SyndFeedInput input = new BBSyndFeedInput();
            SyndFeed feed = input.build(XmlReaderFactory.create(aStream));

            Channel channel = RomeFeedParser.convertFeed(feed, aFeedURL);
            aResult.setChannel(channel);

            // Add items
View Full Code Here

    //------------------------------------------------------------------------
    private void extractByParsingRss(String rssLink, String requestURL)
            throws IllegalArgumentException, MalformedURLException, FeedException, IOException
    {
        SyndFeedInput feedInput = new SyndFeedInput();      
        SyndFeed feed = feedInput.build(
            new InputStreamReader(new URL(rssLink).openStream()));
        Iterator itemIter = feed.getEntries().iterator();
        String feedTitle = feed.getTitle();

        int count = 0;
View Full Code Here

               
                if (feed == null) {
                    try {
                        // Parse the feed
                        SyndFeedInput feedInput = new SyndFeedInput();
                        feed = feedInput.build(new InputStreamReader(
                                new URL(feedUrl).openStream()));
                    } catch (Exception e1) {
                        log.info("Error parsing RSS: " + feedUrl);
                    }
                }
View Full Code Here

                            }
                        }
                    }
                    // Parse the feed
                    SyndFeedInput feedInput = new SyndFeedInput();
                    feed = feedInput.build(new InputStreamReader(
                            connection.getInputStream(), charset));
                } catch (Exception e1) {
                    log.info("Error parsing RSS: " + feedUrl);
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.