Examples of WireFeed


Examples of com.rometools.rome.feed.WireFeed

     *             underlying parsers.
     * @throws FeedException if the feed could not be parsed
     *
     */
    public WireFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException {
        WireFeed feed;
        Reader reader = new FileReader(file);
        if (xmlHealerOn) {
            reader = new XmlFixerReader(reader);
        }
        feed = this.build(reader);
View Full Code Here

Examples of com.rometools.rome.feed.WireFeed

     * parser is a phantom.
     *
     */
    @Override
    protected WireFeed parseChannel(final Element rssRoot, final Locale locale) {
        final WireFeed wFeed = super.parseChannel(rssRoot, locale);
        wFeed.setFeedType("rss_2.0");
        return wFeed;
    }
View Full Code Here

Examples of com.rometools.rome.feed.WireFeed

        super(feedType + ".xml");
    }

    // 1.2a
    public void testWireFeedEquals() throws Exception {
        final WireFeed feed1 = getCachedWireFeed();
        final WireFeed feed2 = getWireFeed();
        assertTrue(feed1.equals(feed2));
    }
View Full Code Here

Examples of com.rometools.rome.feed.WireFeed

        assertTrue(feed1.equals(feed2));
    }

    // 1.2b
    public void testWireFeedNotEqual() throws Exception {
        final WireFeed feed1 = getCachedWireFeed();
        final WireFeed feed2 = getWireFeed();
        feed2.setFeedType("dummy");
        assertFalse(feed1.equals(feed2));
    }
View Full Code Here

Examples of com.rometools.rome.feed.WireFeed

        assertFalse(feed1.equals(feed2));
    }

    // 1.3
    public void testWireFeedCloning() throws Exception {
        final WireFeed feed1 = getCachedWireFeed();
        final WireFeed feed2 = (WireFeed) feed1.clone();
        ;
        assertTrue(feed1.equals(feed2));
    }
View Full Code Here

Examples of com.rometools.rome.feed.WireFeed

        assertTrue(feed1.equals(feed2));
    }

    // 1.4
    public void testWireFeedSerialization() throws Exception {
        final WireFeed feed1 = getCachedWireFeed();

        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        final ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(feed1);
        oos.close();

        final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
        final ObjectInputStream ois = new ObjectInputStream(bais);
        final WireFeed feed2 = (WireFeed) ois.readObject();
        ois.close();

        assertTrue(feed1.equals(feed2));
    }
View Full Code Here

Examples of com.rometools.rome.feed.WireFeed

    }

    // 1.6
    public void testWireFeedSyndFeedConversion() throws Exception {
        final SyndFeed sFeed1 = this.getCachedSyndFeed();
        final WireFeed wFeed1 = sFeed1.createWireFeed();
        final SyndFeed sFeed2 = new SyndFeedImpl(wFeed1);

        assertTrue(sFeed1.equals(sFeed2));
    }
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(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

            MediaType mediaType,
            MultivaluedMap<String, String> httpHeaders,
            InputStream entityStream) throws IOException {
        try {
            WireFeedInput input = new WireFeedInput();                     
            WireFeed wireFeed = input.build(new InputStreamReader(entityStream));   
            if (!(wireFeed instanceof Feed)) {
                throw new IOException(ImplMessages.ERROR_NOT_ATOM_FEED(type));
            }
            return (Feed)wireFeed;
        } catch (FeedException cause) {
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.