use of com.rometools.rome.feed.synd.SyndEnclosureImpl in project opencast by opencast.
the class RomeRssFeed method toRomeEnclosures.
/**
* Converts a list of enclosures to a <code>ROME</code> enclosure list.
*
* @param enclosures
* original enclosures
* @return <code>ROME</code> enclosure list
*/
private List<SyndEnclosure> toRomeEnclosures(List<Enclosure> enclosures) {
if (enclosures == null)
return Collections.emptyList();
List<SyndEnclosure> romeEnclosures = new ArrayList<SyndEnclosure>(enclosures.size());
for (Enclosure enclosure : enclosures) {
SyndEnclosureImpl romeEnclosure = new SyndEnclosureImpl();
romeEnclosure.setLength(enclosure.getLength());
romeEnclosure.setType(enclosure.getType());
romeEnclosure.setUrl(enclosure.getUrl());
romeEnclosures.add(romeEnclosure);
}
return romeEnclosures;
}
Aggregations