Class MCRClassificationEditorResource

java.lang.Object
org.mycore.frontend.classeditor.resources.MCRClassificationEditorResource

@Path("classifications") public class MCRClassificationEditorResource extends Object
This class is responsible for CRUD-operations of MCRCategories. It accepts JSON objects of the form [{ "ID":{"rootID":"abcd","categID":"1234"} "label":[ {"lang":"de","text":"Rubriken Test 2 fuer MyCoRe","descriptions":"test de"}, {"lang":"en","text":"Rubric test 2 for MyCoRe","descriptions":"test en"} ], "parentID":{"rootID":"abcd","categID":"parent"} "children:"URL" } ... ]
Author:
chi
  • Constructor Details

    • MCRClassificationEditorResource

      public MCRClassificationEditorResource()
  • Method Details

    • test

      @GET @Produces("text/plain") @Path("test") public String test()
    • get

      @GET @Path("{rootidStr}") @Produces("application/json") public String get(@PathParam("rootidStr") String rootidStr)
      Parameters:
      rootidStr - rootID.categID
      Returns:
    • get

      @GET @Path("{rootidStr}/{categidStr}") @Produces("application/json") public String get(@PathParam("rootidStr") String rootidStr, @PathParam("categidStr") String categidStr)
      Parameters:
      rootidStr - rootID.categID
      Returns:
    • newIDJson

      @GET @Path("newID/{rootID}") @Produces("application/json") public String newIDJson(@PathParam("rootID") String rootID)
    • newRootIDJson

      @GET @Path("newID") @Produces("application/json") public String newRootIDJson()
    • export

      @GET @Path("export/{rootidStr}") @Produces("application/xml") public String export(@PathParam("rootidStr") String rootidStr)
    • getClassification

      @GET @Produces("application/json") public jakarta.ws.rs.core.Response getClassification()
    • deleteCateg

      @DELETE @Consumes("application/json") public jakarta.ws.rs.core.Response deleteCateg(String json)
    • save

      @POST @Path("save") @Consumes("application/json") public jakarta.ws.rs.core.Response save(String json)
    • importClassification

      @POST @Path("import") @Consumes("multipart/form-data") @Produces("text/html") public jakarta.ws.rs.core.Response importClassification(InputStream uploadedInputStream)
    • filter

      @GET @Path("filter/{text}") @Produces("application/json") public jakarta.ws.rs.core.Response filter(@PathParam("text") String text)
    • retrieveLinkedObjects

      @GET @Path("link/{id}") @Produces("application/json") public jakarta.ws.rs.core.Response retrieveLinkedObjects(@PathParam("id") String id, @QueryParam("start") Integer start, @QueryParam("rows") Integer rows) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • newRootID

      protected MCRCategoryID newRootID()
    • buildJsonError

      protected String buildJsonError(String errorType, MCRCategoryID mcrCategoryID)