Examples of SyndImage


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

            syndFeed.setEntries(createSyndEntries(items, syndFeed.isPreservingWireFeed()));
        }
    }

    protected SyndImage createSyndImage(final Image rssImage) {
        final SyndImage syndImage = new SyndImageImpl();
        syndImage.setTitle(rssImage.getTitle());
        syndImage.setUrl(rssImage.getUrl());
        syndImage.setLink(rssImage.getLink());
        return syndImage;
    }
View Full Code Here

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

            channel.setLink(links.get(0).getHref());
        }

        channel.setDescription(syndFeed.getDescription());

        final SyndImage sImage = syndFeed.getImage();
        if (sImage != null) {
            channel.setImage(createRSSImage(sImage));
        }

        final List<SyndEntry> sEntries = syndFeed.getEntries();
View Full Code Here

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

        final String logo = aFeed.getLogo();
        final String icon = aFeed.getIcon();

        if (logo != null) {
            final SyndImage image = new SyndImageImpl();
            image.setUrl(logo);
            syndFeed.setImage(image);
        } else if (icon != null) {
            final SyndImage image = new SyndImageImpl();
            image.setUrl(icon);
            syndFeed.setImage(image);
        }

        syndFeed.setUri(aFeed.getId());
View Full Code Here

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

        final String logo = aFeed.getLogo();
        final String icon = aFeed.getIcon();

        if (logo != null) {
            final SyndImage image = new SyndImageImpl();
            image.setUrl(logo);
            syndFeed.setImage(image);
        } else if (icon != null) {
            final SyndImage image = new SyndImageImpl();
            image.setUrl(icon);
            syndFeed.setImage(image);
        }

        syndFeed.setUri(aFeed.getId());
View Full Code Here

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

        return syndEntry;
    }

    @Override
    protected SyndImage createSyndImage(final Image rssImage) {
        final SyndImage syndImage = super.createSyndImage(rssImage);
        syndImage.setDescription(rssImage.getDescription());
        return syndImage;
    }
View Full Code Here

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

        assertEquals(DateParser.parseRFC822("Mon, 01 Jan 2001 00:00:00 GMT", Locale.US), this.getCachedSyndFeed().getPublishedDate());
    }

    // how do i get height and width?
    public void testImage() throws Exception {
        final SyndImage img = this.getCachedSyndFeed().getImage();
        assertEqualsStr("channel.image.description", img.getDescription());
        assertEqualsStr("channel.image.link", img.getLink());
        assertEqualsStr("channel.image.title", img.getTitle());
        assertEqualsStr("channel.image.url", img.getUrl());
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndImage

    setLink(helper.getJumpInLink());

    setPublishedDate(feed.getLastModified());
    // The image
    if (feed.getImageName() != null) {
      SyndImage image = new SyndImageImpl();
      image.setDescription(feed.getDescription());
      image.setTitle(feed.getTitle());
      image.setLink(getLink());
      image.setUrl(helper.getImageUrl());
      setImage(image);
    }

    List<SyndEntry> episodes = new ArrayList<SyndEntry>();
    for (Item item : feed.getPublishedItems()) {
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndImage

  /**
   * @param extFeed
   * @param feed
   */
  private void addExternalImageURL(SyndFeed feed, Feed extFeed) {
    SyndImage img = feed.getImage();
    if (img != null) {
      extFeed.setExternalImageURL(img.getUrl());
    } else {
      extFeed.setExternalImageURL(null);
    }
  }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndImage

    setTitle(translator.translate("rss.title", new String[] { identity.getName() }));
    setLink(RSSUtil.URI_SERVER);
    setDescription(translator.translate("rss.description", new String[] { identity.getName() }));

    // create and add an image to the feed
    SyndImage image = new SyndImageImpl();
    image.setUrl(Settings.createServerURI() + StaticMediaDispatcher.createStaticURIFor("images/olat/olatlogo32x32.png"));
    image.setTitle("OLAT - Online Learning And Training");
    image.setLink(getLink());
    setImage(image);

    List<SyndEntry> entries = new ArrayList<SyndEntry>();
    SyndEntry entry = new SyndEntryImpl();
    entry.setTitle(translator.translate("rss.olat.title", new String[] { NotificationHelper.getFormatedName(identity) }));
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndImage

    temp = doc.createElement("link");
    // make sure link uses a safe URL scheme
    temp.setTextContent(SaferHTMLHandler.sanitizeURL(feed.getLink()));
    newsNode.appendChild(temp);
   
    SyndImage image = feed.getImage();
    if (image != null){
      Node imageNode = doc.createElement("image");
      newsNode.appendChild(imageNode);
     
      temp = doc.createElement("url");
      // make sure link uses a safe URL scheme
      temp.setTextContent(SaferHTMLHandler.sanitizeURL(image.getUrl()));
      imageNode.appendChild(temp);
     
      temp = doc.createElement("title");
      temp.setTextContent(image.getTitle());
      imageNode.appendChild(temp);
 
      temp = doc.createElement("description");
      temp.setTextContent(image.getDescription());
      imageNode.appendChild(temp);
     
      temp = doc.createElement("link");
      // make sure link uses a safe URL scheme
      temp.setTextContent(SaferHTMLHandler.sanitizeURL(image.getLink()));
      imageNode.appendChild(temp);
    }
   
    Node itemsNode = doc.createElement("items");
    newsNode.appendChild(itemsNode);
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.