Search in sources :

Example 1 with SyndCategoryImpl

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

the class RomeRssFeed method toRomeCategories.

/**
 * Converts a list of categories to a <code>ROME</code> category list.
 *
 * @param categories
 *          original categories
 * @return <code>ROME</code> category list
 */
private List<SyndCategory> toRomeCategories(List<Category> categories) {
    if (categories == null)
        return Collections.emptyList();
    List<SyndCategory> romeCategories = new ArrayList<SyndCategory>(categories.size());
    for (Category category : categories) {
        SyndCategoryImpl romeCategory = new SyndCategoryImpl();
        romeCategory.setName(category.getName());
        romeCategory.setTaxonomyUri(category.getTaxonomyUri());
        romeCategories.add(romeCategory);
    }
    return romeCategories;
}
Also used : SyndCategory(com.rometools.rome.feed.synd.SyndCategory) Category(org.opencastproject.feed.api.Category) SyndCategory(com.rometools.rome.feed.synd.SyndCategory) SyndCategoryImpl(com.rometools.rome.feed.synd.SyndCategoryImpl) ArrayList(java.util.ArrayList)

Aggregations

SyndCategory (com.rometools.rome.feed.synd.SyndCategory)1 SyndCategoryImpl (com.rometools.rome.feed.synd.SyndCategoryImpl)1 ArrayList (java.util.ArrayList)1 Category (org.opencastproject.feed.api.Category)1