Removed Portal class and almost everything related to portals and flags for NIHVIVO-2248

This commit is contained in:
brianjlowe 2011-05-03 19:02:44 +00:00
parent 29750c378f
commit 7992ab1a4b
11 changed files with 5 additions and 77 deletions

View file

@ -17,7 +17,6 @@ import com.google.gson.Gson;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.rdf.model.Model;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
@ -250,7 +249,6 @@ public class EntityPublicationCountRequestHandler implements
private TemplateResponseValues prepareStandaloneMarkupResponse(VitroRequest vreq,
String entityURI) {
Portal portal = vreq.getPortal();
String standaloneTemplate = "entityComparisonOnPublicationsStandalone.ftl";
String organizationLabel = EntityComparisonUtilityFunctions
@ -258,7 +256,6 @@ public class EntityPublicationCountRequestHandler implements
entityURI);
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", organizationLabel + " - Temporal Graph Visualization");
body.put("organizationURI", entityURI);
body.put("organizationLocalName", UtilityFunctions.getIndividualLocalName(entityURI, vreq));

View file

@ -16,7 +16,6 @@ import org.apache.commons.logging.Log;
import com.google.gson.Gson;
import com.hp.hpl.jena.query.Dataset;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
@ -282,14 +281,12 @@ public class TemporalGrantVisualizationRequestHandler implements
private TemplateResponseValues prepareStandaloneMarkupResponse(VitroRequest vreq,
String entityURI) {
Portal portal = vreq.getPortal();
String standaloneTemplate = "entityComparisonOnGrantsStandalone.ftl";
String organizationLabel = EntityComparisonUtilityFunctions.getEntityLabelFromDAO(vreq,
entityURI);
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", organizationLabel + " - Temporal Graph Visualization");
body.put("organizationURI", entityURI);
body.put("organizationLocalName", UtilityFunctions.getIndividualLocalName(entityURI, vreq));

View file

@ -16,7 +16,6 @@ import org.apache.commons.logging.Log;
import com.google.gson.Gson;
import com.hp.hpl.jena.query.Dataset;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
@ -273,7 +272,6 @@ public class TemporalPublicationVisualizationRequestHandler implements
private TemplateResponseValues prepareStandaloneMarkupResponse(VitroRequest vreq,
String entityURI) {
Portal portal = vreq.getPortal();
String standaloneTemplate = "entityComparisonOnPublicationsStandalone.ftl";
String organizationLabel = EntityComparisonUtilityFunctions
@ -281,7 +279,6 @@ public class TemporalPublicationVisualizationRequestHandler implements
entityURI);
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", organizationLabel + " - Temporal Graph Visualization");
body.put("organizationURI", entityURI);
body.put("organizationLocalName", UtilityFunctions.getIndividualLocalName(entityURI, vreq));

View file

@ -17,7 +17,6 @@ import com.google.gson.Gson;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.rdf.model.Model;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
@ -249,14 +248,12 @@ public class EntityGrantCountRequestHandler implements
private TemplateResponseValues prepareStandaloneMarkupResponse(VitroRequest vreq,
String entityURI) {
Portal portal = vreq.getPortal();
String standaloneTemplate = "entityComparisonOnGrantsStandalone.ftl";
String organizationLabel = EntityComparisonUtilityFunctions.getEntityLabelFromDAO(vreq,
entityURI);
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", organizationLabel + " - Temporal Graph Visualization");
body.put("organizationURI", entityURI);
body.put("organizationLocalName", UtilityFunctions.getIndividualLocalName(entityURI, vreq));

View file

@ -13,19 +13,18 @@ import org.apache.commons.logging.Log;
import com.hp.hpl.jena.query.Dataset;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.DataVisualizationController;
import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.VisualizationFrameworkConstants;
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Activity;
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.Individual;
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.SparklineData;
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.UtilityFunctions;
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
/**
@ -244,13 +243,10 @@ public class PersonGrantCountRequestHandler implements VisualizationRequestHandl
*/
private TemplateResponseValues prepareStandaloneResponse(VitroRequest vreq,
SparklineData valueObjectContainer) {
Portal portal = vreq.getPortal();
String standaloneTemplate = "personGrantCountStandaloneActivator.ftl";
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", "Individual Grant Count visualization");
body.put("sparklineVO", valueObjectContainer);
@ -271,13 +267,9 @@ public class PersonGrantCountRequestHandler implements VisualizationRequestHandl
SparklineData valueObjectContainer,
boolean shouldVIVOrenderVis) {
Portal portal = vreq.getPortal();
String dynamicTemplate = "personGrantCountDynamicActivator.ftl";
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("sparklineVO", valueObjectContainer);
body.put("shouldVIVOrenderVis", shouldVIVOrenderVis);

View file

@ -11,7 +11,6 @@ import org.apache.commons.logging.Log;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.rdf.model.Model;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
@ -230,7 +229,6 @@ public class PersonLevelRequestHandler implements VisualizationRequestHandler {
Map<String, Object> body = new HashMap<String, Object>();
Portal portal = vitroRequest.getPortal();
String standaloneTemplate = "coAuthorPersonLevel.ftl";
body.put("egoURIParam", egoURI);
@ -253,7 +251,6 @@ public class PersonLevelRequestHandler implements VisualizationRequestHandler {
body.put("egoPubSparklineVO", egoPubSparklineVO);
body.put("uniqueCoauthorsSparklineVO", uniqueCoauthorsSparklineVO);
body.put("portalBean", portal);
body.put("title", title + "Person Level Visualization");
return new TemplateResponseValues(standaloneTemplate, body);
@ -268,8 +265,6 @@ public class PersonLevelRequestHandler implements VisualizationRequestHandler {
VitroRequest vitroRequest) {
Map<String, Object> body = new HashMap<String, Object>();
Portal portal = vitroRequest.getPortal();
body.put("egoURIParam", egoURI);
@ -291,7 +286,6 @@ public class PersonLevelRequestHandler implements VisualizationRequestHandler {
body.put("egoGrantSparklineVO", egoGrantSparklineVO);
body.put("uniqueCoInvestigatorsSparklineVO", uniqueCopisSparklineVO);
body.put("portalBean", portal);
body.put("title", title + "Person Level Visualization");
return new TemplateResponseValues(standaloneTemplate, body);

View file

@ -13,7 +13,6 @@ import org.apache.commons.logging.Log;
import com.hp.hpl.jena.query.Dataset;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
@ -253,12 +252,9 @@ VisualizationRequestHandler {
private TemplateResponseValues prepareStandaloneResponse(VitroRequest vreq,
SparklineData valueObjectContainer) {
Portal portal = vreq.getPortal();
String standaloneTemplate = "personPublicationCountStandaloneActivator.ftl";
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", "Individual Publication Count visualization");
body.put("sparklineVO", valueObjectContainer);
@ -278,12 +274,9 @@ VisualizationRequestHandler {
private TemplateResponseValues prepareDynamicResponse(VitroRequest vreq,
SparklineData valueObjectContainer, boolean shouldVIVOrenderVis) {
Portal portal = vreq.getPortal();
String dynamicTemplate = "personPublicationCountDynamicActivator.ftl";
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("sparklineVO", valueObjectContainer);
body.put("shouldVIVOrenderVis", shouldVIVOrenderVis);

View file

@ -19,7 +19,6 @@ import org.joda.time.format.DateTimeFormatter;
import com.google.gson.Gson;
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMap;
@ -132,10 +131,7 @@ public class UtilityFunctions {
String errorMessage,
VitroRequest vitroRequest) {
Portal portal = vitroRequest.getPortal();
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("error", errorMessage);
body.put("title", errorPageTitle);