diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java index 32e95718a..086ee81bd 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java @@ -84,6 +84,7 @@ public class JsonServlet extends VitroHttpServlet { getVClassesForVClassGroup(req,resp); return; } else if( vreq.getParameter("getSolrIndividualsByVClasses") != null ){ + log.info("AJAX request to retrieve individuals by vclasses"); getSolrIndividualsByVClasses(req,resp); return; } else if( vreq.getParameter("getDataForPage") != null ){ @@ -196,25 +197,26 @@ public class JsonServlet extends VitroHttpServlet { // Accepts multiple vclasses and returns individuals which correspond to the intersection of those classes (i.e. have all those types) private void getSolrIndividualsByVClasses( HttpServletRequest req, HttpServletResponse resp ){ - String errorMessage = null; + log.info("Executing retrieval of individuals by vclasses"); + String errorMessage = null; JSONObject rObj = null; try{ VitroRequest vreq = new VitroRequest(req); VClass vclass=null; log.info("Retrieving solr individuals by vclasses"); // Could have multiple vclass ids sent in - String[] vitroClassIdStr = vreq.getParameterValues("vclassId"); + String[] vitroClassIdStr = vreq.getParameterValues("vclassId"); if ( vitroClassIdStr != null && vitroClassIdStr.length > 0){ for(String vclassId: vitroClassIdStr) { - log.info("Using VClass " + vclassId); + log.info("Iterating throug vclasses, using VClass " + vclassId); vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(vclassId); if (vclass == null) { - log.debug("Couldn't retrieve vclass "); + log.error("Couldn't retrieve vclass "); throw new Exception (errorMessage = "Class " + vclassId + " not found"); } } }else{ - log.debug("parameter vclassId URI parameter expected "); + log.error("parameter vclassId URI parameter expected but not found"); throw new Exception("parameter vclassId URI parameter expected "); } List vclassIds = Arrays.asList(vitroClassIdStr); @@ -247,7 +249,8 @@ public class JsonServlet extends VitroHttpServlet { } public static JSONObject getSolrIndividualsByVClasses(List vclassURIs, HttpServletRequest req, ServletContext context) throws Exception { - VitroRequest vreq = new VitroRequest(req); + VitroRequest vreq = new VitroRequest(req); + log.info("Retrieve solr results for vclasses" + vclassURIs.toString()); Map map = getSolrVClassIntersectionResults(vclassURIs, vreq, context); log.info("Results returned from Solr for " + vclassURIs.toString() + " are of size " + map.size()); JSONObject rObj = processVClassResults(map, vreq, context, true); @@ -259,6 +262,7 @@ public class JsonServlet extends VitroHttpServlet { log.info("Retrieving Solr intersection results for " + vclassURIs.toString()); String alpha = IndividualListController.getAlphaParameter(vreq); int page = IndividualListController.getPageParameter(vreq); + log.info("Alpha and page parameters are " + alpha + " and " + page); Map map = null; try { map = IndividualListController.getResultsForVClassIntersections( diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualListController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualListController.java index a5221e867..e6ff39569 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualListController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualListController.java @@ -205,11 +205,11 @@ public class IndividualListController extends FreemarkerHttpServlet { try{ // make query for multiple rdf types SolrQuery query = getQuery(vclassURIs, alpha); - log.debug("Executed solr query for " + vclassURIs.toString()); + log.info("Executed solr query for " + vclassURIs.toString()); rvMap = getResultsForVClassQuery(query, page, alpha, indDao, context); List individuals = (List) rvMap.get("entities"); if (individuals == null) - log.debug("entities list is null for vclass " + vclassURIs.toString() ); + log.info("entities list is null for vclass " + vclassURIs.toString() ); } catch(Throwable th) { log.error("Error retrieving individuals corresponding to intersection multiple classes." + vclassURIs.toString(), th); } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/pageDataGetter/DataGetterUtils.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/pageDataGetter/DataGetterUtils.java index dad079a31..fb6a495c9 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/pageDataGetter/DataGetterUtils.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/pageDataGetter/DataGetterUtils.java @@ -47,6 +47,7 @@ public class DataGetterUtils { for( String dataGetter : dataGetters){ Map moreData = null; PageDataGetter getter = dataGetterMap.get(dataGetter); + log.info("Retrieved data getter for " + dataGetter); try{ moreData = getAdditionalData(pageUri, dataGetter, page, vreq, getter, context); if( moreData != null) @@ -141,6 +142,7 @@ public class DataGetterUtils { if( getter != null ){ try{ + log.info("Retrieve data for this data getter for " + pageUri); return getter.getData(context, vreq, pageUri, page); }catch(Throwable th){ log.error(th,th);