Package com.sun.syndication.io

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


                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 entry = (Entry)feed.getEntries().get(0);
        return entry;
    }

    /**
 
View Full Code Here

//          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());
View Full Code Here

        synchronized(FileStore.FS) {
            in = FileStore.FS.getFileContents(AtomStore.getFeedPath());
        }
       
        WireFeedInput input = new WireFeedInput();
        WireFeed wireFeed = input.build(new InputStreamReader(in));
        return (Feed)wireFeed;
    }
   
    static Feed getFeedDocument(MessageBodyWorkers bodyContext, URI feedUri) throws IOException, FeedException {
        InputStream in = null;
View Full Code Here

                in = createDefaultFeedDocument(bodyContext, feedUri.toString());
            }
        }
       
        WireFeedInput input = new WireFeedInput();
        WireFeed wireFeed = input.build(new InputStreamReader(in));
        return (Feed)wireFeed;
    }
       
    static void updateFeedDocumentWithNewEntry(MessageBodyWorkers bodyContext,
            Feed f, Entry e) throws IOException {
View Full Code Here

        if (baseURI != null) {
            feedDoc.getRootElement().setAttribute("base", baseURI, Namespace.XML_NAMESPACE);
        }
       
        WireFeedInput input = new WireFeedInput();
        Feed parsedFeed = (Feed)input.build(feedDoc);
        return (Entry)parsedFeed.getEntries().get(0);
    }
}

View Full Code Here

    if (baseURI != null) {
      feedDoc.getRootElement().setAttribute("base", baseURI, Namespace.XML_NAMESPACE);
    }

    WireFeedInput input = new WireFeedInput();
    Feed parsedFeed = (Feed) input.build(feedDoc);
    return (Entry) parsedFeed.getEntries().get(0);
  }
}
View Full Code Here

        setBaseURI(baseURI);

        WireFeedInput input = new WireFeedInput();
        try {
            WireFeed feed = input.build(new InputSource(in));
            if(feed instanceof Feed) {
                parseFeed((Feed) feed);
            } else {
                throw new RDFParseException("data stream is not an RSS feed");
            }
View Full Code Here

        setBaseURI(baseURI);

        WireFeedInput input = new WireFeedInput();
        try {
            WireFeed feed = input.build(reader);
            if(feed instanceof Feed) {
                parseFeed((Feed) feed);
            } else {
                throw new RDFParseException("data stream is not an RSS feed");
            }
View Full Code Here

        setBaseURI(baseURI);

        WireFeedInput input = new WireFeedInput();
        try {
            WireFeed feed = input.build(new InputSource(in));
            if(feed instanceof Channel) {
                parseFeed((Channel) feed);
            } else {
                throw new RDFParseException("data stream is not an RSS feed");
            }
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.