|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet org.trippi.server.http.TrippiServlet
public class TrippiServlet
A Java servlet that exposes TrippiServer
(s) via HTTP.
The required servlet initialization parameter, configFile specifies the full path to the trippi.config file. When responding to a call at the base URL of this servlet, all profiles in the configFile will be listed. They can be accessed separately at baseURL/profileId.
The optional parameter, profileId, indicates a particular triplestore to expose. If specified, this changes the behavior of this servlet so that only one triplestore is exposed. It is accessed directly at the baseURL of this servlet.
Constructor Summary | |
---|---|
TrippiServlet()
|
Method Summary | |
---|---|
boolean |
closeOnDestroy()
Override this method to return false if the connector(s) should not be closed when the servlet is stopped. |
void |
destroy()
Close the connector instance when cleaning up if closeOnDestroy(). |
void |
doFind(TrippiServer server,
java.lang.String type,
java.lang.String template,
java.lang.String lang,
java.lang.String query,
java.lang.String limit,
java.lang.String distinct,
java.lang.String format,
java.lang.String dumbTypes,
boolean streamImmediately,
java.lang.String flush,
javax.servlet.http.HttpServletResponse response)
|
void |
doForm(TrippiServer server,
java.io.PrintWriter out,
java.lang.String requestURI,
java.lang.String contextPath)
|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Dispatch the request to the appropriate server. |
void |
doGet(TrippiServer server,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
doIndex(java.io.PrintWriter out,
java.lang.String requestURI,
java.lang.String contextPath)
|
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Exactly the same behavior as doGet. |
TriplestoreConnector |
getConnector()
Get the single connector that this servlet is configured to expose, pre-configured with aliases. |
java.lang.String |
getContext(java.lang.String origContext)
|
java.lang.String |
getErrorStylesheetLocation()
|
java.lang.String |
getFormStylesheetLocation()
|
java.lang.String |
getIndexStylesheetLocation()
|
TriplestoreReader |
getReader()
|
TriplestoreWriter |
getWriter()
|
void |
init()
Initialize the servlet. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrippiServlet()
Method Detail |
---|
public TriplestoreReader getReader() throws javax.servlet.ServletException
javax.servlet.ServletException
public TriplestoreWriter getWriter() throws javax.servlet.ServletException
javax.servlet.ServletException
public TriplestoreConnector getConnector() throws javax.servlet.ServletException
javax.servlet.ServletException
public boolean closeOnDestroy()
public java.lang.String getContext(java.lang.String origContext)
public java.lang.String getErrorStylesheetLocation()
public java.lang.String getIndexStylesheetLocation()
public java.lang.String getFormStylesheetLocation()
public final void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void doGet(TrippiServer server, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
java.lang.Exception
public void doIndex(java.io.PrintWriter out, java.lang.String requestURI, java.lang.String contextPath) throws java.lang.Exception
java.lang.Exception
public void doForm(TrippiServer server, java.io.PrintWriter out, java.lang.String requestURI, java.lang.String contextPath) throws java.lang.Exception
java.lang.Exception
public void doFind(TrippiServer server, java.lang.String type, java.lang.String template, java.lang.String lang, java.lang.String query, java.lang.String limit, java.lang.String distinct, java.lang.String format, java.lang.String dumbTypes, boolean streamImmediately, java.lang.String flush, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
java.lang.Exception
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |