diff --git a/productMods/js/visualization/entitycomparison/constants.js b/productMods/js/visualization/entitycomparison/constants.js
index f807b327..f35f5743 100644
--- a/productMods/js/visualization/entitycomparison/constants.js
+++ b/productMods/js/visualization/entitycomparison/constants.js
@@ -38,7 +38,7 @@ var year;
var colors, prevColor, colorToAssign,
colorToRemove, renderedObjects, URIToEntityRecord,
- setOfLabels, URIToCheckedEntities, stopWordsToCount;
+ setOfLabels, URIToCheckedEntities, STOP_WORDS_FOR_TABLE;
var graphContainer;
var tableDiv;
@@ -69,8 +69,11 @@ function initConstants() {
URIToEntityRecord = {};
setOfLabels = [];
URIToCheckedEntities = {};
- stopWordsToCount = {};
+
+ STOP_WORDS_FOR_TABLE = ["Person", "Organization", "Agent"];
+
lastCachedAtDateTimes = [];
+
//options for Flot
FlotOptions = {
legend : {
diff --git a/productMods/js/visualization/entitycomparison/util.js b/productMods/js/visualization/entitycomparison/util.js
index adceb91f..3a341601 100644
--- a/productMods/js/visualization/entitycomparison/util.js
+++ b/productMods/js/visualization/entitycomparison/util.js
@@ -1040,8 +1040,6 @@ function removeCheckBoxFromGlobalSet(checkbox){
*/
function prepareTableForDataTablePagination(jsonData, dataTableParams){
- resetStopWordCount();
-
var table = $('
');
table.attr('cellpadding', '0');
table.attr('cellspacing', '0');
@@ -1165,8 +1163,6 @@ function prepareTableForDataTablePagination(jsonData, dataTableParams){
*/
function reloadDataTablePagination(preselectedEntityURIs, jsonData){
- resetStopWordCount();
-
/*
* In case no entities are selected, we want that redraw should happen so that top entities are
* pre-selected.
@@ -1246,24 +1242,14 @@ function updateRowHighlighter(linkedCheckBox){
linkedCheckBox.closest("tr").removeClass('datatablerowhighlight');
}
+function removeStopWords(val) {
+
+ return $.map(val.organizationType, function(type, i){
-function resetStopWordCount(){
- stopWordsToCount["Person"] = 0;
- stopWordsToCount["Organization"] = 0;
-}
-
-function removeStopWords(val){
- var typeStringWithoutStopWords = "";
- $.each(val.organizationType, function(index, value){
- if(value == "Person"){
- stopWordsToCount["Person"]++;
- }else if(value == "Organization"){
- stopWordsToCount["Organization"]++;
- }else{
- typeStringWithoutStopWords += ', '+ value;
+ if ($.inArray(type, STOP_WORDS_FOR_TABLE) < 0) {
+ return (type);
}
- });
- return typeStringWithoutStopWords.substring(1, typeStringWithoutStopWords.length);
+ }).join(", ");
}
function setEntityLevel(entityLevel){
diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/valueobjects/JsonObject.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/valueobjects/JsonObject.java
index 44c58118..c97761fb 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/valueobjects/JsonObject.java
+++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/valueobjects/JsonObject.java
@@ -19,16 +19,7 @@ public class JsonObject {
private String entityURI;
private String visMode;
private List organizationType = new ArrayList();
- private List stopWords = new ArrayList();
- public List getStopWords() {
- return stopWords;
- }
-
- public void setStopWords(List stopWords) {
- this.stopWords = stopWords;
- }
-
public List getOrganizationTypes() {
return organizationType;
}