Class SparqlServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
se.liu.ida.hefquin.service.SparqlServlet
- All Implemented Interfaces:
 jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class SparqlServlet
extends jakarta.servlet.http.HttpServlet
Servlet for handling SPARQL queries via HTTP GET and POST requests.
 Supports multiple result formats and integrates with the HeFQUIN engine.
- See Also:
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handles HTTP GET requests containing a SPARQL query passed via the 'query' parameter.protected voiddoPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handles HTTP POST requests containing SPARQL queries.voidinit(jakarta.servlet.ServletConfig config) Initializes the servlet.Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log 
- 
Constructor Details
- 
SparqlServlet
public SparqlServlet() 
 - 
 - 
Method Details
- 
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException Initializes the servlet.- Specified by:
 initin interfacejakarta.servlet.Servlet- Overrides:
 initin classjakarta.servlet.GenericServlet- Parameters:
 config- the servlet configuration- Throws:
 jakarta.servlet.ServletException- if the engine initialization fails
 - 
doPost
protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException Handles HTTP POST requests containing SPARQL queries. Supports both 'application/sparql-query' and 'application/x-www-form-urlencoded'.- Overrides:
 doPostin classjakarta.servlet.http.HttpServlet- Parameters:
 request- the HTTP requestresponse- the HTTP response- Throws:
 IOException
 - 
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException Handles HTTP GET requests containing a SPARQL query passed via the 'query' parameter.- Overrides:
 doGetin classjakarta.servlet.http.HttpServlet- Parameters:
 request- the HTTP requestresponse- the HTTP response- Throws:
 IOException
 
 -