Package com.sun.syndication.io

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


            // 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");
              continue;
            }
View Full Code Here


                int status = getMethod.getStatusCode();

                // Read the Atom feed
                if (status == 200) {
                    WireFeedInput input = new WireFeedInput();
                    Feed feed = (Feed)input.build(new XmlReader(getMethod.getResponseBodyAsStream()));
                    msg.setBody(feed);

                } else if (status == 404) {
                    msg.setFaultBody(new NotFoundException());
                } else {
View Full Code Here

        feed.setFeedType(feedType);
        WireFeedOutput wireFeedOutput = new WireFeedOutput();
        document = wireFeedOutput.outputJDom(feed);
        document.getRootElement().addContent(root);
        WireFeedInput input = new WireFeedInput();
        feed = (Feed)input.build(document);
        Entry feedEntry = (Entry)feed.getEntries().get(0);
        if (feedEntry.getContents().size() != 0) {
            Content content = (Content)feedEntry.getContents().get(0);
            if ("text/xml".equals(content.getType())) {
                Element element = root.getChild("content", root.getNamespace());
View Full Code Here

            Feed feed;
            if (feedType.startsWith("atom_")) {

                // Read an Atom feed
                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)));
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

        if (rollerElement == null) {
            log.debug("Client is NOT preserving foreign markup");
        }
               
        WireFeedInput input = new WireFeedInput();
        Feed parsedFeed = (Feed)input.build(feedDoc);
        return (Entry)parsedFeed.getEntries().get(0);
    }
}
View Full Code Here

                int status = getMethod.getStatusCode();

                // Read the Atom feed
                if (status == 200) {
                    WireFeedInput input = new WireFeedInput();
                    Feed feed = (Feed)input.build(new XmlReader(getMethod.getResponseBodyAsStream()));
                    msg.setBody(feed);

                } else if (status == 404) {
                    msg.setFaultBody(new NotFoundException());
                } else {
View Full Code Here

        feed.setFeedType(feedType);
        WireFeedOutput wireFeedOutput = new WireFeedOutput();
        document = wireFeedOutput.outputJDom(feed);
        document.getRootElement().addContent(root);
        WireFeedInput input = new WireFeedInput();
        feed = (Feed)input.build(document);
        Entry feedEntry = (Entry)feed.getEntries().get(0);
        if (feedEntry.getContents().size() != 0) {
            Content content = (Content)feedEntry.getContents().get(0);
            if ("text/xml".equals(content.getType())) {
                Element element = root.getChild("content", root.getNamespace());
View Full Code Here

        if (rollerElement == null) {
            mLogger.debug("Client is NOT preserving foreign markup");
        }
       
        WireFeedInput input = new WireFeedInput();
        Feed parsedFeed = (Feed)input.build(feedDoc);
        return (Entry)parsedFeed.getEntries().get(0);
    }
}
View Full Code Here

    } else {
      charset = DEFAULT_CHARSET;
    }
    try {
      Reader reader = new InputStreamReader(inputMessage.getBody(), charset);
      return (T) feedInput.build(reader);
    }
    catch (FeedException ex) {
      throw new HttpMessageNotReadableException("Could not read WireFeed: " + ex.getMessage(), ex);
    }
  }
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.