public class RESTServlet extends BigdataRDFServlet
ATTR_BLUEPRINTS, MIME_JSON, MIME_RDF_XML, MIME_SPARQL_QUERY, MIME_SPARQL_RESULTS_JSON, MIME_SPARQL_RESULTS_XML, MIME_SPARQL_UPDATE, NA, OUTPUT_FORMAT_JSON, OUTPUT_FORMAT_JSON_SHORT, OUTPUT_FORMAT_QUERY_PARAMETER, OUTPUT_FORMAT_XML, OUTPUT_FORMAT_XML_SHORT, UNDEFINED_WORKBENCH_NAMESPACE, UTF8
ATTRIBUTE_RDF_CONTEXT, charset, DELETE, GET, HTTP_BADREQUEST, HTTP_HEADER_BIGDATA_READ_ONLY, HTTP_INTERNALERROR, HTTP_METHOD_NOT_ALLOWED, HTTP_NOTFOUND, HTTP_NOTIMPLEMENTED, HTTP_OK, POST, PUT
MIME_APPLICATION_JSON, MIME_APPLICATION_URL_ENCODED, MIME_APPLICATION_XML, MIME_DEFAULT_BINARY, MIME_GRAPH_ML, MIME_PROPERTIES_XML, MIME_TEXT_HTML, MIME_TEXT_JAVASCRIPT, MIME_TEXT_PLAIN
Constructor and Description |
---|
RESTServlet() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Overridden to destroy the delegate
Servlet instances. |
protected void |
doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Delegate to the
DeleteServlet . |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
A query can be submitted with a POST if a query parameter is provided.
|
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
A PUT request always delegates to the
UpdateServlet . |
void |
init()
Overridden to create and initialize the delegate
Servlet
instances. |
buildAndCommitBooleanResponse, buildAndCommitNamespaceNotFoundResponse, buildAndCommitRangeCountResponse, getNamespace, getTimestamp, isAttachment, launderThrowable, newPipedInputStream, parseBindings, sendGraph, sendProperties, toURIs
buildAndCommitResponse, decodeContexts, getBigdataRDFContext, getBooleanValue, getIndexManager, getIndexManager, getServiceURIs, readFully, submitApiTask
doHead, doOptions, doTrace, getLastModified, service, service
public void init() throws javax.servlet.ServletException
Servlet
instances.init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void destroy()
Servlet
instances.destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
doGet
in class javax.servlet.http.HttpServlet
IOException
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
InsertServlet
or DeleteServlet
as appropriate.doPost
in class javax.servlet.http.HttpServlet
IOException
protected void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
UpdateServlet
.
Note: The semantics of PUT are "DELETE+INSERT" for the API. PUT is not support for just "INSERT". Use POST instead for that purpose.
doPut
in class javax.servlet.http.HttpServlet
IOException
protected void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
DeleteServlet
.doDelete
in class javax.servlet.http.HttpServlet
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.