Package com.rometools.rome.feed.synd

Examples of com.rometools.rome.feed.synd.SyndFeedImpl


    if (response.getStatus() != Status.OK.getStatusCode()) {
      return response;
    }
    Entries entries = (Entries) response.getEntity();

    SyndFeed feed = new SyndFeedImpl();
    feed.setFeedType("rss_2.0");
    feed.setTitle("CommaFeed - " + entries.getName());
    feed.setDescription("CommaFeed - " + entries.getName());
    String publicUrl = config.getApplicationSettings().getPublicUrl();
    feed.setLink(publicUrl);

    List<SyndEntry> children = Lists.newArrayList();
    for (Entry entry : entries.getEntries()) {
      children.add(entry.asRss());
    }
    feed.setEntries(children);

    SyndFeedOutput output = new SyndFeedOutput();
    StringWriter writer = new StringWriter();
    try {
      output.output(feed, writer);
View Full Code Here


    if (response.getStatus() != Status.OK.getStatusCode()) {
      return response;
    }
    Entries entries = (Entries) response.getEntity();

    SyndFeed feed = new SyndFeedImpl();
    feed.setFeedType("rss_2.0");
    feed.setTitle("CommaFeed - " + entries.getName());
    feed.setDescription("CommaFeed - " + entries.getName());
    String publicUrl = config.getApplicationSettings().getPublicUrl();
    feed.setLink(publicUrl);

    List<SyndEntry> children = Lists.newArrayList();
    for (Entry entry : entries.getEntries()) {
      children.add(entry.asRss());
    }
    feed.setEntries(children);

    SyndFeedOutput output = new SyndFeedOutput();
    StringWriter writer = new StringWriter();
    try {
      output.output(feed, writer);
View Full Code Here

     *             underlying parsers.
     * @throws FeedException if the feed could not be parsed
     *
     */
    public SyndFeed build(final File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException {
        return new SyndFeedImpl(feedInput.build(file), preserveWireFeed);
    }
View Full Code Here

     *             underlying parsers.
     * @throws FeedException if the feed could not be parsed
     *
     */
    public SyndFeed build(final Reader reader) throws IllegalArgumentException, FeedException {
        return new SyndFeedImpl(feedInput.build(reader), preserveWireFeed);
    }
View Full Code Here

     *             underlying parsers.
     * @throws FeedException if the feed could not be parsed
     *
     */
    public SyndFeed build(final InputSource is) throws IllegalArgumentException, FeedException {
        return new SyndFeedImpl(feedInput.build(is), preserveWireFeed);
    }
View Full Code Here

     *             underlying parsers.
     * @throws FeedException if the feed could not be parsed
     *
     */
    public SyndFeed build(final org.w3c.dom.Document document) throws IllegalArgumentException, FeedException {
        return new SyndFeedImpl(feedInput.build(document), preserveWireFeed);
    }
View Full Code Here

     *             underlying parsers.
     * @throws FeedException if the feed could not be parsed
     *
     */
    public SyndFeed build(final Document document) throws IllegalArgumentException, FeedException {
        return new SyndFeedImpl(feedInput.build(document), preserveWireFeed);
    }
View Full Code Here

    }

    protected SyndFeed createSource(final Source source) {
        SyndFeed feed = null;
        if (source != null) {
            feed = new SyndFeedImpl();
            feed.setLink(source.getUrl());
            feed.setUri(source.getUrl());
            feed.setTitle(source.getValue());
        }
        return feed;
View Full Code Here

        // Convert source element Feed into SyndFeed and assign as SyndEntry
        // source
        final Feed source = entry.getSource();
        if (source != null) {
            final SyndFeed syndSource = new SyndFeedImpl(source);
            syndEntry.setSource(syndSource);
        }

        return syndEntry;
    }
View Full Code Here

    public void testOriginalCategories() throws Exception {
        checkFeed(getCachedSyndFeed());
    }

    public void testCopiedFeedCategories() throws Exception {
        final SyndFeed copiedFeed = new SyndFeedImpl();
        copiedFeed.copyFrom(getCachedSyndFeed());
        checkFeed(copiedFeed);
    }
View Full Code Here

TOP

Related Classes of com.rometools.rome.feed.synd.SyndFeedImpl

Copyright © 2018 www.massapicom. 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.