Class AbstractServlet

    • Constructor Detail

      • AbstractServlet

        public AbstractServlet()
    • Method Detail

      • getServletConfig

        public javax.servlet.ServletConfig getServletConfig()
        Specified by:
        getServletConfig in interface javax.servlet.Servlet
      • getServletInfo

        public String getServletInfo()
        Specified by:
        getServletInfo in interface javax.servlet.Servlet
      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Servlet
        Throws:
        javax.servlet.ServletException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Servlet
      • service

        public final void service​(javax.servlet.ServletRequest req,
                                  javax.servlet.ServletResponse resp)
                           throws javax.servlet.ServletException,
                                  IOException
        Specified by:
        service in interface javax.servlet.Servlet
        Throws:
        javax.servlet.ServletException
        IOException
      • service

        public void service​(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp)
                     throws javax.servlet.ServletException,
                            IOException
        Throws:
        javax.servlet.ServletException
        IOException
      • getTupleResultFormat

        protected org.eclipse.rdf4j.query.resultio.QueryResultFormat getTupleResultFormat​(javax.servlet.http.HttpServletRequest req,
                                                                                          javax.servlet.ServletResponse resp)
      • getBooleanResultFormat

        protected org.eclipse.rdf4j.query.resultio.QueryResultFormat getBooleanResultFormat​(javax.servlet.http.HttpServletRequest req,
                                                                                            javax.servlet.ServletResponse resp)
      • getJSONPResultFormat

        protected org.eclipse.rdf4j.query.resultio.QueryResultFormat getJSONPResultFormat​(javax.servlet.http.HttpServletRequest req,
                                                                                          javax.servlet.ServletResponse resp)
      • getResultWriter

        protected org.eclipse.rdf4j.query.resultio.QueryResultWriter getResultWriter​(javax.servlet.http.HttpServletRequest req,
                                                                                     javax.servlet.ServletResponse resp,
                                                                                     OutputStream outputStream)
                                                                              throws org.eclipse.rdf4j.query.resultio.UnsupportedQueryResultFormatException,
                                                                                     IOException
        Throws:
        org.eclipse.rdf4j.query.resultio.UnsupportedQueryResultFormatException
        IOException
      • getTupleResultBuilder

        protected TupleResultBuilder getTupleResultBuilder​(javax.servlet.http.HttpServletRequest req,
                                                           javax.servlet.http.HttpServletResponse resp,
                                                           OutputStream outputStream)
                                                    throws org.eclipse.rdf4j.query.resultio.UnsupportedQueryResultFormatException,
                                                           IOException
        Gets a TupleResultBuilder based on the Accept header, and sets the result content type to the best available match for that, returning a builder that can be used to write out the results.
        Parameters:
        req - the current HTTP request
        resp - the current HTTP response
        outputStream - TODO
        Returns:
        a builder that can be used to write out the results
        Throws:
        IOException
        org.eclipse.rdf4j.query.resultio.UnsupportedQueryResultFormatException
      • checkJSONP

        protected org.eclipse.rdf4j.query.resultio.QueryResultWriter checkJSONP​(javax.servlet.http.HttpServletRequest req,
                                                                                OutputStream outputStream)
                                                                         throws IOException
        Throws:
        IOException