NIHVIVO-1261 Convert to use the new ConfigurationProperties class.
This commit is contained in:
parent
a4852ad939
commit
98f53d6409
4 changed files with 12 additions and 10 deletions
|
@ -16,8 +16,8 @@ import com.hp.hpl.jena.query.ResultSet;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
import com.hp.hpl.jena.rdf.model.RDFNode;
|
import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.ConfigurationProperties;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.IndividualDao;
|
import edu.cornell.mannlib.vitro.webapp.dao.IndividualDao;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
|
@ -130,12 +130,12 @@ public class EntityComparisonUtilityFunctions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getStaffProvidedOrComputedHighestLevelOrganization(Log log,
|
public static String getStaffProvidedOrComputedHighestLevelOrganization(Log log,
|
||||||
Dataset Dataset)
|
Dataset Dataset, VitroRequest vitroRequest)
|
||||||
throws MalformedQueryParametersException {
|
throws MalformedQueryParametersException {
|
||||||
|
|
||||||
String finalHighestLevelOrganizationURI = "";
|
String finalHighestLevelOrganizationURI = "";
|
||||||
|
|
||||||
String staffProvidedHighestLevelOrganization = ConfigurationProperties.getProperty("visualization.topLevelOrg");
|
String staffProvidedHighestLevelOrganization = ConfigurationProperties.getBean(vitroRequest).getProperty("visualization.topLevelOrg");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First checking if the staff has provided highest level organization in deploy.properties
|
* First checking if the staff has provided highest level organization in deploy.properties
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class EntityPublicationCountRequestHandler implements
|
||||||
if (StringUtils.isBlank(entityURI)){
|
if (StringUtils.isBlank(entityURI)){
|
||||||
|
|
||||||
entityURI = EntityComparisonUtilityFunctions
|
entityURI = EntityComparisonUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(log, Dataset);
|
.getStaffProvidedOrComputedHighestLevelOrganization(log, Dataset, vitroRequest);
|
||||||
}
|
}
|
||||||
return prepareStandaloneMarkupResponse(vitroRequest, entityURI);
|
return prepareStandaloneMarkupResponse(vitroRequest, entityURI);
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,8 @@ public class EntityPublicationCountRequestHandler implements
|
||||||
EntityComparisonUtilityFunctions
|
EntityComparisonUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
Dataset));
|
Dataset,
|
||||||
|
vitroRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class EntityGrantCountRequestHandler implements
|
||||||
if (StringUtils.isBlank(entityURI)){
|
if (StringUtils.isBlank(entityURI)){
|
||||||
|
|
||||||
entityURI = EntityComparisonUtilityFunctions
|
entityURI = EntityComparisonUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(log, Dataset);
|
.getStaffProvidedOrComputedHighestLevelOrganization(log, Dataset, vitroRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
return prepareStandaloneMarkupResponse(vitroRequest, entityURI);
|
return prepareStandaloneMarkupResponse(vitroRequest, entityURI);
|
||||||
|
@ -85,7 +85,8 @@ public class EntityGrantCountRequestHandler implements
|
||||||
EntityComparisonUtilityFunctions
|
EntityComparisonUtilityFunctions
|
||||||
.getStaffProvidedOrComputedHighestLevelOrganization(
|
.getStaffProvidedOrComputedHighestLevelOrganization(
|
||||||
log,
|
log,
|
||||||
Dataset));
|
Dataset,
|
||||||
|
vitroRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -17,7 +17,7 @@ import com.hp.hpl.jena.query.QuerySolution;
|
||||||
import com.hp.hpl.jena.query.ResultSet;
|
import com.hp.hpl.jena.query.ResultSet;
|
||||||
import com.hp.hpl.jena.rdf.model.RDFNode;
|
import com.hp.hpl.jena.rdf.model.RDFNode;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.ConfigurationProperties;
|
import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
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;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMap;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMap;
|
||||||
|
@ -26,11 +26,11 @@ import edu.cornell.mannlib.vitro.webapp.controller.visualization.freemarker.Visu
|
||||||
import edu.cornell.mannlib.vitro.webapp.filestorage.FileServingHelper;
|
import edu.cornell.mannlib.vitro.webapp.filestorage.FileServingHelper;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryFieldLabels;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.GenericQueryMap;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.AllPropertiesQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.AllPropertiesQueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.GenericQueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.GenericQueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.QueryRunner;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.visutils.VisualizationRequestHandler;
|
||||||
import edu.cornell.mannlib.vitro.webapp.visualization.freemarker.valueobjects.GenericQueryMap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This request handler is used when you need helpful information to add more context
|
* This request handler is used when you need helpful information to add more context
|
||||||
|
@ -215,7 +215,7 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler {
|
||||||
} else if (VisualizationFrameworkConstants.HIGHEST_LEVEL_ORGANIZATION_VIS_MODE
|
} else if (VisualizationFrameworkConstants.HIGHEST_LEVEL_ORGANIZATION_VIS_MODE
|
||||||
.equalsIgnoreCase(visMode)) {
|
.equalsIgnoreCase(visMode)) {
|
||||||
|
|
||||||
String staffProvidedHighestLevelOrganization = ConfigurationProperties.getProperty("visualization.topLevelOrg");
|
String staffProvidedHighestLevelOrganization = ConfigurationProperties.getBean(vitroRequest).getProperty("visualization.topLevelOrg");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First checking if the staff has provided highest level organization in deploy.properties
|
* First checking if the staff has provided highest level organization in deploy.properties
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue