org.openrdf.server.metadata.http
Class Request

java.lang.Object
  extended by org.openrdf.server.metadata.http.RequestHeader
      extended by org.openrdf.server.metadata.http.Request

public class Request
extends RequestHeader

Utility class for HttpServletRequest.

Author:
James Leigh

Field Summary
protected  ObjectFactory of
           
protected  ValueFactory vf
           
 
Constructor Summary
Request(MessageBodyReader reader, MessageBodyWriter writer, File dataDir, HttpServletRequest request, ObjectConnection con)
           
 
Method Summary
 URI createURI(String uriSpec)
           
 void flush()
           
 Object getBody(Class<?> class1, Type type)
           
 String getContentType(Method method)
           
 File getFile()
           
 InputStream getInputStream()
           
 ObjectConnection getObjectConnection()
           
 String getOperation()
           
 Object getParameter(String[] names, Type type, Class<?> klass)
           
 Map<String,String[]> getParameterMap()
           
 RDFResource getRequestedResource()
           
 boolean isAcceptable(Class<?> type)
           
 boolean isAcceptable(Method method)
           
 boolean isAcceptable(String mediaType)
           
 boolean isAcceptable(String mediaType, Class<?> type)
           
 boolean isQueryStringPresent()
           
 boolean isReadable(Class<?> class1, Type type)
           
 boolean modifiedSince(String entityTag, long lastModified)
           
 boolean unmodifiedSince(String entityTag, long lastModified)
           
 
Methods inherited from class org.openrdf.server.metadata.http.RequestHeader
getAcceptable, getAuthority, getContentType, getDateHeader, getHeader, getHeaderNames, getHeaders, getMaxAge, getMaxStale, getMethod, getMinFresh, getPath, getRequestURI, getRequestURL, getURI, getVary, getVaryHeaders, invalidatesCache, isMessageBody, isNoCache, isOnlyIfCache, isSafe, isStorable, parseURI, resolve, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

of

protected ObjectFactory of

vf

protected ValueFactory vf
Constructor Detail

Request

public Request(MessageBodyReader reader,
               MessageBodyWriter writer,
               File dataDir,
               HttpServletRequest request,
               ObjectConnection con)
        throws QueryEvaluationException,
               RepositoryException
Throws:
QueryEvaluationException
RepositoryException
Method Detail

createURI

public URI createURI(String uriSpec)

getFile

public File getFile()

getBody

public Object getBody(Class<?> class1,
                      Type type)
               throws IOException,
                      MimeTypeParseException
Throws:
IOException
MimeTypeParseException

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getObjectConnection

public ObjectConnection getObjectConnection()

getOperation

public String getOperation()

getParameter

public Object getParameter(String[] names,
                           Type type,
                           Class<?> klass)
                    throws RepositoryException
Throws:
RepositoryException

getParameterMap

public Map<String,String[]> getParameterMap()

getRequestedResource

public RDFResource getRequestedResource()

flush

public void flush()
           throws RepositoryException,
                  QueryEvaluationException
Throws:
RepositoryException
QueryEvaluationException

isAcceptable

public boolean isAcceptable(Method method)
                     throws MimeTypeParseException
Throws:
MimeTypeParseException

isAcceptable

public boolean isAcceptable(Class<?> type)
                     throws MimeTypeParseException
Throws:
MimeTypeParseException

isAcceptable

public boolean isAcceptable(String mediaType,
                            Class<?> type)
                     throws MimeTypeParseException
Throws:
MimeTypeParseException

isAcceptable

public boolean isAcceptable(String mediaType)
                     throws MimeTypeParseException
Throws:
MimeTypeParseException

isQueryStringPresent

public boolean isQueryStringPresent()

isReadable

public boolean isReadable(Class<?> class1,
                          Type type)

getContentType

public String getContentType(Method method)
                      throws MimeTypeParseException
Throws:
MimeTypeParseException

modifiedSince

public boolean modifiedSince(String entityTag,
                             long lastModified)
                      throws MimeTypeParseException
Throws:
MimeTypeParseException

unmodifiedSince

public boolean unmodifiedSince(String entityTag,
                               long lastModified)
                        throws MimeTypeParseException
Throws:
MimeTypeParseException


Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.