@Override protected Actions requiredActions(VitroRequest vreq) { /* * Based on the query parameters passed via URI get the appropriate visualization * request handler. * */ VisualizationRequestHandler visRequestHandler = getVisualizationRequestHandler(vreq); if (visRequestHandler != null) { Actions requiredPrivileges = visRequestHandler.getRequiredPrivileges(); if (requiredPrivileges != null) { return requiredPrivileges; } } return super.requiredActions(vreq); }
private Object renderVisualization( VitroRequest vitroRequest, VisualizationRequestHandler visRequestHandler) { Model model = vitroRequest.getJenaOntModel(); // getModel() if (model == null) { String errorMessage = "This service is not supporeted by the current " + "webapp configuration. A jena model is required in the " + "servlet context."; log.error(errorMessage); return UtilityFunctions.handleMalformedParameters( "Visualization Query Error", errorMessage, vitroRequest); } Dataset dataset = setupJENADataSource(vitroRequest); if (dataset != null && visRequestHandler != null) { try { return visRequestHandler.generateAjaxVisualization(vitroRequest, log, dataset); } catch (MalformedQueryParametersException e) { return UtilityFunctions.handleMalformedParameters( "Ajax Visualization Query Error - Individual Publication Count", e.getMessage(), vitroRequest); } } else { String errorMessage = "Data Model Empty &/or Inappropriate " + "query parameters were submitted. "; log.error(errorMessage); return UtilityFunctions.handleMalformedParameters( "Visualization Query Error", errorMessage, vitroRequest); } }