Class MCRAltoHighlightResource

java.lang.Object
org.mycore.mets.resource.MCRAltoHighlightResource

@Path("/alto/highlight") public class MCRAltoHighlightResource extends Object

Solr resource for alto text highlighting.

Example: rsc/alto/highlight/mycore_derivate_00000001?q="jena paradies"
 [
     {
         "id": "mycore_derivate_00000001:/alto/alto_1.xml",
         "hits": [
              {
                  "hl": "Es ist schön in Jena Paradies.",
                  "positions":[
                      {
                          "content": "Jena",
                          "xpos": 1566,
                          "vpos": 1100,
                          "width": 105,
                          "height": 44
                      },
                      {
                         "content": "Paradies",
                          "xpos": 1671,
                          "vpos": 1100,
                          "width": 185,
                          "height": 47
                      }
                  ]
              },
              {
                  "hl": ...,
                  "positions": [
                      ...
                  ]
              }
              ...
         ]
     },

     {
         "id": "alto/alto_2.xml",
         ...
     },

     ...

 ]
 
  • Constructor Details

    • MCRAltoHighlightResource

      public MCRAltoHighlightResource()
  • Method Details

    • query

      @GET @Path("{derivateId}") @Produces("application/json;charset=utf-8") public jakarta.ws.rs.core.Response query(@PathParam("derivateId") String derivateId, @QueryParam("q") String query)
    • buildQuery

      protected String buildQuery(String query)
    • addWord

      protected void addWord(List<String> words, String word)