Class Dictionary


  • public class Dictionary
    extends APIRequestHandler
    /api/results/dictionary : Generates a dictionary from search results.

    Input HTTP parameters:

    • threadId - The search task ID returned by a previous call to /api/search.
    • definitionLayerId - (Optional) ID of the layer that provides the 'definition' of each entry. If not specified, a word-list is returned.

    Output: A plain text file containing a dictionary generated from the given search results, with repeat words numbered in parentheses, e.g.
     tea    ti
     teach  tiJ
     teacher        tiJ@
     teacher(2)     tiJ@r
     teachers       tiJ@z
     teaching       tiJIN
     team   tim
     teams  timz
     tears  t7z
     tears(2)       t8z
    
    Author:
    Robert Fromont
    • Constructor Detail

      • Dictionary

        public Dictionary()
        Constructor
    • Method Detail

      • get

        public void get​(RequestParameters parameters,
                        OutputStream out,
                        Consumer<String> fileName,
                        Consumer<Integer> httpStatus)
        The GET method for the servlet.
        Parameters:
        parameters - Request parameter map.
        out - Response body output stream.
        fileName - Receives the filename for specification in the response headers.
        httpStatus - Receives the response status code, in case or error.