use of org.mycore.datamodel.classifications2.MCRCategoryDAO in project mycore by MyCoRe-Org.
the class MCRXMLFunctions method isCategoryID.
/**
* @param classificationId
* @param categoryId
* @return
*/
public static boolean isCategoryID(String classificationId, String categoryId) {
MCRCategory category = null;
try {
MCRCategoryID categID = MCRCategoryID.fromString(classificationId + ":" + categoryId);
MCRCategoryDAO dao = MCRCategoryDAOFactory.getInstance();
category = dao.getCategory(categID, 0);
} catch (Throwable e) {
LOGGER.error("Could not determine state for classification id {} and category id {}", classificationId, categoryId, e);
}
return category != null;
}
Aggregations