public class RestfulProductQueryServlet extends ProductQueryServlet
RestfulProductQueryServlet
is an alternative to the standard ProductQueryServlet
that allows clients to use a more intuitive syntax for encoding query constraints, than the traditional
DIS-style syntax.
For example, instead of encoding a request as:
"?q=identifier+EQ+urn:nasa:pds:phx_lidar:reduced:LS075RLS_00902835894_1885M1+AND+package+EQ+TGZ"
a client could encode it as:
"?identifier=urn:nasa:pds:phx_lidar:reduced:LS075RLS_00902835894_1885M1&package=TGZ".
Note that this servlet is meant to be back-ward compatible, i.e. it will first process a request by
parsing the "xmlq=" and "q=" parameters. If those are not found, it will build a request by combining
all the available HTTP parameters in logical AND.
Note also that this servlet is NOT enabled by default
(i.e. it must be explicitly configured by changing the web-grid deployment descriptor web.xml).handlers
Constructor and Description |
---|
RestfulProductQueryServlet() |
Modifier and Type | Method and Description |
---|---|
protected XMLQuery |
getQuery(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Overridden implementation that defaults to the standard behavior if the parameters "q" or "xmlq" are found,
otherwise it uses the available request parameters to build a constraint query with logical AND.
|
displayable, getServers, handleQuery, suggestFilename
doGet, doPost
approveAccess, getConfigBean, getConfiguration
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
protected XMLQuery getQuery(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException
getQuery
in class QueryServlet
req
- a HttpServletRequest
value.res
- a HttpServletResponse
value.XMLQuery
value.IOException
- if an error occurs.Copyright © 1999-2014 Apache OODT. All Rights Reserved.