Class VitroRequest
- java.lang.Object
-
- javax.servlet.ServletRequestWrapper
-
- javax.servlet.http.HttpServletRequestWrapper
-
- edu.cornell.mannlib.vitro.webapp.controller.VitroRequest
-
- All Implemented Interfaces:
javax.servlet.http.HttpServletRequest,javax.servlet.ServletRequest
public class VitroRequest extends javax.servlet.http.HttpServletRequestWrapper
-
-
Field Summary
Fields Modifier and Type Field Description static StringID_FOR_ABOX_MODELstatic StringID_FOR_DISPLAY_MODELstatic StringID_FOR_TBOX_MODELstatic StringID_FOR_WRITE_MODELstatic StringSPECIAL_WRITE_MODEL
-
Constructor Summary
Constructors Constructor Description VitroRequest(javax.servlet.http.HttpServletRequest _req)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationBeangetAppBean()StringgetClientAddr()Gets the the ip of the client.CollatorgetCollator()org.apache.jena.query.DatasetgetDataset()org.apache.jena.ontology.OntModelgetDisplayModel()org.apache.commons.fileupload.FileItemgetFileItem(String name)There may be more than one file item with the given name.Map<String,List<org.apache.commons.fileupload.FileItem>>getFiles()org.apache.commons.fileupload.FileUploadExceptiongetFileSizeException()Could be either FileSizeLimitExceededException or SizeLimitExceededException, so return their common ancestor.StringgetIdForDisplayModel()Gets an identifier for the display model associated with this request.org.apache.jena.ontology.OntModelgetJenaOntModel()org.apache.jena.ontology.OntModelgetLanguageNeutralUnionFullModel()WebappDaoFactorygetLanguageNeutralWebappDaoFactory()StringgetNameForABOXModel()Gets an identifier for the a-box model associated with this request.StringgetNameForTBOXModel()Gets an identifier for the t-box model associated with this request.StringgetNameForWriteModel()Gets an identifier for the write model associated with this request.OntModelSelectorgetOntModelSelector()StringgetParameter(String name)Map<String,String[]>getParameterMap()String[]getParameterValues(String name)RDFServicegetRDFService()WebappDaoFactorygetUnfilteredAssertionsWebappDaoFactory()gets assertions-only WebappDaoFactory with no policy filteringorg.apache.jena.query.DatasetgetUnfilteredDataset()RDFServicegetUnfilteredRDFService()WebappDaoFactorygetUnfilteredWebappDaoFactory()gets assertions+inference WebappDaoFactory with no policy filteringWebappDaoFactorygetWebappDaoFactory()Gets WebappDaoFactory with appropriate filtering for the requestorg.apache.jena.ontology.OntModelgetWriteModel()booleanhasFileSizeException()If the uploaded file exceeded the maximum size, and if the strategy said to stash the exception, it will be stored as a request attribute.booleanisMultipart()voidsetCollator(Collator collator)-
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
-
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterNames, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterNames, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
-
-
-
-
Field Detail
-
SPECIAL_WRITE_MODEL
public static final String SPECIAL_WRITE_MODEL
- See Also:
- Constant Field Values
-
ID_FOR_WRITE_MODEL
public static final String ID_FOR_WRITE_MODEL
- See Also:
- Constant Field Values
-
ID_FOR_TBOX_MODEL
public static final String ID_FOR_TBOX_MODEL
- See Also:
- Constant Field Values
-
ID_FOR_ABOX_MODEL
public static final String ID_FOR_ABOX_MODEL
- See Also:
- Constant Field Values
-
ID_FOR_DISPLAY_MODEL
public static final String ID_FOR_DISPLAY_MODEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRDFService
public RDFService getRDFService()
-
getUnfilteredRDFService
public RDFService getUnfilteredRDFService()
-
getWebappDaoFactory
public WebappDaoFactory getWebappDaoFactory()
Gets WebappDaoFactory with appropriate filtering for the request
-
getUnfilteredWebappDaoFactory
public WebappDaoFactory getUnfilteredWebappDaoFactory()
gets assertions+inference WebappDaoFactory with no policy filtering
-
getUnfilteredAssertionsWebappDaoFactory
public WebappDaoFactory getUnfilteredAssertionsWebappDaoFactory()
gets assertions-only WebappDaoFactory with no policy filtering
-
getDataset
public org.apache.jena.query.Dataset getDataset()
-
getUnfilteredDataset
public org.apache.jena.query.Dataset getUnfilteredDataset()
-
getWriteModel
public org.apache.jena.ontology.OntModel getWriteModel()
-
getOntModelSelector
public OntModelSelector getOntModelSelector()
-
getJenaOntModel
public org.apache.jena.ontology.OntModel getJenaOntModel()
-
getDisplayModel
public org.apache.jena.ontology.OntModel getDisplayModel()
-
getIdForDisplayModel
public String getIdForDisplayModel()
Gets an identifier for the display model associated with this request. It may have been switched from the normal display model to a different one. This could be a URI or aVitroModelSource.ModelName
-
getNameForABOXModel
public String getNameForABOXModel()
Gets an identifier for the a-box model associated with this request. It may have been switched from the standard one to a different one. This could be a URI or aVitroModelSource.ModelName
-
getNameForTBOXModel
public String getNameForTBOXModel()
Gets an identifier for the t-box model associated with this request. It may have been switched from the standard one to a different one. This could be a URI or aVitroModelSource.ModelName
-
getNameForWriteModel
public String getNameForWriteModel()
Gets an identifier for the write model associated with this request. It may have been switched from the standard one to a different one. This could be a URI or aVitroModelSource.ModelName
-
getAppBean
public ApplicationBean getAppBean()
-
getClientAddr
public String getClientAddr()
Gets the the ip of the client. This will be X-forwarded-for header or, if that header is not set, getRemoteAddr(). This still may not be the client's address as they may be using a proxy.
-
getParameterMap
public Map<String,String[]> getParameterMap()
- Specified by:
getParameterMapin interfacejavax.servlet.ServletRequest- Overrides:
getParameterMapin classjavax.servlet.ServletRequestWrapper
-
getParameter
public String getParameter(String name)
- Specified by:
getParameterin interfacejavax.servlet.ServletRequest- Overrides:
getParameterin classjavax.servlet.ServletRequestWrapper
-
getParameterValues
public String[] getParameterValues(String name)
- Specified by:
getParameterValuesin interfacejavax.servlet.ServletRequest- Overrides:
getParameterValuesin classjavax.servlet.ServletRequestWrapper
-
getLanguageNeutralUnionFullModel
public org.apache.jena.ontology.OntModel getLanguageNeutralUnionFullModel()
-
setCollator
public void setCollator(Collator collator)
-
getCollator
public Collator getCollator()
-
getLanguageNeutralWebappDaoFactory
public WebappDaoFactory getLanguageNeutralWebappDaoFactory()
-
isMultipart
public boolean isMultipart()
-
getFileItem
public org.apache.commons.fileupload.FileItem getFileItem(String name)
There may be more than one file item with the given name. If the first one is empty (size is zero), keep looking for a non-empty one.
-
hasFileSizeException
public boolean hasFileSizeException()
If the uploaded file exceeded the maximum size, and if the strategy said to stash the exception, it will be stored as a request attribute.
-
getFileSizeException
public org.apache.commons.fileupload.FileUploadException getFileSizeException()
Could be either FileSizeLimitExceededException or SizeLimitExceededException, so return their common ancestor.
-
-