Examples of WireFeed


Examples of com.sun.syndication.feed.WireFeed

        // invoke the feed generator service (implements rssFeedInterface)
        String respCode = service.invoke(event, requestMap, request, response);

        // pull out the RSS feed from the request attributes
        WireFeed wireFeed = (WireFeed) request.getAttribute("wireFeed");
        response.setContentType(mime);
        try {
            out.output(wireFeed, response.getWriter());
        } catch (IOException e) {
            throw new EventHandlerException("Unable to get response writer", e);
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

    }


    public void testWriteRss2() {
        WireFeed wireFeed = this.feed.createWireFeed("rss_2.0");
        outputFeed(wireFeed);

    }
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

        outputFeed(wireFeed);

    }

    public void testWriteRss1() {
        WireFeed wireFeed = this.feed.createWireFeed("rss_1.0");
        outputFeed(wireFeed);

    }
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

    }


    public void testWriteAtom1() {
        WireFeed wireFeed = this.feed.createWireFeed("atom_1.0");
        outputFeed(wireFeed);
    }
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

          NodeList urlNodes = configDoc.getElementsByTagName("url");
          for (int i = 0; i < urlNodes.getLength(); i++) {
            // read in georss and build tree
            String georssUrlStr = urlNodes.item(i).getFirstChild()
                .getNodeValue();
            WireFeed feed = null;
            try {
              feed = wf.build(new XmlReader(new URL(georssUrlStr)));
            } catch (Exception e) {
              System.out.println("[ERROR] Error obtaining geodata url: ["
                  + georssUrlStr + "]: Message: "+e.getMessage()+": skipping and continuing");
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

        // invoke the feed generator service (implements rssFeedInterface)
        String respCode = service.invoke(eventPath, eventMethod, request, response);

        // pull out the RSS feed from the request attributes
        WireFeed wireFeed = (WireFeed) request.getAttribute("wireFeed");
        response.setContentType(mime);
        try {
            out.output(wireFeed, response.getWriter());
        } catch (IOException e) {
            throw new EventHandlerException("Unable to get response writer", e);
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

//          feed.add(fe);
//          log.info(fe);
//        }

      WireFeedInput input = new WireFeedInput(true);
      WireFeed wf = input.build(new XmlReader(new URL(url)));

      if (wf.getFeedType() != null && wf.getFeedType().startsWith("rss")) {
        Channel rssFeed = (Channel)wf;
        feed.setTitle(rssFeed.getTitle());
        feed.setLink(rssFeed.getLink());

        for (Item item : (List<Item>)rssFeed.getItems()) {
          NewsFeedEntry fe = new NewsFeedEntry(
              item.getLink(),
              item.getTitle(),
              item.getDescription() != null ? item.getDescription().getValue() : "",
              item.getAuthor(),
              item.getPubDate()
          );
          feed.add(fe);
        }
      } else if (wf.getFeedType() != null && wf.getFeedType().startsWith("atom")) {
        com.sun.syndication.feed.atom.Feed atomFeed = (com.sun.syndication.feed.atom.Feed)wf;
        feed.setTitle(atomFeed.getTitle());
        for (Link link : (List<Link>)atomFeed.getAlternateLinks()) {
          if ("text/html".equals(link.getType()))
            feed.setLink(link.getHref());
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

     * After we parse the feed we put "rss_2.0" in it (so converters and generators work)
     * this parser is a phantom.
     *
     */
    protected WireFeed parseChannel(Element rssRoot)  {
        WireFeed wFeed = super.parseChannel(rssRoot);
        wFeed.setFeedType("rss_2.0");
        return wFeed;
    }
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

        synchronized(FileStore.FS) {
            in = FileStore.FS.getFileContents(AtomStore.getFeedPath());
        }
       
        WireFeedInput input = new WireFeedInput();
        WireFeed wireFeed = input.build(new InputStreamReader(in));
        return (Feed)wireFeed;
    }
View Full Code Here

Examples of com.sun.syndication.feed.WireFeed

                in = createDefaultFeedDocument(bodyContext, feedUri.toString());
            }
        }
       
        WireFeedInput input = new WireFeedInput();
        WireFeed wireFeed = input.build(new InputStreamReader(in));
        return (Feed)wireFeed;
    }
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.