Search in sources :

Example 1 with ImmutableListWrapper

use of com.entwinemedia.fn.data.ImmutableListWrapper in project opencast by opencast.

the class DublinCoreUtil method getPropertiesSorted.

/**
 * Return a sorted list of all catalog entries.
 */
public static List<CatalogEntry> getPropertiesSorted(DublinCoreCatalog dc) {
    final List<EName> properties = new ArrayList<>(dc.getProperties());
    Collections.sort(properties);
    final List<CatalogEntry> entries = new ArrayList<>();
    for (final EName property : properties) {
        Collections.addAll(entries, dc.getValues(property));
    }
    return new ImmutableListWrapper<>(entries);
}
Also used : EName(org.opencastproject.mediapackage.EName) ArrayList(java.util.ArrayList) CatalogEntry(org.opencastproject.mediapackage.XMLCatalogImpl.CatalogEntry) ImmutableListWrapper(com.entwinemedia.fn.data.ImmutableListWrapper)

Aggregations

ImmutableListWrapper (com.entwinemedia.fn.data.ImmutableListWrapper)1 ArrayList (java.util.ArrayList)1 EName (org.opencastproject.mediapackage.EName)1 CatalogEntry (org.opencastproject.mediapackage.XMLCatalogImpl.CatalogEntry)1