use of org.mycore.datamodel.classifications2.MCRLabel in project mycore by MyCoRe-Org.
the class MCRCategoryMapper method getMappingRule.
protected String getMappingRule(MCRCategoryID categoryID) {
MCRCategory category = DAO.getCategory(categoryID, 0);
// "x-mapper" was used in previous versions of mycore
MCRLabel label = category.getLabel("x-mapping").orElse(category.getLabel("x-mapper").orElseThrow(() -> new MCRException("Category " + category + " does not hav a label for 'x-mapping'.")));
return label.getText();
}
use of org.mycore.datamodel.classifications2.MCRLabel in project mycore by MyCoRe-Org.
the class MCRSolrCategoryDAO method setLabels.
@Override
public MCRCategory setLabels(MCRCategoryID id, Set<MCRLabel> labels) {
MCRCategory category = super.setLabels(id, labels);
MCRSolrClassificationUtil.reindex(category);
return category;
}
use of org.mycore.datamodel.classifications2.MCRLabel in project mycore by MyCoRe-Org.
the class MCRSolrCategoryDAO method setLabel.
@Override
public MCRCategory setLabel(MCRCategoryID id, MCRLabel label) {
MCRCategory category = super.setLabel(id, label);
MCRSolrClassificationUtil.reindex(category);
return category;
}
Aggregations