|
Esri Geoportal Server 1.0
|
||||||||
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 com.esri.gpt.framework.context.BaseServlet com.esri.gpt.control.georss.RestQueryServlet
public class RestQueryServlet
Servlet end-point for rest based catalog query requests.
Nested Class Summary | |
---|---|
protected static class |
RestQueryServlet.ResponseFormat
Enumeration of response formats. |
Constructor Summary | |
---|---|
RestQueryServlet()
Default constructor. |
Method Summary | |
---|---|
protected void |
execute(HttpServletRequest request,
HttpServletResponse response,
RequestContext context)
Processes the HTTP request. |
protected SearchResultRecords |
executeQuery(HttpServletRequest request,
RequestContext context,
MessageBroker messageBroker,
RestQuery query)
Executes the query. |
protected SearchResult |
executeQuery1(HttpServletRequest request,
RequestContext context,
MessageBroker messageBroker,
RestQuery query)
Execute Query that returns a SearchResult object (SearchResult as opposed to the SearchResultRecord which executeQuery does). |
protected String |
getRequestParameter(HttpServletRequest request,
String parameterKey)
Gets the HTTP request parameter value associated with a key. |
protected RestQueryServlet.ResponseFormat |
getResponseFormat(HttpServletRequest request,
RestQuery query)
Determines the response format. |
void |
init(ServletConfig config)
Initializes the servlet. |
protected FeedWriter |
makeFeedWriter(HttpServletRequest request,
RequestContext context,
PrintWriter printWriter,
MessageBroker messageBroker,
RestQuery query)
Makes a writer capable of generating an appropriate response based upon the requested response format. |
protected RestQuery |
parseRequest(HttpServletRequest request,
RequestContext context)
Parses the request and generates a populated query suitable for execution. |
protected void |
setResponseContentType(HttpServletRequest request,
HttpServletResponse response,
RestQuery query)
Sets the HTTP content type for the response. |
protected SearchCriteria |
toSearchCriteria(HttpServletRequest request,
RequestContext context,
RestQuery query)
Generates a search critera object from the request. |
Methods inherited from class com.esri.gpt.framework.context.BaseServlet |
---|
authenticate, doGet, doPost, getCredentials, getLogger, getParameterValue, getRealm, readInputCharacters, writeCharacterResponse, writeHtmlResponse, writeXmlResponse |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, 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 RestQueryServlet()
Method Detail |
---|
protected void execute(HttpServletRequest request, HttpServletResponse response, RequestContext context) throws Exception
execute
in class BaseServlet
request
- the HTTP request.response
- HTTP response.context
- request context
Exception
- if an exception occursprotected SearchResult executeQuery1(HttpServletRequest request, RequestContext context, MessageBroker messageBroker, RestQuery query) throws SearchException
request
- the requestcontext
- the contextmessageBroker
- the message brokerquery
- the query
SearchException
- the search exceptionprotected SearchResultRecords executeQuery(HttpServletRequest request, RequestContext context, MessageBroker messageBroker, RestQuery query) throws SearchException
request
- the HTTP requestcontext
- the request contextmessageBroker
- the resource message brokerquery
- the query to execute
SearchException
- if an exception occursprotected String getRequestParameter(HttpServletRequest request, String parameterKey)
request
- the HTTP requestparameterKey
- the parameter key
protected void setResponseContentType(HttpServletRequest request, HttpServletResponse response, RestQuery query)
request
- the HTTP requestresponse
- the HTTP responsequery
- the rest queryprotected RestQueryServlet.ResponseFormat getResponseFormat(HttpServletRequest request, RestQuery query)
request
- the HTTP requestquery
- the rest query
public void init(ServletConfig config) throws ServletException
init
in interface Servlet
init
in class GenericServlet
config
- the servlet configuration
ServletException
- if an exception occursprotected FeedWriter makeFeedWriter(HttpServletRequest request, RequestContext context, PrintWriter printWriter, MessageBroker messageBroker, RestQuery query)
request
- the HTTP requestcontext
- the request contextprintWriter
- the underlying print writermessageBroker
- the message brokerquery
- the query
protected RestQuery parseRequest(HttpServletRequest request, RequestContext context)
RestQuery query = new RestQuery();
RestQueryParser parser = new RestQueryParser(request,context,query);
parser.parseRepositoryId("rid");
parser.parseResponseFormat("f");
parser.parseResponseGeometry("geometryType");
parser.parseResponseStyle("style");
parser.parseResponseTarget("target");
parser.parseStartRecord("start",1);
parser.parseMaxRecords("max",10);
parser.parsePropertyIsEqualTo("uuid","uuid");
parser.parsePropertyIsLike("searchText","anytext");
parser.parsePropertyList("contentType","dc:type",",",true);
parser.parsePropertyList("dataCategory","dc:subject",",",true);
parser.parsePropertyRange("after","before","dct:modified");
parser.parseSpatialClause("bbox","spatialRel","geometry");
parser.parseSortables("orderBy");
return query;
request
- the HTTP requestcontext
- the request context
protected SearchCriteria toSearchCriteria(HttpServletRequest request, RequestContext context, RestQuery query)
request
- the HTTP requestcontext
- the request contextquery
- the pre-populated rest query
|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |