1. Fix for http://issues.library.cornell.edu/browse/NIHVIVO-3070 made sure that the rows in the table for person level vis were created based on whether the entity in question has egoURI or not, instead of depending upon flash vis to provide sorted list with egoNode being the first element.
2. Tentative fix for http://issues.library.cornell.edu/browse/NIHVIVO-2953 will wait to hear more to change the UX further. 3. Fix for http://issues.library.cornell.edu/browse/NIHVIVO-2523 the current placement for downloading of this csv is subject to change.
This commit is contained in:
parent
c37ae62188
commit
6c3818f84a
8 changed files with 123 additions and 43 deletions
|
@ -200,6 +200,22 @@ a.map-of-science-links {
|
||||||
padding: 4px 5px 3px;
|
padding: 4px 5px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#download-unlocated-journal-info {
|
||||||
|
background-color: #2485AE;
|
||||||
|
height: 20px;
|
||||||
|
margin-top: 10px;
|
||||||
|
max-width: 260px;
|
||||||
|
padding: 4px 5px 3px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#download-unlocated-journal-info a {
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
#main-science-areas-table-container {
|
#main-science-areas-table-container {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,6 @@ $("input[type=checkbox].easyDeselectCheckbox").live('click', function(){
|
||||||
var entityToBeRemoved = URIToEntityRecord[checkboxValue];
|
var entityToBeRemoved = URIToEntityRecord[checkboxValue];
|
||||||
|
|
||||||
if(!checkbox.is(':checked')){
|
if(!checkbox.is(':checked')){
|
||||||
//console.log("Easy deselect checkbox is unclicked!");
|
|
||||||
updateRowHighlighter(linkedCheckbox);
|
updateRowHighlighter(linkedCheckbox);
|
||||||
removeUsedColor(entityToBeRemoved);
|
removeUsedColor(entityToBeRemoved);
|
||||||
removeEntityUnChecked(renderedObjects, entityToBeRemoved);
|
removeEntityUnChecked(renderedObjects, entityToBeRemoved);
|
||||||
|
@ -169,8 +168,6 @@ $(".filter-option").live('click', function() {
|
||||||
temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS";
|
temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS";
|
||||||
}
|
}
|
||||||
|
|
||||||
// clearRenderedObjects();
|
|
||||||
|
|
||||||
$(this).addClass('active-filter');
|
$(this).addClass('active-filter');
|
||||||
|
|
||||||
temporalGraphProcessor.dataTable.fnDraw();
|
temporalGraphProcessor.dataTable.fnDraw();
|
||||||
|
@ -419,6 +416,8 @@ function entityCheckboxOperatedOnEventListener() {
|
||||||
var checkboxValue = $(this).attr("value");
|
var checkboxValue = $(this).attr("value");
|
||||||
var entity = URIToEntityRecord[checkboxValue];
|
var entity = URIToEntityRecord[checkboxValue];
|
||||||
|
|
||||||
|
temporalGraphProcessor.isDefaultSelectionsMaintained = false;
|
||||||
|
|
||||||
if (checkbox.is(':checked')) {
|
if (checkbox.is(':checked')) {
|
||||||
|
|
||||||
performEntityCheckboxSelectedActions(entity, checkboxValue, checkbox);
|
performEntityCheckboxSelectedActions(entity, checkboxValue, checkbox);
|
||||||
|
@ -436,8 +435,6 @@ function renderTemporalGraphVisualization(parameters) {
|
||||||
|
|
||||||
setupLoadingScreen(parameters.responseContainer);
|
setupLoadingScreen(parameters.responseContainer);
|
||||||
|
|
||||||
//return;
|
|
||||||
|
|
||||||
getTemporalGraphData(parameters.dataURL,
|
getTemporalGraphData(parameters.dataURL,
|
||||||
parameters.bodyContainer,
|
parameters.bodyContainer,
|
||||||
parameters.errorContainer,
|
parameters.errorContainer,
|
||||||
|
@ -570,6 +567,8 @@ var entitySelector = {
|
||||||
|
|
||||||
temporalGraphProcessor = {
|
temporalGraphProcessor = {
|
||||||
|
|
||||||
|
isDefaultSelectionsMaintained: true,
|
||||||
|
|
||||||
loadingScreenTimeout: '',
|
loadingScreenTimeout: '',
|
||||||
|
|
||||||
currentSelectedFilter: 'ORGANIZATIONS',
|
currentSelectedFilter: 'ORGANIZATIONS',
|
||||||
|
@ -626,9 +625,20 @@ temporalGraphProcessor = {
|
||||||
|
|
||||||
var currentSelectedEntityURIs = [];
|
var currentSelectedEntityURIs = [];
|
||||||
|
|
||||||
$.each(URIToCheckedEntities, function(index, entity){
|
/*
|
||||||
currentSelectedEntityURIs.push(index);
|
* We want to make sure that the currently selected entities are preserved only if they
|
||||||
});
|
* were somehow manipulated by the users.
|
||||||
|
* */
|
||||||
|
if (!temporalGraphProcessor.isDefaultSelectionsMaintained) {
|
||||||
|
$.each(URIToCheckedEntities, function(index, entity){
|
||||||
|
currentSelectedEntityURIs.push(index);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reset the "is default selections maintained" value.
|
||||||
|
* */
|
||||||
|
temporalGraphProcessor.isDefaultSelectionsMaintained = true;
|
||||||
|
|
||||||
clearRenderedObjects();
|
clearRenderedObjects();
|
||||||
|
|
||||||
|
@ -658,6 +668,13 @@ temporalGraphProcessor = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We have to redraw the table so that top 3 entities are selected. fnDraw() triggers sorting of the
|
||||||
|
* table and other filters.
|
||||||
|
* */
|
||||||
|
temporalGraphProcessor.dataTable.fnDraw();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This will make sure that top 3 entities are selected by default when the page loads.
|
* This will make sure that top 3 entities are selected by default when the page loads.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -209,7 +209,7 @@ function visLoaded(nodes){
|
||||||
var jsonedNodes = jQuery.parseJSON(nodes);
|
var jsonedNodes = jQuery.parseJSON(nodes);
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
createTable(collaboratorTableMetadata.tableID, collaboratorTableMetadata.tableContainer, jsonedNodes.slice(1));
|
createTable(collaboratorTableMetadata.tableID, collaboratorTableMetadata.tableContainer, jsonedNodes);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -238,14 +238,20 @@ function createTable(tableID, tableContainer, tableData) {
|
||||||
|
|
||||||
$.each(tableData, function(i, item){
|
$.each(tableData, function(i, item){
|
||||||
|
|
||||||
number_of_works = item[collaboratorTableMetadata.jsonNumberWorksProperty];
|
/*
|
||||||
|
* Make sure that we dont append a row that belong to the ego in the "co-investigator/author" table.
|
||||||
|
* */
|
||||||
|
if (item.url !== unEncodedEgoURI) {
|
||||||
|
|
||||||
var row = $('<tr>');
|
number_of_works = item[collaboratorTableMetadata.jsonNumberWorksProperty];
|
||||||
|
|
||||||
row.append($('<td>').html(item.label));
|
var row = $('<tr>');
|
||||||
row.append($('<td>').html(number_of_works));
|
|
||||||
|
|
||||||
table.append(row);
|
row.append($('<td>').html(item.label));
|
||||||
|
row.append($('<td>').html(number_of_works));
|
||||||
|
|
||||||
|
table.append(row);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,10 @@
|
||||||
<#assign mapOfScienceIcon = '${urls.images}/visualization/mapofscience/vivo-scimap.png'>
|
<#assign mapOfScienceIcon = '${urls.images}/visualization/mapofscience/vivo-scimap.png'>
|
||||||
|
|
||||||
<#assign entityMapOfScienceDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&uri=${entityURI}&output=json">
|
<#assign entityMapOfScienceDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&uri=${entityURI}&output=json">
|
||||||
|
|
||||||
<#assign entityMapOfScienceDisciplineCSVURL = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&uri=${entityURI}&output=csv&vis_mode=discipline">
|
<#assign entityMapOfScienceDisciplineCSVURL = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&uri=${entityURI}&output=csv&vis_mode=discipline">
|
||||||
<#assign entityMapOfScienceSubDisciplineCSVURL = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&uri=${entityURI}&output=csv&vis_mode=subdiscipline">
|
<#assign entityMapOfScienceSubDisciplineCSVURL = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&uri=${entityURI}&output=csv&vis_mode=subdiscipline">
|
||||||
|
<#assign entityMapOfScienceUnlocatedJournalsCSVURL = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&uri=${entityURI}&output=csv&vis_mode=unlocated_journals">
|
||||||
|
|
||||||
<script language="JavaScript" type="text/javascript">
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,15 @@ corresponding changes in the included Templates. -->
|
||||||
mapped <span id="percent-mapped"></span>% of <span id="total-publications"></span> publications
|
mapped <span id="percent-mapped"></span>% of <span id="total-publications"></span> publications
|
||||||
<img class="filterInfoIcon" id="imageIconThree" src="${urls.images}/iconInfo.png"
|
<img class="filterInfoIcon" id="imageIconThree" src="${urls.images}/iconInfo.png"
|
||||||
alt="information icon"
|
alt="information icon"
|
||||||
title="" /></div>
|
title="" />
|
||||||
|
|
||||||
|
<div id="download-unlocated-journal-info">
|
||||||
|
<a href="${entityMapOfScienceUnlocatedJournalsCSVURL}">Save Unlocated Journals</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -93,6 +93,7 @@ public class VisualizationFrameworkConstants {
|
||||||
* */
|
* */
|
||||||
public static final String DISCIPLINE_TO_ACTIVTY_VIS_MODE = "discipline";
|
public static final String DISCIPLINE_TO_ACTIVTY_VIS_MODE = "discipline";
|
||||||
public static final String SUBDISCIPLINE_TO_ACTIVTY_VIS_MODE = "subdiscipline";
|
public static final String SUBDISCIPLINE_TO_ACTIVTY_VIS_MODE = "subdiscipline";
|
||||||
|
public static final String SCIENCE_UNLOCATED_JOURNALS_VIS_MODE = "unlocated_journals";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -176,8 +176,6 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides response when json file containing the publication count over the
|
|
||||||
* years is requested.
|
|
||||||
* @param vitroRequest
|
* @param vitroRequest
|
||||||
*
|
*
|
||||||
* @param entity
|
* @param entity
|
||||||
|
@ -210,6 +208,14 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
|
|
||||||
outputFileName += "_subdiscipline-to-publications" + ".csv";
|
outputFileName += "_subdiscipline-to-publications" + ".csv";
|
||||||
|
|
||||||
|
} else if (VisualizationFrameworkConstants.SCIENCE_UNLOCATED_JOURNALS_VIS_MODE
|
||||||
|
.equalsIgnoreCase(vitroRequest.getParameter(VisualizationFrameworkConstants.VIS_MODE_KEY))) {
|
||||||
|
|
||||||
|
fileData.put(DataVisualizationController.FILE_CONTENT_KEY,
|
||||||
|
getUnlocatedJournalsCSVContent(entity));
|
||||||
|
|
||||||
|
outputFileName += "_unlocated-journals" + ".csv";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
fileData.put(DataVisualizationController.FILE_CONTENT_KEY,
|
fileData.put(DataVisualizationController.FILE_CONTENT_KEY,
|
||||||
|
@ -440,7 +446,7 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PublicationJournalStats(publicationsWithNoJournalCount, journalToPublicationCount);
|
return new PublicationJournalStats(publicationsWithNoJournalCount, journalToPublicationCount, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateEntityMapOfScienceInformation(MapOfScience entityJson,
|
private void updateEntityMapOfScienceInformation(MapOfScience entityJson,
|
||||||
|
@ -488,7 +494,8 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
|
|
||||||
csvFileContent.append("Discipline, Publication Count, % Activity\n");
|
csvFileContent.append("Discipline, Publication Count, % Activity\n");
|
||||||
|
|
||||||
ScienceMappingResult result = extractScienceMappingResultFromActivities(subjectEntity);
|
PublicationJournalStats stats = extractScienceMappingResultFromActivities(subjectEntity);
|
||||||
|
ScienceMappingResult result = stats.scienceMapping;
|
||||||
|
|
||||||
Map<Integer, Float> disciplineToPublicationCount = new HashMap<Integer, Float>();
|
Map<Integer, Float> disciplineToPublicationCount = new HashMap<Integer, Float>();
|
||||||
|
|
||||||
|
@ -550,6 +557,38 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
return csvFileContent.toString();
|
return csvFileContent.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getUnlocatedJournalsCSVContent(Entity subjectEntity) {
|
||||||
|
|
||||||
|
StringBuilder csvFileContent = new StringBuilder();
|
||||||
|
|
||||||
|
csvFileContent.append("Journal, Publication Count\n");
|
||||||
|
|
||||||
|
PublicationJournalStats stats = extractScienceMappingResultFromActivities(subjectEntity);
|
||||||
|
ScienceMappingResult result = stats.scienceMapping;
|
||||||
|
|
||||||
|
DecimalFormat percentageActivityFormat = new DecimalFormat("#.#");
|
||||||
|
|
||||||
|
csvFileContent.append(StringEscapeUtils.escapeCsv("No Journal"));
|
||||||
|
csvFileContent.append(", ");
|
||||||
|
csvFileContent.append(percentageActivityFormat.format(stats.noJournalCount));
|
||||||
|
csvFileContent.append("\n");
|
||||||
|
|
||||||
|
if (result != null) {
|
||||||
|
|
||||||
|
Map<String, Float> mappedResult = result.getUnmappedResult();
|
||||||
|
|
||||||
|
for (Map.Entry<String, Float> currentUnMappedJournal : mappedResult.entrySet()) {
|
||||||
|
|
||||||
|
csvFileContent.append(StringEscapeUtils.escapeCsv(currentUnMappedJournal.getKey()));
|
||||||
|
csvFileContent.append(", ");
|
||||||
|
csvFileContent.append(percentageActivityFormat.format(currentUnMappedJournal.getValue()));
|
||||||
|
csvFileContent.append("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return csvFileContent.toString();
|
||||||
|
}
|
||||||
|
|
||||||
private String getSubDisciplineToPublicationsCSVContent(Entity subjectEntity) {
|
private String getSubDisciplineToPublicationsCSVContent(Entity subjectEntity) {
|
||||||
|
|
||||||
|
@ -557,7 +596,8 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
|
|
||||||
csvFileContent.append("Sub-Discipline, Publication Count, % Activity\n");
|
csvFileContent.append("Sub-Discipline, Publication Count, % Activity\n");
|
||||||
|
|
||||||
ScienceMappingResult result = extractScienceMappingResultFromActivities(subjectEntity);
|
PublicationJournalStats stats = extractScienceMappingResultFromActivities(subjectEntity);
|
||||||
|
ScienceMappingResult result = stats.scienceMapping;
|
||||||
|
|
||||||
Float totalMappedPublications = new Float(0);
|
Float totalMappedPublications = new Float(0);
|
||||||
|
|
||||||
|
@ -603,7 +643,7 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
return csvFileContent.toString();
|
return csvFileContent.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScienceMappingResult extractScienceMappingResultFromActivities(
|
private PublicationJournalStats extractScienceMappingResultFromActivities(
|
||||||
Entity subjectEntity) {
|
Entity subjectEntity) {
|
||||||
Set<Activity> publicationsForEntity = new HashSet<Activity>();
|
Set<Activity> publicationsForEntity = new HashSet<Activity>();
|
||||||
|
|
||||||
|
@ -615,20 +655,24 @@ public class MapOfScienceVisualizationRequestHandler implements
|
||||||
|
|
||||||
PublicationJournalStats publicationStats = getPublicationJournalStats(publicationsForEntity);
|
PublicationJournalStats publicationStats = getPublicationJournalStats(publicationsForEntity);
|
||||||
|
|
||||||
ScienceMappingResult result = getScienceMappingResult(publicationStats.journalToPublicationCount);
|
publicationStats.scienceMapping = getScienceMappingResult(publicationStats.journalToPublicationCount);
|
||||||
return result;
|
|
||||||
|
return publicationStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PublicationJournalStats {
|
private class PublicationJournalStats {
|
||||||
|
|
||||||
int noJournalCount;
|
int noJournalCount;
|
||||||
Map<String, Integer> journalToPublicationCount;
|
Map<String, Integer> journalToPublicationCount;
|
||||||
|
ScienceMappingResult scienceMapping;
|
||||||
|
|
||||||
public PublicationJournalStats(int noJournalCount,
|
public PublicationJournalStats(int noJournalCount,
|
||||||
Map<String, Integer> journalToPublicationCount) {
|
Map<String, Integer> journalToPublicationCount,
|
||||||
|
ScienceMappingResult scienceMapping) {
|
||||||
|
|
||||||
this.noJournalCount = noJournalCount;
|
this.noJournalCount = noJournalCount;
|
||||||
this.journalToPublicationCount = journalToPublicationCount;
|
this.journalToPublicationCount = journalToPublicationCount;
|
||||||
|
this.scienceMapping = scienceMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,11 +64,6 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* System.out.println("current models in the system are");
|
|
||||||
for (Map.Entry<String, Model> entry : ConstructedModelTracker.getAllModels().entrySet()) {
|
|
||||||
System.out.println(entry.getKey() + " -> " + entry.getValue().size());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return prepareStandaloneMarkupResponse(vitroRequest, entityURI);
|
return prepareStandaloneMarkupResponse(vitroRequest, entityURI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,15 +171,6 @@ public class TemporalGrantVisualizationRequestHandler implements
|
||||||
Map<String, Activity> grantURIForAssociatedPeopleToVO = new HashMap<String, Activity>();
|
Map<String, Activity> grantURIForAssociatedPeopleToVO = new HashMap<String, Activity>();
|
||||||
Map<String, Activity> allGrantURIToVO = new HashMap<String, Activity>();
|
Map<String, Activity> allGrantURIToVO = new HashMap<String, Activity>();
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO: Change this to use DataSet when an optimum solution is reached. Currently grant constructs are causing
|
|
||||||
* endless wait times on a large dataset like UFl. When I tried to add all the datasets manually to the Datasource
|
|
||||||
* it responded in an order of magnitude higher than with just the defaultOntModel.
|
|
||||||
* Brian Lowe is looking into this weird behavior see http://issues.library.cornell.edu/browse/NIHVIVO-2275
|
|
||||||
*/
|
|
||||||
// DataSource dataSource = DatasetFactory.create();
|
|
||||||
// dataSource.setDefaultModel(vitroRequest.getJenaOntModel());
|
|
||||||
|
|
||||||
allGrantURIToVO = SelectOnModelUtilities.getGrantsForAllSubOrganizations(dataset, organizationEntity);
|
allGrantURIToVO = SelectOnModelUtilities.getGrantsForAllSubOrganizations(dataset, organizationEntity);
|
||||||
|
|
||||||
Entity organizationWithAssociatedPeople = SelectOnModelUtilities
|
Entity organizationWithAssociatedPeople = SelectOnModelUtilities
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue