From 774bbacc369fbc682a2355cfe2904a1eb7d65c53 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 27 Feb 2023 09:21:48 -0600 Subject: [PATCH] VIVO 3821: Add configuration to disable or enable Map of Science visualization. --- .../controller/individual/IndividualResponseBuilder.java | 7 +++++++ home/src/main/resources/config/example.runtime.properties | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java index 0f7154c88..7f9c508a6 100644 --- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java +++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/individual/IndividualResponseBuilder.java @@ -94,6 +94,7 @@ class IndividualResponseBuilder { body.put("relatedSubject", getRelatedSubject()); body.put("namespaces", namespaces); body.put("temporalVisualizationEnabled", getTemporalVisualizationFlag()); + body.put("mapOfScienceVisualizationEnabled", getMapOfScienceVisualizationFlag()); body.put("profilePageTypesEnabled", getprofilePageTypesFlag()); body.put("verbosePropertySwitch", getVerbosePropertyValues()); @@ -195,6 +196,12 @@ class IndividualResponseBuilder { return "enabled".equals(property); } + private boolean getMapOfScienceVisualizationFlag() { + String property = ConfigurationProperties.getBean(vreq).getProperty( + "visualization.mapOfScience"); + return "enabled".equals(property); + } + private boolean getprofilePageTypesFlag() { String property = ConfigurationProperties.getBean(vreq).getProperty( "multiViews.profilePageTypes"); diff --git a/home/src/main/resources/config/example.runtime.properties b/home/src/main/resources/config/example.runtime.properties index 989cf19e3..e25f38246 100644 --- a/home/src/main/resources/config/example.runtime.properties +++ b/home/src/main/resources/config/example.runtime.properties @@ -92,6 +92,14 @@ email.replyTo = # # listview.usePreciseSubquery = true +# +# The Map of Science visualization is limited in the number of supported journals. +# This will generally only be useful for institutions that specifically want this. +# This is disabled by default. +# Set this to either "disabled" to not utilize or "enabled" to utilize. +# +visualization.mapOfScience = disabled + # # The email address of the root user for the VIVO application. The password # for this user is initially set to "rootPassword", but you will be asked to