1. Modified dependency injection bean to use proper packages.
2. Started the bifurcation process of person level into coauthor person level & copi person level. 3. Fixed person pub count sparkline to use new data structures. 4. Modified co athor vis code genrator to save some more data for use by the templates.
This commit is contained in:
parent
0fd65d4e86
commit
419c9dbfb5
8 changed files with 690 additions and 23 deletions
|
@ -23,15 +23,15 @@
|
|||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount.PersonGrantCountRequestHandler" />
|
||||
|
||||
<bean id="person_level"
|
||||
class="edu.cornell.mannlib.vitro.webapp.visualization.personlevel.PersonLevelRequestHandler" />
|
||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.personlevel.PersonLevelRequestHandler" />
|
||||
|
||||
<bean id="coprincipalinvestigator"
|
||||
class="edu.cornell.mannlib.vitro.webapp.visualization.coprincipalinvestigator.CoPIGrantCountRequestHandler" />
|
||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.coprincipalinvestigator.CoPIGrantCountRequestHandler" />
|
||||
|
||||
<!--
|
||||
|
||||
<bean id="entity_comparison"
|
||||
class="edu.cornell.mannlib.vitro.webapp.visualization.entitycomparison.EntityPublicationCountRequestHandler" />
|
||||
class="edu.cornell.mannlib.vitro.webapp.visualization.freemarker.entitycomparison.EntityPublicationCountRequestHandler" />
|
||||
|
||||
-->
|
||||
<bean id="visualizationInjector"
|
||||
|
@ -54,7 +54,6 @@
|
|||
<ref bean="person_grant_count"></ref>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry key="person_level">
|
||||
<ref bean="person_level"></ref>
|
||||
</entry>
|
||||
|
|
475
productMods/js/visualization/personlevel/person_level-fm.js
Normal file
475
productMods/js/visualization/personlevel/person_level-fm.js
Normal file
|
@ -0,0 +1,475 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
function getWellFormedURLs(given_uri, type) {
|
||||
|
||||
if (!given_uri || given_uri == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
// general best practice is to put javascript code inside document.ready
|
||||
// but in this case when i do that the function does not get called
|
||||
// properly.
|
||||
// so removing it for now.
|
||||
|
||||
// $(document).ready(function() {
|
||||
|
||||
var finalURL;
|
||||
|
||||
if (type == "coauthorship") {
|
||||
|
||||
finalURL = $.ajax({
|
||||
url: contextPath + "/visualizationAjax",
|
||||
data: ({vis: "utilities", vis_mode: "PERSON_LEVEL_URL", uri: given_uri}),
|
||||
dataType: "text",
|
||||
async: false,
|
||||
success:function(data){
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
return finalURL;
|
||||
|
||||
|
||||
} else if (type == "copi") {
|
||||
|
||||
finalURL = $.ajax({
|
||||
url: contextPath + "/visualizationAjax",
|
||||
data: ({vis: "utilities", vis_mode: "COPI_URL", uri: given_uri}),
|
||||
dataType: "text",
|
||||
async: false,
|
||||
success:function(data){
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
return finalURL;
|
||||
|
||||
|
||||
}else if (type == "profile") {
|
||||
|
||||
finalURL = $.ajax({
|
||||
url: contextPath + "/visualizationAjax",
|
||||
data: ({vis: "utilities", vis_mode: "PROFILE_URL", uri: given_uri}),
|
||||
dataType: "text",
|
||||
async: false,
|
||||
success:function(data){
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
return finalURL;
|
||||
|
||||
} else if (type == "image") {
|
||||
|
||||
finalURL = $.ajax({
|
||||
url: contextPath + "/visualizationAjax",
|
||||
data: ({vis: "utilities", vis_mode: "IMAGE_URL", uri: given_uri}),
|
||||
dataType: "text",
|
||||
async: false,
|
||||
success:function(data){
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
return finalURL;
|
||||
|
||||
} else if (type == "profile_info") {
|
||||
|
||||
var profileInfoJSON = $.ajax({
|
||||
url: contextPath + "/visualizationAjax",
|
||||
data: ({vis: "utilities", vis_mode: "PROFILE_INFO", uri: given_uri}),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success:function(data){
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
return profileInfoJSON;
|
||||
|
||||
}
|
||||
|
||||
// });
|
||||
}
|
||||
|
||||
$.fn.image = function(src, successFunc, failureFunc){
|
||||
return this.each(function(){
|
||||
var profileImage = new Image();
|
||||
profileImage.onerror = failureFunc;
|
||||
profileImage.onload = successFunc;
|
||||
profileImage.src = src;
|
||||
|
||||
return profileImage;
|
||||
});
|
||||
};
|
||||
|
||||
function setProfileImage(imageContainerID, mainImageURL) {
|
||||
|
||||
if (imageContainerID == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mainImageURL || mainImageURL == "") {
|
||||
$("#" + imageContainerID).empty();
|
||||
return;
|
||||
}
|
||||
|
||||
var rawPath = getWellFormedURLs(mainImageURL, "image");
|
||||
|
||||
var imageLink = contextPath + rawPath;
|
||||
|
||||
var imageContainer = $("#" + imageContainerID);
|
||||
imageContainer.image(imageLink,
|
||||
function(){
|
||||
imageContainer.empty().append(this);
|
||||
},
|
||||
function(){
|
||||
// For performing any action on failure to
|
||||
// find the image.
|
||||
imageContainer.empty();
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function setProfileMoniker(monikerContainerID, moniker, doEllipsis) {
|
||||
|
||||
if (monikerContainerID == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!moniker) {
|
||||
$("#" + monikerContainerID).empty();
|
||||
return;
|
||||
}
|
||||
|
||||
var finalDisplayMoniker;
|
||||
|
||||
if (moniker.length > 30 && doEllipsis) {
|
||||
|
||||
finalDisplayMoniker = moniker.substr(0,30) + "...";
|
||||
|
||||
} else {
|
||||
|
||||
finalDisplayMoniker = moniker;
|
||||
|
||||
}
|
||||
|
||||
$("#" + monikerContainerID).empty().text(finalDisplayMoniker);
|
||||
$("#" + monikerContainerID).attr('title', moniker);
|
||||
|
||||
}
|
||||
|
||||
function setProfileName(nameContainerID, name, doNameEllipsis) {
|
||||
|
||||
if (nameContainerID == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!name) {
|
||||
$("#" + nameContainerID).empty();
|
||||
return;
|
||||
}
|
||||
|
||||
var finalDisplayName;
|
||||
|
||||
if (name.length > 30 && doNameEllipsis) {
|
||||
|
||||
finalDisplayName = name.substr(0,30) + "...";
|
||||
|
||||
} else {
|
||||
|
||||
finalDisplayName = name;
|
||||
|
||||
}
|
||||
|
||||
$("#" + nameContainerID).empty().text(finalDisplayName);
|
||||
$("#" + nameContainerID).attr('title', name);
|
||||
|
||||
}
|
||||
|
||||
function processProfileInformation(nameContainerID,
|
||||
monikerContainerID,
|
||||
imageContainerID,
|
||||
profileInfoJSON,
|
||||
doMonikerEllipsis,
|
||||
doNameEllipsis) {
|
||||
|
||||
var name, mainImageURL, moniker;
|
||||
|
||||
if (jQuery.isEmptyObject(profileInfoJSON)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.each(profileInfoJSON, function(key, set){
|
||||
|
||||
if (key.search(/mainImage/i) > -1) {
|
||||
|
||||
mainImageURL = set[0];
|
||||
|
||||
} else if (key.search(/moniker/i) > -1) {
|
||||
|
||||
moniker = set[0];
|
||||
|
||||
} else if (key.search(/label/i) > -1) {
|
||||
|
||||
name = set[0];
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
setProfileName(nameContainerID, name, doNameEllipsis);
|
||||
setProfileMoniker(monikerContainerID, moniker, doMonikerEllipsis);
|
||||
setProfileImage(imageContainerID, mainImageURL);
|
||||
|
||||
}
|
||||
|
||||
function visLoaded(nodes){
|
||||
|
||||
var jsonedNodes = jQuery.parseJSON(nodes);
|
||||
var tableID = "";
|
||||
var tableContainer = "";
|
||||
|
||||
/*if (visMode == "coauthorship") {*/
|
||||
tableID = "coauthorships_table";
|
||||
tableContainer = "coauth_table_container";
|
||||
/*} else {
|
||||
tableID = "copis_table";
|
||||
tableContainer = "copi_table_container";
|
||||
}*/
|
||||
|
||||
$(document).ready(function() {
|
||||
createTable("coauthorships_table" , "coauth_table_container" , jsonedNodes.slice(1));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function createTable(tableID, tableContainer, tableData) {
|
||||
|
||||
var number_of_works = "";
|
||||
var tableCaption = "";
|
||||
var tableColumnTitle1 = "";
|
||||
var tableColumnTitle2 = "";
|
||||
|
||||
/*if (visMode == "coauthorship") {*/
|
||||
tableCaption = "Co-authors ";
|
||||
tableColumnTitle1 = "Author";
|
||||
tableColumnTitle2 = "Publications with <br />";
|
||||
/*} else {
|
||||
tableCaption = "Co-pis ";
|
||||
tableColumnTitle1 = "Principal Investigator";
|
||||
tableColumnTitle2 = "Grants with <br />";
|
||||
}*/
|
||||
|
||||
var table = $('<table>');
|
||||
table.attr('id', tableID);
|
||||
|
||||
table.append($('<caption>').html(tableCaption + "<a href=\"" + egoCoAuthorsListDataFileURL + "\">(.CSV File)</a>"));
|
||||
|
||||
var header = $('<thead>');
|
||||
|
||||
var row = $('<tr>');
|
||||
|
||||
var authorTH = $('<th>');
|
||||
authorTH.html(tableColumnTitle1);
|
||||
row.append(authorTH);
|
||||
|
||||
row.append($('<th>').html(tableColumnTitle2 + "" + $('#ego_label').text()));
|
||||
|
||||
header.append(row);
|
||||
|
||||
table.append(header);
|
||||
|
||||
$.each(tableData, function(i, item){
|
||||
|
||||
/*if (visMode == "coauthorship") {*/
|
||||
number_of_works = item.number_of_authored_works;
|
||||
/*} else {
|
||||
number_of_works = item.number_of_investigated_grants;
|
||||
}*/
|
||||
var row = $('<tr>');
|
||||
|
||||
row.append($('<td>').html(item.label));
|
||||
row.append($('<td>').html(number_of_works));
|
||||
|
||||
table.append(row);
|
||||
|
||||
});
|
||||
|
||||
table.prependTo('#' + tableContainer);
|
||||
$('#' + tableContainer + " #loadingData").remove();
|
||||
}
|
||||
|
||||
//renderStatsOnNodeClicked, CoRelations, noOfCoRelations
|
||||
//function nodeClickedJS(json){
|
||||
function renderStatsOnNodeClicked(json){
|
||||
|
||||
//console.log(json);
|
||||
var obj = jQuery.parseJSON(json);
|
||||
|
||||
var works = "";
|
||||
var persons = "";
|
||||
var relation = "";
|
||||
var earliest_work = "";
|
||||
var latest_work = "";
|
||||
var number_of_works = "";
|
||||
|
||||
/*if (visMode == "coauthorship") {*/
|
||||
works = "Publication(s)";
|
||||
persons = "Co-author(s)";
|
||||
relation = "coauthorship"
|
||||
earliest_work = obj.earliest_publication;
|
||||
latest_work = obj.latest_publication;
|
||||
number_of_works = obj.number_of_authored_works;
|
||||
/*} else {
|
||||
works = "Grant(s)";
|
||||
persons = "Co-PI(s)";
|
||||
relation = "copi";
|
||||
earliest_work = obj.earliest_grant;
|
||||
latest_work = obj.latest_grant;
|
||||
number_of_works = obj.number_of_investigated_grants;
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
$("#dataPanel").attr("style","visibility:visible");
|
||||
$("#works").empty().append(number_of_works);
|
||||
|
||||
/*
|
||||
* Here obj.url points to the uri of that individual
|
||||
*/
|
||||
if(obj.url){
|
||||
|
||||
if (obj.url == egoURI) {
|
||||
|
||||
$("#authorName").addClass('author_name').removeClass('neutral_author_name');
|
||||
$('#num_works > .author_stats_text').text(works);
|
||||
$('#num_authors > .author_stats_text').text(persons);
|
||||
|
||||
} else {
|
||||
|
||||
$("#authorName").addClass('neutral_author_name').removeClass('author_name');
|
||||
$('#num_works > .author_stats_text').text('Joint ' + works);
|
||||
$('#num_authors > .author_stats_text').text('Joint ' + persons);
|
||||
|
||||
}
|
||||
|
||||
$("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile"));
|
||||
$("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, relation));
|
||||
processProfileInformation("authorName",
|
||||
"profileMoniker",
|
||||
"profileImage",
|
||||
jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")),
|
||||
true,
|
||||
true);
|
||||
|
||||
|
||||
|
||||
} else{
|
||||
$("#profileUrl").attr("href","#");
|
||||
$("#coAuthorshipVisUrl").attr("href","#");
|
||||
}
|
||||
|
||||
$("#coAuthors").empty().append(obj.noOfCorelations);
|
||||
|
||||
$("#firstPublication").empty().append(earliest_work);
|
||||
(earliest_work)?$("#fPub").attr("style","visibility:visible"):$("#fPub").attr("style","visibility:hidden");
|
||||
$("#lastPublication").empty().append(latest_work);
|
||||
(latest_work)?$("#lPub").attr("style","visibility:visible"):$("#lPub").attr("style","visibility:hidden");
|
||||
|
||||
// obj.url:the url parameter for node
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Inside both of these functions, '&' are replaced with '%26' because we are externally
|
||||
* passing two parameters to the flash code using flashvars (see renderCoAuthorshipVisualization())
|
||||
* and they are delimited using '&' too.
|
||||
*/
|
||||
|
||||
function getEncodedCoAuthorURL(){
|
||||
|
||||
var queryString = "uri="+ egoURI + "&vis=coauthorship";
|
||||
// console.log('domainParam is '+ domainParam);
|
||||
// console.log('CoAuthorURL is ' + domainParam + '?' + queryString.replace(/&/g, '%26'));
|
||||
return domainParam + '?' + queryString.replace(/&/g, '%26');
|
||||
}
|
||||
|
||||
function getEncodedCoPIURL(){
|
||||
|
||||
var queryString = "uri="+ egoURI+ "&vis=coprincipalinvestigator";
|
||||
// console.log('CoPIURL is ' + domainParam + '?' + queryString.replace(/&/g, '%26') );
|
||||
return domainParam + '?' + queryString.replace(/&/g, '%26');
|
||||
}
|
||||
|
||||
function renderCoAuthorshipVisualization() {
|
||||
|
||||
var visualization = "";
|
||||
var encodedURL = "";
|
||||
|
||||
/*if(visMode == "coauthorship"){*/
|
||||
visualization = "CoAuthor";
|
||||
encodedURL = getEncodedCoAuthorURL();
|
||||
/*} else {
|
||||
visualization = "CoPI";
|
||||
encodedURL = getEncodedCoPIURL();
|
||||
}*/
|
||||
|
||||
// console.log('visualization is ' + visualization + ' and encodedURL is '+ encodedURL);
|
||||
// Version check for the Flash Player that has the ability to start Player
|
||||
// Product Install (6.0r65)
|
||||
var hasProductInstall = DetectFlashVer(6, 0, 65);
|
||||
|
||||
// Version check based upon the values defined in globals
|
||||
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
|
||||
|
||||
if ( hasProductInstall && !hasRequestedVersion ) {
|
||||
// DO NOT MODIFY THE FOLLOWING FOUR LINES
|
||||
// Location visited after installation is complete if installation is
|
||||
// required
|
||||
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
|
||||
var MMredirectURL = window.location;
|
||||
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
|
||||
var MMdoctitle = document.title;
|
||||
|
||||
AC_FL_RunContent(
|
||||
"src", "playerProductInstall",
|
||||
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
|
||||
"width", "800",
|
||||
"height", "840",
|
||||
"align", "middle",
|
||||
"id", "EgoCentric",
|
||||
"quality", "high",
|
||||
"bgcolor", "#ffffff",
|
||||
"name", "EgoCentric",
|
||||
"allowScriptAccess","sameDomain",
|
||||
"type", "application/x-shockwave-flash",
|
||||
"pluginspage", "http://www.adobe.com/go/getflashplayer"
|
||||
);
|
||||
} else if (hasRequestedVersion) {
|
||||
// if we've detected an acceptable version
|
||||
// embed the Flash Content SWF when all tests are passed
|
||||
//coAuthorUrl=/vivo1/visualization?vis=coauthorship%26render_mode=data%26uri=http%3A%2F%2Fvivo.iu.edu%2Findividual%2FBrnerKaty&labelField=label&coPIUrl=/vivo1/visualization?vis=coprincipalinvestigator%26render_mode=data%26uri=http%3A%2F%2Fvivo.iu.edu%2Findividual%2FBrnerKaty&labelField=label
|
||||
AC_FL_RunContent(
|
||||
"src", swfLink,
|
||||
// "flashVars", 'coAuthorUrl='+ encodeURL(egoCoAuthorshipDataFeederURL) + '&coPIUrl=' + encodeURL(egoCoPIDataFeederURL) ,
|
||||
// "flashVars", 'coAuthorUrl='+ getEncodedCoAuthorURL() + '&coPIUrl=' + getEncodedCoPIURL() ,
|
||||
// "flashVars", 'graphmlUrl=' + getEncodedCoAuthorURL() + '&labelField=label&visType=CoAuthor',
|
||||
"flashVars", 'graphmlUrl=' + encodedURL + '&labelField=label&visType='+visualization,
|
||||
"width", "600",
|
||||
"height", "850",
|
||||
"align", "top",
|
||||
"id", "EgoCentric",
|
||||
"quality", "high",
|
||||
"bgcolor", "#ffffff",
|
||||
"name", "EgoCentric",
|
||||
"allowScriptAccess","sameDomain",
|
||||
"type", "application/x-shockwave-flash",
|
||||
"pluginspage", "http://www.adobe.com/go/getflashplayer"
|
||||
);
|
||||
} else { // flash is too old or we can't detect the plugin
|
||||
var alternateContent = '<br /><h3 style="color: red;">'
|
||||
+ 'This content requires the Adobe Flash Player. '
|
||||
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a></h3>';
|
||||
document.write(alternateContent); // insert non-flash content
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,203 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#assign standardVisualizationURLRoot ="/visualizationfm">
|
||||
<#assign ajaxVisualizationURLRoot ="/visualizationAjax">
|
||||
<#assign dataVisualizationURLRoot ="/visualizationData">
|
||||
|
||||
<#assign egoURI ="${egoURIParam?url}">
|
||||
<#assign egoCoAuthorshipDataFeederURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthor_network_stream&labelField=label'>
|
||||
|
||||
<#assign coprincipalinvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${egoURI}&visMode=copi'>
|
||||
|
||||
<#assign egoCoAuthorsListDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthors'>
|
||||
<#assign egoCoAuthorshipNetworkDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthor_network_download'>
|
||||
|
||||
<#assign swfLink = '${urls.images}/visualization/coauthorship/EgoCentric.swf'>
|
||||
<#assign adobeFlashDetector = '${urls.base}/js/visualization/coauthorship/AC_OETags.js'>
|
||||
<#assign googleVisualizationAPI = 'http://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22areachart%22%2C%22imagesparkline%22%5D%7D%5D%7D'>
|
||||
<#assign coAuthorPersonLevelJavaScript = '${urls.base}/js/visualization/personlevel/person_level-fm.js'>
|
||||
|
||||
|
||||
<script type="text/javascript" src="${adobeFlashDetector}"></script>
|
||||
<script type="text/javascript" src="${googleVisualizationAPI}"></script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
// -----------------------------------------------------------------------------
|
||||
// Globals
|
||||
// Major version of Flash required
|
||||
var requiredMajorVersion = 10;
|
||||
// Minor version of Flash required
|
||||
var requiredMinorVersion = 0;
|
||||
// Minor version of Flash required
|
||||
var requiredRevision = 0;
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
var swfLink = "${swfLink}";
|
||||
var egoURI = "${egoURI}";
|
||||
var egoCoAuthorshipDataFeederURL = "${egoCoAuthorshipDataFeederURL}";
|
||||
var egoCoAuthorsListDataFileURL = "${egoCoAuthorsListDataFileURL}";
|
||||
var contextPath = "${urls.base}";
|
||||
|
||||
var domainParam = "http://vivo-vis-test.slis.indiana.edu/vivo1/visualizationData";
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="${coAuthorPersonLevelJavaScript}"></script>
|
||||
|
||||
|
||||
<#assign coAuthorStyle = "${urls.base}/css/visualization/personlevel/coauthor_style.css" />
|
||||
<#assign pageStyle = "${urls.base}/css/visualization/personlevel/page.css" />
|
||||
<#assign vizStyle = "${urls.base}/css/visualization/visualization.css" />
|
||||
|
||||
<link href="${coAuthorStyle}" rel="stylesheet" type="text/css" />
|
||||
<link href="${pageStyle}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="${vizStyle}" />
|
||||
|
||||
<#assign loadingImageLink = "${urls.images}/visualization/ajax-loader.gif">
|
||||
|
||||
<#assign egoVivoProfileURL = "/individual?uri=${egoURI}" />
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
<#if (numOfCoAuthorShips > 0) >
|
||||
$("#coauth_table_container").empty().html('<img id="loadingData" width="auto" src="${loadingImageLink}" />');
|
||||
</#if>
|
||||
|
||||
|
||||
processProfileInformation("ego_label",
|
||||
"ego_moniker",
|
||||
"ego_profile_image",
|
||||
jQuery.parseJSON(getWellFormedURLs("${egoURI}", "profile_info")));
|
||||
|
||||
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
|
||||
if ($('#ego_label').text().length > 0) {
|
||||
setProfileName('no_coauthorships_person', $('#ego_label').text());
|
||||
}
|
||||
</#if>
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="body">
|
||||
<div id="ego_profile">
|
||||
|
||||
<#-- Label -->
|
||||
<h2 style="width:20%"><a href="${egoVivoProfileURL}"><span id="ego_label" class="author_name"></span></a></h2>
|
||||
|
||||
<#-- Moniker-->
|
||||
<em id="ego_moniker" class="moniker"></em>
|
||||
|
||||
<div class = "toggle_visualization">
|
||||
<h2>Co-Investigator Network</h2>
|
||||
<a style = "margin-top:0px;" class="view-all-style" href='<c:out value="${coprincipalinvestigatorURL}"/>'>View</a>
|
||||
<span class="pictos-arrow-10">4</span>
|
||||
</div>
|
||||
|
||||
<div style="clear:both;"></div>
|
||||
|
||||
<#if (numOfAuthors > 0) >
|
||||
|
||||
<h2 class="sub_headings">Co-Author Network </h2>
|
||||
|
||||
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
|
||||
<a class = "fileDownloadPlaceHolder" href="${egoCoAuthorshipNetworkDataFileURL}">(GraphML File)</a>
|
||||
<#else>
|
||||
|
||||
<#if numOfAuthors?? && numOfAuthors <= 0 >
|
||||
<#assign authorsText = "multi-author" />
|
||||
</#if>
|
||||
|
||||
<span id="no_coauthorships">Currently there are no ${authorsText!} papers for
|
||||
<a href="${egoVivoProfileURL}"><span id="no_coauthorships_person" class="author_name">this author</span></a>
|
||||
in the VIVO database.
|
||||
</span>
|
||||
</#if>
|
||||
|
||||
<#else>
|
||||
|
||||
<span id="no_coauthorships">Currently there are no papers for
|
||||
<a href="${egoVivoProfileURL}"><span id="no_coauthorships_person" class="author_name">this author</span></a> in the
|
||||
VIVO database.
|
||||
</span>
|
||||
|
||||
</#if>
|
||||
|
||||
</div>
|
||||
|
||||
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
|
||||
|
||||
<div id="bodyPannel">
|
||||
<div id="visPanel" style="float: right; width: 600px;">
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
renderCoAuthorshipVisualization();
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div id="dataPanel">
|
||||
<h4 id ="profileTitle"> <b>Profile</b></h4>
|
||||
<div id="profileImage" class="thumbnail"></div>
|
||||
|
||||
<div class="bold"><strong><span id="authorName" class="neutral_author_name"> </span></strong></div>
|
||||
|
||||
<div class="italicize"><span id="profileMoniker" class="author_moniker"></span></div>
|
||||
<div><a href="#" id="profileUrl">VIVO profile</a> | <a href="#" id="coAuthorshipVisUrl">Co-author network</a></div>
|
||||
<br />
|
||||
<div class="author_stats" id="num_works"><span class="numbers" style="width: 40px;" id="works"></span>
|
||||
<span class="author_stats_text">Publication(s)</span></div>
|
||||
<div class="author_stats" id="num_authors"><span class="numbers" style="width: 40px;" id="coAuthors"></span>
|
||||
<span class="author_stats_text">Co-author(s)</span></div>
|
||||
|
||||
<div class="author_stats" id="fPub" style="visibility:hidden">
|
||||
<span class="numbers" style="width:40px;" id="firstPublication"></span> <span>First Publication</span></div>
|
||||
<div class="author_stats" id="lPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="lastPublication"></span>
|
||||
<span>Last Publication</span></div>
|
||||
<div id="incomplete-data">Note: This information is based solely on publications which have been loaded into the VIVO system.
|
||||
This may only be a small sample of the person's total work. </div>
|
||||
</div>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
<#-- Sparkline -->
|
||||
<div style="width: 60%; height: 100px; float:right;">
|
||||
<#assign sparklineVO = egoPubSparklineVO />
|
||||
<#include "personPublicationSparklineContent.ftl">
|
||||
|
||||
<#assign sparklineVO = uniqueCoauthorsSparklineVO />
|
||||
<#include "coAuthorshipSparklineContent.ftl">
|
||||
</div>
|
||||
|
||||
<#if (numOfAuthors > 0) >
|
||||
|
||||
<div class="vis_stats">
|
||||
|
||||
<h3 class="sub_headings" id="table_heading">Tables</h3>
|
||||
|
||||
<div class="vis-tables">
|
||||
<p id="publications_table_container" class="datatable">
|
||||
TABLE
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<#if (numOfCoAuthorShips > 0) >
|
||||
|
||||
<div class="vis-tables">
|
||||
<p id="coauth_table_container" class="datatable"></p>
|
||||
</div>
|
||||
|
||||
</#if>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</#if>
|
||||
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
|
@ -41,8 +41,6 @@
|
|||
column: 0,
|
||||
minValue: '${sparklineVO.earliestRenderedPublicationYear?c}',
|
||||
maxValue: '${sparklineVO.latestRenderedPublicationYear?c}'
|
||||
/*minValue: '2001',
|
||||
maxValue: '2011'*/
|
||||
}]));
|
||||
|
||||
|
||||
|
|
|
@ -514,6 +514,14 @@ public class CoAuthorshipVisCodeGenerator {
|
|||
|
||||
sparklineData.setTable(tableCode);
|
||||
|
||||
|
||||
Map<String, Integer> yearToUniqueCoauthorsCount = new HashMap<String, Integer>();
|
||||
for (Map.Entry<String, Set<Node>> currentYear : yearToUniqueCoauthors.entrySet()) {
|
||||
yearToUniqueCoauthorsCount.put(currentYear.getKey(), currentYear.getValue().size());
|
||||
}
|
||||
|
||||
sparklineData.setYearToActivityCount(yearToUniqueCoauthorsCount);
|
||||
|
||||
return divContextCode.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -78,9 +78,6 @@ public class PersonLevelRequestHandler implements VisualizationRequestHandler {
|
|||
String egoURI = vitroRequest.getParameter(
|
||||
VisualizationFrameworkConstants.INDIVIDUAL_URI_KEY);
|
||||
|
||||
String renderMode = vitroRequest.getParameter(
|
||||
VisualizationFrameworkConstants.RENDER_MODE_KEY);
|
||||
|
||||
String visMode = vitroRequest.getParameter(
|
||||
VisualizationFrameworkConstants.VIS_MODE_KEY);
|
||||
|
||||
|
|
|
@ -172,20 +172,6 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler {
|
|||
}
|
||||
return finalThumbNailLocation;
|
||||
}
|
||||
/*
|
||||
|
||||
private TemplateResponseValues prepareUtilitiesResponse(String preparedContent, VitroRequest vreq) {
|
||||
|
||||
// response.setContentType("text/plain");
|
||||
|
||||
String utilitiesTemplate = "/visualization/utilities.ftl";
|
||||
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
body.put("utilityResopnse", preparedContent);
|
||||
|
||||
return new TemplateResponseValues(utilitiesTemplate, body);
|
||||
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public Map<String, String> generateDataVisualization(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue