Package io.goobi.viewer.servlets
Class HarvestServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
io.goobi.viewer.servlets.HarvestServlet
- All Implemented Interfaces:
Servlet,ServletConfig,Serializable
Servlet for harvesting crowdsourcing data and overview pages.
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static org.json.JSONArrayconvertToJSON(long totalCount, List<? extends Harvestable> objects) convertToJSON.protected voiddoGet(HttpServletRequest request, HttpServletResponse response) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
HarvestServlet
public HarvestServlet()Creates a new HarvestServlet instance.- See Also:
-
-
Method Details
-
doGet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - Overrides:
doGetin classHttpServlet- Throws:
ServletExceptionIOException
-
convertToJSON
protected static org.json.JSONArray convertToJSON(long totalCount, List<? extends Harvestable> objects) convertToJSON.- Parameters:
totalCount- total number of matching recordsobjects- harvestable items to serialize- Returns:
- a JSON array with the total count as first element followed by one object per harvestable item
-