Class JsonServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
-
- edu.cornell.mannlib.vitro.webapp.controller.json.JsonServlet
-
- All Implemented Interfaces:
MultipartRequestWrapper.ParsingStrategy,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
@WebServlet(name="JSONService", urlPatterns="/dataservice") public class JsonServlet extends VitroHttpServletThis servlet is for servicing requests for JSON objects/data. It could be generalized to get other types of data ex. XML, HTML etc- Author:
- bdc34 Moved most of the logic into a group of JsonProducer classes. jeb228
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
VitroHttpServlet.PickListSorter
-
-
Field Summary
Fields Modifier and Type Field Description static intREPLY_SIZE-
Fields inherited from class edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
HTML_MIMETYPE, JSON_LD_MIMETYPE, JSON_MIMETYPE, N3_MIMETYPE, publicDateFormat, RDFXML_MIMETYPE, TTL_MIMETYPE, XHTML_MIMETYPE
-
-
Constructor Summary
Constructors Constructor Description JsonServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)doGet does nothing.protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)doPost does the same thing as the doGet methodstatic StringgetDataPropertyValue(Individual ind, DataProperty dp, WebappDaoFactory wdf)static com.fasterxml.jackson.databind.node.ObjectNodegetRandomSearchIndividualsByVClass(String vclassURI, javax.servlet.http.HttpServletRequest req)static com.fasterxml.jackson.databind.node.ObjectNodegetSearchIndividualsByVClass(String vclassURI, javax.servlet.http.HttpServletRequest req)static com.fasterxml.jackson.databind.node.ObjectNodegetSearchIndividualsByVClasses(List<String> vclassURIs, javax.servlet.http.HttpServletRequest req)-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet
dumpRequestParameters, isAuthorizedToDisplayPage, maximumMultipartFileSize, redirectToInsufficientAuthorizationPage, redirectToLoginPage, redirectUnauthorizedRequest, service, sortForPickList, stashFileSizeException
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
-
-
-
-
Field Detail
-
REPLY_SIZE
public static final int REPLY_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOExceptionDescription copied from class:VitroHttpServletdoPost does the same thing as the doGet method- Overrides:
doPostin classVitroHttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOExceptionDescription copied from class:VitroHttpServletdoGet does nothing.- Overrides:
doGetin classVitroHttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
getSearchIndividualsByVClass
public static com.fasterxml.jackson.databind.node.ObjectNode getSearchIndividualsByVClass(String vclassURI, javax.servlet.http.HttpServletRequest req) throws Exception
- Throws:
Exception
-
getSearchIndividualsByVClasses
public static com.fasterxml.jackson.databind.node.ObjectNode getSearchIndividualsByVClasses(List<String> vclassURIs, javax.servlet.http.HttpServletRequest req) throws Exception
- Throws:
Exception
-
getDataPropertyValue
public static String getDataPropertyValue(Individual ind, DataProperty dp, WebappDaoFactory wdf)
-
-