* Cache loader to extract the item universe from a recommender.
*/
private static class UniverseLoader extends CacheLoader<Recommender,LongSet> {
public LongSet load(Recommender rec) throws Exception {
LenskitRecommender lkrec = (LenskitRecommender) rec;
ItemDAO idao = lkrec.get(ItemDAO.class);
if (idao == null) {
logger.warn("Recommender has no item DAO");
return LongSets.EMPTY_SET;
} else {
return idao.getItemIds();
}
}