de.fuberlin.wiwiss.d2rq.server
Class RequestParamHandler
java.lang.Object
de.fuberlin.wiwiss.d2rq.server.RequestParamHandler
public class RequestParamHandler
- extends Object
Analyzes an HttpServletRequest to check for the presence
of an ?output=n3 or ?output=rdfxml request parameter in
the URI. If present, returns a modified HttpServletRequest
that has the appropriate MIME type in the Accept: header.
This request can then be fed into the rest of our content
negotiation based tooling.
TODO: The list of shortname=>mimetype mappings should live
in ContentTypeNegotiator, which should have new methods
getMatchWithOverride() and getOverrideName(), and this
class here should just have static methods getParamFromURI,
removeParamFromURI, addParamToURI. The whole WrappedRequest
thing is smelly.
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestParamHandler
public RequestParamHandler(javax.servlet.http.HttpServletRequest request)
removeOutputRequestParam
public static String removeOutputRequestParam(String uri)
- Removes the "output=foobar" part of a URI if present.
isMatchingRequest
public boolean isMatchingRequest()
getModifiedRequest
public javax.servlet.http.HttpServletRequest getModifiedRequest()