Examples of SyndFeedInput


Examples of com.sun.syndication.io.SyndFeedInput

        assertThat(Helpers.charset(proxy.getResult()), is("utf-8"));
        assertThat(Helpers.header("Content-Disposition", proxy.getResult()), is("inline"));

        InputStream is = new ByteArrayInputStream(Helpers.contentAsBytes(proxy.getResult()));
        Reader reader = new InputStreamReader(is, Charset.forName("utf-8")); // TODO: Charset should be constant.
        SyndFeed feed = new SyndFeedInput().build(reader);

        List<String> links = new ArrayList<String>();
        @SuppressWarnings("unchecked")
        List<SyndEntry> entries = feed.getEntries();
        for (SyndEntry entry : entries)
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

                writer.close();
                logger.debug(writer.toString());
            }
           
            DOMOutputter outputter = new DOMOutputter();
            SyndFeedInput input = new SyndFeedInput();
            SyndFeed romeFeed = input.build(outputter.output(feedDocument));
            Feed feed = this.makeFeed(romeFeed);
           
            this.lastAccess = new Date();
           
            return feed;
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

   */
  @SuppressWarnings("unchecked")
  public JSONObject process(String feedUrl, String feedXml,
      boolean getSummaries, int numEntries) throws GadgetException {
    try {
      SyndFeed feed = new SyndFeedInput().build(new StringReader(feedXml));
      JSONObject json = new JSONObject();
      json.put("Title", feed.getTitle());
      json.put("URL", feedUrl);
      json.put("Description", feed.getDescription());
      json.put("Link", feed.getLink());
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

    {
      try
      {
        URL url = new URL(urls[i]);
       
        SyndFeedInput input = new SyndFeedInput();
        feeds.add(new PathElement(input.build(new XmlReader(url))));
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

  {
    try
    {
      URL url = new URL(string);
     
      SyndFeedInput input = new SyndFeedInput();
      SyndFeed feed = input.build(new XmlReader(url));
     
      System.out.println(feed);
    }
    catch (IOException ioe)
    {
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

          
           try {       
               // Next, we read the fed input.
               URL feedUrl = new URL(feed.getRssUrl());
               //System.out.println(feedUrl);
               SyndFeedInput input = new SyndFeedInput();
             
               XmlReader reader = new XmlReader(feedUrl);
               SyndFeed feeder = input.build(reader);
                        
              
               List feederEntries = feeder.getEntries();
               int end = feederEntries.size();
               end = (end < limit) ? end : limit;
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

    public Message invoke(Message msg) {
        try {
            logger.info(">>> RSSBindingInvoker (" + feedType + ") " + uri);

            // Read an RSS feed into a Synd feed
            SyndFeedInput input = new SyndFeedInput();
            SyndFeed feed = input.build(new XmlReader(new URL(uri)));
           
            //FIXME Support conversion to data-api entries
           
            msg.setBody(feed);
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

                WireFeedInput input = new WireFeedInput();
                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

Examples of com.sun.syndication.io.SyndFeedInput

    String encoding = detector.guessEncoding(content, defaultEncoding);
    try {
      InputSource input = new InputSource(new ByteArrayInputStream(content
          .getContent()));
      input.setEncoding(encoding);
      SyndFeedInput feedInput = new SyndFeedInput();
      feed = feedInput.build(input);
    } catch (Exception e) {
      // return empty parse
      LOG.warn("Parse failed: url: " + content.getUrl() + ", exception: "
          + StringUtils.stringifyException(e));
      return new ParseStatus(e)
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

        List<RssTitleBean> rssTitleBeanList = new ArrayList<RssTitleBean>();
        XmlReader reader = null;

        try {
            reader = new XmlReader(source);
            SyndFeed feed = new SyndFeedInput().build(reader);

            for (Iterator i = feed.getEntries().iterator(); i.hasNext() && (headsize-- > 0);) {
                SyndEntry entry = (SyndEntry) i.next();

                RssTitleBean rssTitleBean = new RssTitleBean();
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.