Search in sources :

Example 96 with MCRCategoryID

use of org.mycore.datamodel.classifications2.MCRCategoryID 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 MCRCategoryID

use of org.mycore.datamodel.classifications2.MCRCategoryID 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 MCRCategoryID

use of org.mycore.datamodel.classifications2.MCRCategoryID 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

MCRCategoryID (org.mycore.datamodel.classifications2.MCRCategoryID)82 MCRCategory (org.mycore.datamodel.classifications2.MCRCategory)42 Test (org.junit.Test)14 MCRLabel (org.mycore.datamodel.classifications2.MCRLabel)13 Element (org.jdom2.Element)12 MCRCategLinkReference (org.mycore.datamodel.classifications2.MCRCategLinkReference)11 ArrayList (java.util.ArrayList)8 HashSet (java.util.HashSet)8 MCRCategoryDAO (org.mycore.datamodel.classifications2.MCRCategoryDAO)7 HashMap (java.util.HashMap)6 MCRException (org.mycore.common.MCRException)6 EntityManager (javax.persistence.EntityManager)5 Document (org.jdom2.Document)5 MCRCommand (org.mycore.frontend.cli.annotation.MCRCommand)5 JsonElement (com.google.gson.JsonElement)4 JsonObject (com.google.gson.JsonObject)4 Collection (java.util.Collection)4 LinkedList (java.util.LinkedList)4 MCRObjectID (org.mycore.datamodel.metadata.MCRObjectID)4 MCRJSONCategory (org.mycore.frontend.classeditor.json.MCRJSONCategory)4