updates for debugging and NIHVIVO-2956
This commit is contained in:
parent
df5d11e60d
commit
d434376bdc
3 changed files with 10 additions and 4 deletions
|
@ -249,6 +249,7 @@ public class JsonServlet extends VitroHttpServlet {
|
||||||
public static JSONObject getSolrIndividualsByVClasses(List<String> vclassURIs, HttpServletRequest req, ServletContext context) throws Exception {
|
public static JSONObject getSolrIndividualsByVClasses(List<String> vclassURIs, HttpServletRequest req, ServletContext context) throws Exception {
|
||||||
VitroRequest vreq = new VitroRequest(req);
|
VitroRequest vreq = new VitroRequest(req);
|
||||||
Map<String, Object> map = getSolrVClassIntersectionResults(vclassURIs, vreq, context);
|
Map<String, Object> 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);
|
JSONObject rObj = processVClassResults(map, vreq, context, true);
|
||||||
return rObj;
|
return rObj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class MenuManagementEdit extends VitroHttpServlet {
|
||||||
if(command != null) {
|
if(command != null) {
|
||||||
processCommand(command, vreq, resp);
|
processCommand(command, vreq, resp);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Command is null");
|
log.error("Command is null");
|
||||||
}
|
}
|
||||||
//Need to redirect correctly
|
//Need to redirect correctly
|
||||||
if(!isReorder(command)){
|
if(!isReorder(command)){
|
||||||
|
@ -552,6 +552,11 @@ public class MenuManagementEdit extends VitroHttpServlet {
|
||||||
pageResource,
|
pageResource,
|
||||||
DisplayVocabulary.REQUIRES_BODY_TEMPLATE,
|
DisplayVocabulary.REQUIRES_BODY_TEMPLATE,
|
||||||
(RDFNode) null));
|
(RDFNode) null));
|
||||||
|
//Also need to get rid of link text in addition to title
|
||||||
|
removeModel.add(displayModel.listStatements(
|
||||||
|
menuItemResource,
|
||||||
|
DisplayVocabulary.LINK_TEXT,
|
||||||
|
(RDFNode) null));
|
||||||
//remove data getter properties - the link between page and data getter remains
|
//remove data getter properties - the link between page and data getter remains
|
||||||
Resource dataGetter = getDataGetterFromDisplayModel(pageResource, displayModel);
|
Resource dataGetter = getDataGetterFromDisplayModel(pageResource, displayModel);
|
||||||
removeModel.add(displayModel.listStatements(dataGetter, null, (RDFNode) null));
|
removeModel.add(displayModel.listStatements(dataGetter, null, (RDFNode) null));
|
||||||
|
|
|
@ -189,12 +189,12 @@ public class DataGetterUtils {
|
||||||
for(String vclassId: vitroClassIdStr) {
|
for(String vclassId: vitroClassIdStr) {
|
||||||
vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(vclassId);
|
vclass = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(vclassId);
|
||||||
if (vclass == null) {
|
if (vclass == null) {
|
||||||
log.debug("Couldn't retrieve vclass ");
|
log.info("Couldn't retrieve vclass ");
|
||||||
throw new Exception (errorMessage = "Class " + vclassId + " not found");
|
throw new Exception (errorMessage = "Class " + vclassId + " not found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
log.debug("parameter vclassId URI parameter expected ");
|
log.info("parameter vclassId URI parameter expected ");
|
||||||
throw new Exception("parameter vclassId URI parameter expected ");
|
throw new Exception("parameter vclassId URI parameter expected ");
|
||||||
}
|
}
|
||||||
List<String> vclassIds = Arrays.asList(vitroClassIdStr);
|
List<String> vclassIds = Arrays.asList(vitroClassIdStr);
|
||||||
|
@ -222,7 +222,7 @@ public class DataGetterUtils {
|
||||||
rObj.put("alpha", map.get("alpha"));
|
rObj.put("alpha", map.get("alpha"));
|
||||||
|
|
||||||
List<Individual> inds = (List<Individual>)map.get("entities");
|
List<Individual> inds = (List<Individual>)map.get("entities");
|
||||||
|
log.info("Number of individuals returned from request: " + inds.size());
|
||||||
JSONArray jInds = new JSONArray();
|
JSONArray jInds = new JSONArray();
|
||||||
for(Individual ind : inds ){
|
for(Individual ind : inds ){
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
|
Loading…
Add table
Reference in a new issue