Search in sources :

Example 1 with SyndLinkImpl

use of com.rometools.rome.feed.synd.SyndLinkImpl in project opencast by opencast.

the class RomeRssFeed method toRomeLinks.

/**
 * Converts a list of links to a <code>ROME</code> link list.
 *
 * @param links
 *          original links
 * @return <code>ROME</code> link list
 */
private List<SyndLink> toRomeLinks(List<Link> links) {
    if (links == null)
        return Collections.emptyList();
    List<SyndLink> romeLinks = new ArrayList<SyndLink>(links.size());
    for (Link link : links) {
        SyndLinkImpl romeLink = new SyndLinkImpl();
        romeLink.setHref(link.getHref());
        romeLink.setHreflang(link.getHreflang());
        romeLink.setLength(link.getLength());
        romeLink.setRel(link.getRel());
        romeLink.setTitle(link.getTitle());
        romeLink.setType(link.getType());
        romeLinks.add(romeLink);
    }
    return romeLinks;
}
Also used : ArrayList(java.util.ArrayList) SyndLinkImpl(com.rometools.rome.feed.synd.SyndLinkImpl) SyndLink(com.rometools.rome.feed.synd.SyndLink) SyndLink(com.rometools.rome.feed.synd.SyndLink) Link(org.opencastproject.feed.api.Link)

Aggregations

SyndLink (com.rometools.rome.feed.synd.SyndLink)1 SyndLinkImpl (com.rometools.rome.feed.synd.SyndLinkImpl)1 ArrayList (java.util.ArrayList)1 Link (org.opencastproject.feed.api.Link)1