Search in sources :

Example 96 with MCRCategory

use of org.mycore.datamodel.classifications2.MCRCategory in project mycore by MyCoRe-Org.

the class MCRSolrCategoryDAO method addCategory.

@Override
public MCRCategory addCategory(MCRCategoryID parentID, MCRCategory category, int position) {
    MCRCategory parent = super.addCategory(parentID, category, position);
    MCRSolrClassificationUtil.reindex(category, parent);
    return parent;
}
Also used : MCRCategory(org.mycore.datamodel.classifications2.MCRCategory)

Example 97 with MCRCategory

use of org.mycore.datamodel.classifications2.MCRCategory in project mycore by MyCoRe-Org.

the class MCRSolrCategoryDAO method removeLabel.

@Override
public MCRCategory removeLabel(MCRCategoryID id, String lang) {
    MCRCategory category = super.removeLabel(id, lang);
    MCRSolrClassificationUtil.reindex(category);
    return category;
}
Also used : MCRCategory(org.mycore.datamodel.classifications2.MCRCategory)

Example 98 with MCRCategory

use of org.mycore.datamodel.classifications2.MCRCategory in project mycore by MyCoRe-Org.

the class MCRSolrCategoryDAO method setURI.

@Override
public MCRCategory setURI(MCRCategoryID id, URI uri) {
    MCRCategory category = super.setURI(id, uri);
    MCRSolrClassificationUtil.reindex(category);
    return category;
}
Also used : MCRCategory(org.mycore.datamodel.classifications2.MCRCategory)

Aggregations

MCRCategory (org.mycore.datamodel.classifications2.MCRCategory)87 MCRCategoryID (org.mycore.datamodel.classifications2.MCRCategoryID)36 Test (org.junit.Test)24 MCRLabel (org.mycore.datamodel.classifications2.MCRLabel)17 MCRCategoryDAO (org.mycore.datamodel.classifications2.MCRCategoryDAO)10 ArrayList (java.util.ArrayList)9 Document (org.jdom2.Document)9 Element (org.jdom2.Element)8 MCRException (org.mycore.common.MCRException)8 IOException (java.io.IOException)6 EntityManager (javax.persistence.EntityManager)6 URI (java.net.URI)5 Collection (java.util.Collection)5 HashMap (java.util.HashMap)5 LogManager (org.apache.logging.log4j.LogManager)5 Logger (org.apache.logging.log4j.Logger)5 MCRCommand (org.mycore.frontend.cli.annotation.MCRCommand)5 HashSet (java.util.HashSet)4 LinkedList (java.util.LinkedList)4 List (java.util.List)4