This commit is contained in:
bdc34 2010-07-09 22:04:26 +00:00
commit 0d09bcf546
56 changed files with 9118 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,292 @@
// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function ControlVersion()
{
var version;
var axo;
var e;
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
try {
// version will be set for 7.X or greater players
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {
}
if (!version)
{
try {
// version will be set for 6.X players only
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
// installed player is some revision of 6.0
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
// so we have to be careful.
// default to the first public version
version = "WIN 6,0,21,0";
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
axo.AllowScriptAccess = "always";
// safe to call for 6.0r47 or greater
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 4.X or 5.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 3.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 2.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
}
}
return version;
}
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
var versionRevision = descArray[3];
if (versionRevision == "") {
versionRevision = descArray[4];
}
if (versionRevision[0] == "d") {
versionRevision = versionRevision.substring(1);
} else if (versionRevision[0] == "r") {
versionRevision = versionRevision.substring(1);
if (versionRevision.indexOf("d") > 0) {
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
}
} else if (versionRevision[0] == "b") {
versionRevision = versionRevision.substring(1);
}
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
// Given "WIN 2,0,0,11"
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
tempString = tempArray[1]; // "2,0,0,11"
versionArray = tempString.split(","); // ['2', '0', '0', '11']
} else {
versionArray = versionStr.split(".");
}
var versionMajor = versionArray[0];
var versionMinor = versionArray[1];
var versionRevision = versionArray[2];
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
} else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
}
}
return false;
}
}
function AC_AddExtension(src, ext)
{
var qIndex = src.indexOf('?');
if ( qIndex != -1)
{
// Add the extention (if needed) before the query params
var path = src.substring(0, qIndex);
if (path.length >= ext.length && path.lastIndexOf(ext) == (path.length - ext.length))
return src;
else
return src.replace(/\?/, ext+'?');
}
else
{
// Add the extension (if needed) to the end of the URL
if (src.length >= ext.length && src.lastIndexOf(ext) == (src.length - ext.length))
return src; // Already have extension
else
return src + ext;
}
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '';
if (isIE && isWin && !isOpera)
{
str += '<object ';
for (var i in objAttrs)
str += i + '="' + objAttrs[i] + '" ';
str += '>';
for (var i in params)
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
str += '</object>';
} else {
str += '<embed ';
for (var i in embedAttrs)
str += i + '="' + embedAttrs[i] + '" ';
str += '> </embed>';
}
document.write(str);
}
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
ret.objAttrs[args[i]] = args[i+1];
break;
case "id":
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}

View file

@ -0,0 +1,274 @@
function getWellFormedURLs(given_uri, type) {
// 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() {
if (type == "coauthorship") {
var finalURL = $.ajax({
url: contextPath + "/admin/visQuery",
data: ({vis: "utilities", vis_mode: "COAUTHORSHIP_URL", uri: given_uri}),
dataType: "text",
async: false,
success:function(data){
// console.log("COA - " + data);
}
}).responseText;
return finalURL;
} else if (type == "profile") {
var finalURL = $.ajax({
url: contextPath + "/admin/visQuery",
data: ({vis: "utilities", vis_mode: "PROFILE_URL", uri: given_uri}),
dataType: "text",
async: false,
success:function(data){
}
}).responseText;
return finalURL;
} else if (type == "image") {
var finalURL = $.ajax({
url: contextPath + "/admin/visQuery",
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 + "/admin/visQuery",
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.src = src;
profileImage.width = 150;
profileImage.onerror = failureFunc;
profileImage.onload = successFunc;
return profileImage;
});
}
function setProfileImage(imageContainerID, rawPath, contextPath) {
if (imageContainerID == "") {
return;
}
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) {
if (monikerContainerID == "") {
return;
}
$("#" + monikerContainerID).empty().text(moniker);
}
function setProfileName(nameContainerID, name) {
if (nameContainerID == "") {
return;
}
$("#" + nameContainerID).empty().text(name);
}
function processProfileInformation(nameContainerID,
monikerContainerID,
imageContainerID,
profileInfoJSON) {
var name, imageRawPath, imageContextPath, moniker;
$.each(profileInfoJSON, function(key, set){
if (key.search(/imageThumb/i) > -1) {
imageRawPath = set[0];
} else if (key.search(/imageContextPath/i) > -1) {
imageContextPath = 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);
setProfileMoniker(monikerContainerID, moniker);
setProfileImage(imageContainerID, imageRawPath, imageContextPath);
}
function nodeClickedJS(json){
var obj = jQuery.parseJSON(json);
$("#newsLetter").attr("style","visibility:visible");
$("#authorName").empty().append(obj.name);
$("#works").empty().append(obj.number_of_authored_works);
/*
* Here obj.url points to the uri of that individual
*/
if(obj.url){
$("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile"));
$("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, "coauthorship"));
processProfileInformation("",
"profileMoniker",
"profileImage",
jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")));
} else{
$("#profileUrl").attr("href","#");
$("#coAuthorshipVisUrl").attr("href","#");
}
$("#coAuthorName").empty().append(obj.name);
$("#coAuthors").empty().append(obj.num_coauthors);
$("#firstPublication").empty().append((obj.earliest_publication)?obj.earliest_publication+" First Publication":"");
$("#lastPublication").empty().append((obj.latest_publication)?obj.latest_publication+" Last Publication":"");
// obj.url:the url parameter for node
}
function renderSparklineVisualization(visualizationURL) {
$(document).ready(function() {
//$("#ego_sparkline").empty().html('<img src="${loadingImageLink}" />');
$.ajax({
url: visualizationURL,
dataType: "html",
success:function(data){
$("#ego_sparkline").html(data);
}
});
});
}
function renderCoAuthorshipVisualization() {
//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", "600",
"height", "800",
"align", "middle",
"id", "CoAuthor",
"quality", "high",
"bgcolor", "#ffffff",
"name", "CoAuthor",
"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
AC_FL_RunContent(
"src", swfLink,
"flashVars", "graphmlUrl=" + egoCoAuthorshipDataURL,
"width", "600",
"height", "800",
"align", "middle",
"id", "CoAuthor",
"quality", "high",
"bgcolor", "#ffffff",
"name", "CoAuthor",
"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 = 'Alternate HTML content should be placed here. '
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
}

View file

@ -0,0 +1,318 @@
function getWellFormedURLs(given_uri, type) {
// 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 + "/admin/visQuery",
data: ({vis: "utilities", vis_mode: "PERSON_LEVEL_URL", uri: given_uri}),
dataType: "text",
async: false,
success:function(data){
// console.log("COA - " + data);
}
}).responseText;
return finalURL;
} else if (type == "profile") {
finalURL = $.ajax({
url: contextPath + "/admin/visQuery",
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 + "/admin/visQuery",
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 + "/admin/visQuery",
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.src = src;
profileImage.width = 90;
profileImage.onerror = failureFunc;
profileImage.onload = successFunc;
return profileImage;
});
};
function setProfileImage(imageContainerID, rawPath, contextPath) {
if (imageContainerID == "") {
return;
}
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;
}
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) {
if (nameContainerID == "") {
return;
}
$("#" + nameContainerID).empty().text(name);
}
function processProfileInformation(nameContainerID,
monikerContainerID,
imageContainerID,
profileInfoJSON,
doMonikerEllipsis) {
var name, imageRawPath, imageContextPath, moniker;
$.each(profileInfoJSON, function(key, set){
if (key.search(/imageThumb/i) > -1) {
imageRawPath = set[0];
} else if (key.search(/imageContextPath/i) > -1) {
imageContextPath = 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);
setProfileMoniker(monikerContainerID, moniker, doMonikerEllipsis);
setProfileImage(imageContainerID, imageRawPath, imageContextPath);
}
function visLoaded(nodes){
var jsonedNodes = jQuery.parseJSON(nodes);
$(document).ready(function() {
createTable("coauthorships_table", "coauth_table_container", jsonedNodes.slice(1));
});
}
function createTable(tableID, tableContainer, tableData) {
var table = $('<table>');
table.attr('id', tableID);
table.append($('<caption>').html("Co-Authors <a href=\"" + egoCoAuthorsListDataFileURL + "\">(.CSV File)</a>"));
var header = $('<thead>');
var row = $('<tr>');
var authorTH = $('<th>');
authorTH.html("Author");
row.append(authorTH);
row.append($('<th>').html("Publications with <br />" + $('#ego_label').text()));
header.append(row);
table.append(header);
$.each(tableData, function(i, item){
var row = $('<tr>');
row.append($('<td>').html(item.name));
row.append($('<td>').html(item.number_of_authored_works));
table.append(row);
});
table.prependTo('#' + tableContainer);
$('#' + tableContainer + " #loadingData").remove();
}
function nodeClickedJS(json){
var obj = jQuery.parseJSON(json);
$("#dataPanel").attr("style","visibility:visible");
$("#authorName").empty().append(obj.name);
$("#works").empty().append(obj.number_of_authored_works);
/*
* Here obj.url points to the uri of that individual
*/
if(obj.url){
$("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile"));
$("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, "coauthorship"));
processProfileInformation("",
"profileMoniker",
"profileImage",
jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")),
true);
} else{
$("#profileUrl").attr("href","#");
$("#coAuthorshipVisUrl").attr("href","#");
}
$("#coAuthorName").empty().append(obj.name);
$("#coAuthors").empty().append(obj.num_coauthors);
$("#firstPublication").empty().append(obj.earliest_publication);
(obj.earliest_publication)?$("#fPub").attr("style","visibility:visible"):$("#fPub").attr("style","visibility:hidden");
$("#lastPublication").empty().append(obj.latest_publication);
(obj.latest_publication)?$("#lPub").attr("style","visibility:visible"):$("#lPub").attr("style","visibility:hidden");
// obj.url:the url parameter for node
}
function renderCoAuthorshipVisualization() {
// 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", "600",
"height", "840",
"align", "middle",
"id", "CoAuthor",
"quality", "high",
"bgcolor", "#ffffff",
"name", "CoAuthor",
"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
AC_FL_RunContent(
"src", swfLink,
"flashVars", "graphmlUrl=" + egoCoAuthorshipDataFeederURL,
"width", "600",
"height", "790",
"align", "top",
"id", "CoAuthor",
"quality", "high",
"bgcolor", "#ffffff",
"name", "CoAuthor",
"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 = 'Alternate HTML content should be placed here. '
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
}

View file

@ -122,6 +122,10 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</c:choose>
</div> <!-- end labelAndMoniker -->
<!-- START Sparkline Visualization -->
<jsp:include page="sparklineVisualization.jsp"/>
<!-- END Sparkline Visualization -->
<%-- Links --%>
<c:if test="${ showEdits || !empty entity.url || !empty entity.linksList }">
<div id="dprop-vitro-links" class="propsItem ${editingClass}">

View file

@ -26,6 +26,7 @@
<c:url var="vitroControls" value="/js/controls.js"/>
<c:url var="jqueryForm" value="/js/jquery_plugins/jquery.form.js"/>
<c:url var="tinyMCE" value="/js/tiny_mce/tiny_mce.js"/>
<c:url var="googleVisualizationAPI" value="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"/>
<script type="text/javascript" src="${jquery}"></script>
<script type="text/javascript" src="${getURLParam}"></script>
@ -34,3 +35,4 @@
<script type="text/javascript" src="${jqueryForm}"></script>
<script type="text/javascript" src="${tinyMCE}"></script>
<script type="text/javascript" src="${vitroControls}"></script>
<script type="text/javascript" src="${googleVisualizationAPI}"></script>

View file

@ -0,0 +1,156 @@
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.VClass" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.flags.PortalFlagChoices" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page errorPage="/error.jsp"%>
<% /***********************************************
Displays the little group of things at the bottom of the page
for administrators and editors.
request.attributes:
an Entity object with the name "entity"
request.parameters:
None, should only work with requestScope attributes for security reasons.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
bdc34 2006-01-22 created
**********************************************/
Individual entity = (Individual)request.getAttribute("entity");
boolean displayVisualization = false;
if (entity == null){
String e = "sparklineVisuzalition.jsp expects that request attribute 'entity' be set to the Entity object to display.";
displayVisualization = false;
throw new JspException(e);
} else {
for (VClass currClass : entity.getVClasses()) {
//System.out.println(">> " + currClass.getName());
if (currClass.getName().equalsIgnoreCase("Person")) {
displayVisualization = true;
break;
}
}
}
//System.out.println("visualization is supposed to be displayed? > " + displayVisualization);
if (displayVisualization) {
%>
<c:set var='portalBean' value='${currentPortal}'/>
<c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set>
<c:url var="loadingImageLink" value="/${themeDir}site_icons/visualization/ajax-loader.gif"></c:url>
<!-- START Visualization Code -->
<c:url var="visualizationURL" value="/admin/visQuery">
<c:param name="render_mode" value="dynamic"/>
<c:param name="container" value="vis_container"/>
<c:param name="vis" value="person_pub_count"/>
<c:param name="vis_mode" value="short"/>
<c:param name="uri" value="${entity.URI}"/>
</c:url>
<%-- PDF Visualization URL
For now we have disabled this.
<c:url var="pdfURL" value="/admin/visQuery">
<c:param name="render_mode" value="pdf"/>
<c:param name="container" value="vis_container"/>
<c:param name="vis" value="person_pub_count"/>
<c:param name="vis_mode" value="full"/>
<c:param name="uri" value="${entity.URI}"/>
</c:url>
--%>
<style type="text/css">
#vis_container {
cursor:pointer;
/*height:36px;
margin-left:24%;
margin-top:-2%;
position:absolute;*/
/*width:380px;*/
}
</style>
<script type="text/javascript">
<!--
$(document).ready(function() {
function renderVisualization(visualizationURL) {
$("#vis_container").empty().html('<img src="${loadingImageLink}" />');
$.ajax({
url: visualizationURL,
dataType: "html",
success:function(data){
$("#vis_container").html(data);
}
});
}
renderVisualization('${visualizationURL}');
});
//-->
</script>
<div id="vis_container">
${entity.URI}
</div>
<!--[if IE]>
<style type="text/css">
#vis_container a{
padding-bottom:5px;
}
.vis_link a{
padding:10px;
display: block;
}
</style>
<![endif]-->
<%--
For now we have disabled PDF report vis.
<div id="pdf_url">
This is the <a href="${pdfURL}">link</a> to PDF report.
</div>
--%>
<!-- END Visualization Code -->
<%
}
%>

View file

@ -0,0 +1,46 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<% /***********************************************
Display a single Page in the most basic fashion.
The html <HEAD> is generated followed by the banners and menu.
After that the result of the jsp in the attribute bodyJsp is inserted.
Finally comes the footer.
request.attributes:
"bodyJsp" - jsp of the body of this page.
"title" - title of page
"css" - optional additional css for page
"scripts" - optional name of file containing <script> elements to be included in the page
"bodyAttr" - optional attributes for the <body> tag, e.g. 'onload': use leading space
"portalBean" - PortalBean object for request.
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info.
bdc34 2006-02-03 created
**********************************************/
/*
String e = "";
if (request.getAttribute("bodyJsp") == null){
e+="basicPage.jsp expects that request parameter 'bodyJsp' be set to the jsp to display as the page body.\n";
}
if (request.getAttribute("title") == null){
e+="basicPage.jsp expects that request parameter 'title' be set to the title to use for page.\n";
}
if (request.getAttribute("css") == null){
e+="basicPage.jsp expects that request parameter 'css' be set to css to include in page.\n";
}
if( request.getAttribute("portalBean") == null){
e+="basicPage.jsp expects that request attribute 'portalBean' be set.\n";
}
if( request.getAttribute("appBean") == null){
e+="basicPage.jsp expects that request attribute 'appBean' be set.\n";
}
if( e.length() > 0 ){
throw new JspException(e);
}
*/
%>
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
<c:import url="${bodyJsp}"/>

View file

@ -0,0 +1,7 @@
<%@ page import="edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineVOContainer" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:set var='sparkline' value='${requestScope.sparklineVO}'/>
${sparkline.sparklineContent}
${sparkline.sparklineContext}

View file

@ -0,0 +1,277 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="portalBean" value="${requestScope.portalBean}" />
<c:set var="portalBean" value="${requestScope.portalBean}" />
<c:set var="themeDir">
<c:out value="${portalBean.themeDir}" />
</c:set>
<c:set var="contextPath">
<c:out value="${pageContext.request.contextPath}" />
</c:set>
<c:url var="egoCoAuthorshipDataURL" value="/admin/visQuery">
<c:param name="vis" value="coauthorship" />
<c:param name="render_mode" value="data" />
<c:param name="uri" value="${requestScope.egoURIParam}" />
<c:param name="labelField" value="name" />
</c:url>
<c:url var="egoSparklineVisURL" value="/admin/visQuery">
<c:param name="render_mode" value="dynamic"/>
<c:param name="container" value="ego_sparkline"/>
<c:param name="vis" value="person_pub_count"/>
<c:param name="vis_mode" value="full"/>
<c:param name="uri" value="${requestScope.egoURIParam}"/>
</c:url>
<c:url var="jquery" value="/js/jquery.js" />
<c:url var="adobeFlashDetector" value="/js/visualization/coauthorship/AC_OETags.js" />
<c:url var="coAuthorShipJavaScript" value="/js/visualization/coauthorship/co_authorship.js" />
<c:url var="googleVisualizationAPI" value="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"/>
<c:url var="style" value="/${themeDir}css/visualization/coauthorship/style.css" />
<c:url var="noImage" value="/${themeDir}site_icons/visualization/coauthorship/no_image.png" />
<c:url var="swfLink" value="/${themeDir}site_icons/visualization/coauthorship/CoAuthor.swf" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Co-Authorship Visualization</title>
<script type="text/javascript" src="${adobeFlashDetector}"></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 egoCoAuthorshipDataURL = "${egoCoAuthorshipDataURL}";
var contextPath = "${contextPath}";
// -->
</script>
<script type="text/javascript" src="${jquery}"></script>
<script type="text/javascript" src="${googleVisualizationAPI}"></script>
<link href="${style}" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${coAuthorShipJavaScript}"></script>
<style type="text/css">
#ego_sparkline {
cursor:pointer;
height:36px;
margin-left:24%;
/*margin-top:-18%;*/
position:absolute;
width:471px;
}
</style>
</head>
<body>
<div id="body">
<%-- Label --%>
<div class="datatypePropertyValue">
<div class="statementWrap">
<span id="ego_label"></span>
</div>
</div>
<%-- Moniker--%>
<div class="datatypeProperties">
<div class="datatypePropertyValue">
<div class="statementWrap">
<span id="ego_moniker" class="moniker"></span>
</div>
</div>
</div>
<%-- Image --%>
<div class="datatypeProperties">
<div class="datatypePropertyValue">
<div id="ego_profile-image" class="statementWrap thumbnail">
</div>
</div>
</div>
<%-- Sparkline --%>
<div class="datatypeProperties">
<div class="datatypePropertyValue">
<div id="ego_sparkline">
${requestScope.egoURIParam}
</div>
</div>
</div>
<div id="topShadow"></div>
<div id="bodyPannel" style="height: 900px;"><br class="spacer" />
<div id="visPanel" style="float: left; width: 610px;">
<script type="text/javascript">
<!--
renderCoAuthorshipVisualization();
//-->
</script>
</div>
<div id="dataPanel" style="float: left; width: 150px;"><br />
<br />
<br />
<br />
<br />
<br />
<div id="newsLetter" style="visibility: hidden">
<span class="nltop"></span>
<div class="middle" id="nodeData">
<div id="profileImage"></div>
<div class="bold"><strong><span id="authorName">&nbsp;</span></strong></div>
<div class="italicize"><span id="profileMoniker"></span></div>
<div class="works"><span class="numbers" style="width: 40px;"
id="works">6</span>&nbsp;&nbsp;<span class="title">Works</span></div>
<div class="works"><span class="numbers" style="width: 40px;"
id="coAuthors">78</span>&nbsp;&nbsp;<span>Co-author(s)</span></div>
<br />
<div id="firstPublication"><span></span>&nbsp;<span>First
Publication</span></div>
<div id="lastPublication"><span></span>&nbsp;Last Publication</div>
<br />
<div><a href="#" id="profileUrl">VIVO profile</a></div>
<br />
<div><a href="#" id="coAuthorshipVisUrl">Co-author network of <span id="coAuthorName"></span></a></div>
</div>
<br class="spacer"> <span class="nlbottom"></span>
</div>
</div>
Download co-authorship newtwork as <a href="/vivo1/admin/visQuery?uri=http%3A%2F%2Fvivo.library.cornell.edu%2Fns%2F0.1%23individual5748&amp;vis=person_pub_count&amp;render_mode=data">.graphml</a> file.
<div id="bottomShadow"></div>
</div>
<br class="spacer" />
<table id="publications_data_table">
<caption>Publications per year</caption>
<thead>
<tr>
<th>Year</th>
<th>Publications</th>
</tr>
</thead>
<tbody>
<tr>
<td>2004</td>
<td>4</td>
</tr>
<tr>
<td>2005</td>
<td>2</td>
</tr>
<tr>
<td>11</td>
</tr>
<tr>
<td>Unknown</td>
<td>1</td>
</tr>
</tbody>
</table>
Download data as <a href="/vivo1/admin/visQuery?uri=http%3A%2F%2Fvivo.library.cornell.edu%2Fns%2F0.1%23individual5748&amp;vis=person_pub_count&amp;render_mode=data">.csv</a> file.
<table id="coauthorships_data_table">
<caption>Co - Authorhips</caption>
<thead>
<tr>
<th>Name</th>
<th>Publications</th>
</tr>
</thead>
<tbody>
<tr>
<td>2004</td>
<td>4</td>
</tr>
<tr>
<td>2005</td>
<td>2</td>
</tr>
<tr>
<td>11</td>
</tr>
<tr>
<td>Unknown</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
<script>
$(document).ready(function(){
processProfileInformation("ego_label",
"ego_moniker",
"ego_profile-image",
jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info")));
renderSparklineVisualization("${egoSparklineVisURL}");
var obj = jQuery.parseJSON('{"name":"John"}');
//console.log(obj)
var obj = jQuery.parseJSON('{"imageOffset2":["sup"],"A":["2001","2002","2003","2090","Unknown"],"B":["2001","2002","2003","2090","Unknown"],"C":["2001","2002","2003","2090","Unknown"],"imageOffset":["2090","2002","2003","2001"]}');
//console.log(obj)
$.each(obj, function(i, item){
//console.log("i - " + i + " item - " + item);
$.each(item, function(index, vals) {
//console.log(index + " - val - " + vals);
});
});
});
</script>
</body>
</html>

View file

@ -0,0 +1,407 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="themeDir"><c:out value="${portal.themeDir}" /></c:set>
<c:url var="staticHref" value="/admin/visQuery">
<c:param name="vis" value="person_pub_count"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="vis_mode" value="wth"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5156"/>
</c:url>
<c:url var="staticHref2" value="/admin/visQuery">
<c:param name="vis" value="person_pub_count"/>
<c:param name="vis_mode" value="short"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5611"/>
</c:url>
<c:url var="staticHref_d" value="/admin/visQuery">
<c:param name="render_mode" value="dynamic"/>
<c:param name="container" value="ajax_recipient"/>
<c:param name="vis" value="person_pub_count"/>
<c:param name="vis_mode" value="short"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5156"/>
</c:url>
<c:url var="staticHref2_d" value="/admin/visQuery">
<c:param name="render_mode" value="dynamic"/>
<c:param name="container" value="ajax_recipient"/>
<c:param name="vis" value="person_pub_count"/>
<c:param name="vis_mode" value="full"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5611"/>
</c:url>
<c:url var="staticHref3" value="/admin/visQuery">
<c:param name="vis" value="person_pub_count"/>
<c:param name="vis_mode" value="short"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5748"/>
</c:url>
<c:url var="staticHref3_d" value="/admin/visQuery">
<c:param name="render_mode" value="dynamic"/>
<c:param name="vis" value="person_pub_count"/>
<c:param name="container" value="ajax_recipient"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual22919"/>
</c:url>
<c:url var="collegeCSV" value="/admin/visQuery">
<c:param name="vis" value="college_pub_count"/>
<c:param name="render_mode" value="data"/>
<c:param name="vis_mode" value="wth"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5249"/>
</c:url>
<c:url var="collegeCSV2" value="/admin/visQuery">
<c:param name="vis" value="college_pub_count"/>
<c:param name="render_mode" value="data"/>
<c:param name="vis_mode" value="wth"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual134"/>
</c:url>
<c:url var="collegeCSV3" value="/admin/visQuery">
<c:param name="vis" value="college_pub_count"/>
<c:param name="render_mode" value="data"/>
<c:param name="vis_mode" value="wth"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual249"/>
</c:url>
<c:url var="collegeCSV4" value="/admin/visQuery">
<c:param name="vis" value="college_pub_count"/>
<c:param name="render_mode" value="data"/>
<c:param name="vis_mode" value="wth"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual250"/>
</c:url>
<c:url var="collegeCSV5" value="/admin/visQuery">
<c:param name="vis" value="college_pub_count"/>
<c:param name="render_mode" value="data"/>
<c:param name="vis_mode" value="wth"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual192"/>
</c:url>
<c:url var="coAuthorship1Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5748"/>
</c:url>
<c:url var="coAuthorship2Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5156"/>
</c:url>
<c:url var="coAuthorship3Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5611"/>
</c:url>
<c:url var="coAuthorship4Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5412"/>
</c:url>
<c:url var="coAuthorship1" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5748"/>
</c:url>
<c:url var="coAuthorship2" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5156"/>
</c:url>
<c:url var="coAuthorship3" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5611"/>
</c:url>
<c:url var="coAuthorship4" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5412"/>
</c:url>
<c:url var="coAuthorship5" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5714"/>
</c:url>
<c:url var="coAuthorship5Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5714"/>
</c:url>
<c:url var="coAuthorship6" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual240"/>
</c:url>
<c:url var="coAuthorship6Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual240"/>
</c:url>
<c:url var="coAuthorship7" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual37"/>
</c:url>
<c:url var="coAuthorship7Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual37"/>
</c:url>
<c:url var="coAuthorship8" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5355"/>
</c:url>
<c:url var="coAuthorship8Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5355"/>
</c:url>
<c:url var="coAuthorship9" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5734"/>
</c:url>
<c:url var="coAuthorship9Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5734"/>
</c:url>
<c:url var="coAuthorship10" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual12053"/>
</c:url>
<c:url var="coAuthorship10Data" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual12053"/>
</c:url>
<c:url var="coAuthorshipSparklineData" value="/admin/visQuery">
<c:param name="vis" value="coauthorship"/>
<c:param name="vis_mode" value="sparkline"/>
<c:param name="render_mode" value="data"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5748"/>
</c:url>
<c:url var="personLevel1" value="/admin/visQuery">
<c:param name="vis" value="person_level"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="container" value="ego_sparkline"/>
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5748"/>
</c:url>
<c:url var="loadingImageLink" value="/${themeDir}site_icons/visualization/ajax-loader.gif"></c:url>
<style type="text/css">
.get_vis {
background-color:Yellow;
color:blue;
cursor:pointer;
height:36px;
width:225px;
}
</style>
<script type="text/javascript">
<!--
$(document).ready(function() {
function renderVisualization(visualizationURL) {
$("#ajax_recipient").empty().html('<img src="${loadingImageLink}" />');
$.ajax({
url: visualizationURL,
dataType: "html",
success:function(data){
$("#ajax_recipient").html(data);
}
});
}
$("#ajax_activator").click(function() {
$.ajax({
url: '${staticHref3_d}',
dataType: "html",
success:function(data){
$("#ajax_recipient").text(data);
}
});
});
$("#ajax_activator_1").click(function() {
renderVisualization('${staticHref_d}');
});
$("#ajax_activator_2").click(function() {
renderVisualization('${staticHref2_d}');
});
$("#ajax_activator_3").click(function() {
renderVisualization('${staticHref3_d}');
});
});
//-->
</script>
<div class="staticPageBackground">
<style type="text/css">
#test-bed {
background-color:red;
color:white;
text-align:center;
}
</style>
<h1 id="test-bed">Visualization Testbed (Not to be seen by eventual end users)</h1>
<a href='<c:out value="${coAuthorship1}"/>'>vis link for coauthorship -> "Erb, Hollis Nancy"</a>
&nbsp;&nbsp;<a href='<c:out value="${coAuthorship1Data}"/>'>Data</a>
&nbsp;&nbsp;<a href='<c:out value="${personLevel1}"/>'>Person Level</a>
&nbsp;&nbsp;<a href='<c:out value="${coAuthorshipSparklineData}"/>'>Unique Coauthors CSV Data</a>
<br />
<a href='<c:out value="${coAuthorship2}"/>'>vis link for coauthorship -> "Not Working" {"Crane, Brian"}</a>&nbsp;
<a href='<c:out value="${coAuthorship2Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship3}"/>'>vis link for coauthorship -> "Merwin, Ian A"</a>&nbsp;
<a href='<c:out value="${coAuthorship3Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship4}"/>'>vis link for coauthorship -> "Thies, Janice"</a>&nbsp;
<a href='<c:out value="${coAuthorship4Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship5}"/>'>vis link for coauthorship -> "Not Working"</a>&nbsp;
<a href='<c:out value="${coAuthorship5Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship6}"/>'>vis link for coauthorship -> "Boor, Kathryn Jean"</a>&nbsp;
<a href='<c:out value="${coAuthorship6Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship7}"/>'>vis link for coauthorship -> "Wiedmann, Martin"</a>&nbsp;
<a href='<c:out value="${coAuthorship7Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship8}"/>'>vis link for coauthorship -> "Not Working"</a>&nbsp;
<a href='<c:out value="${coAuthorship8Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship9}"/>'>vis link for coauthorship -> "Not Working"</a>&nbsp;
<a href='<c:out value="${coAuthorship9Data}"/>'>Data</a><br />
<a href='<c:out value="${coAuthorship10}"/>'>vis link for coauthorship -> "Not Working"</a>&nbsp;
<a href='<c:out value="${coAuthorship10Data}"/>'>Data</a><br />
<br /><br /><br />
<a href='<c:out value="${collegeCSV}"/>'>vis data query for college -> "School of Industrial and Labor Relations (ILR)"</a><br />
<a href='<c:out value="${collegeCSV2}"/>'>vis data query for college -> "College of Agriculture and Life Sciences (CALS)"</a><br />
<a href='<c:out value="${collegeCSV3}"/>'>vis data query for college -> "College of Arts and Sciences"</a><br />
<a href='<c:out value="${collegeCSV4}"/>'>vis data query for college -> "College of Engineering"</a><br />
<a href='<c:out value="${collegeCSV5}"/>'>vis data query for college -> "Joan and Sanford I. Weill Medical College"</a><br />
<a href='<c:out value="${staticHref}"/>'>vis query for person -> "Crane, Brian"</a>
<div id="ajax_activator_1" class="get_vis">
Click to render this Person's vis via AJAX.
</div>
<br />
<a href='<c:out value="${staticHref2}"/>'>vis query for person -> "Merwin, Ian A"</a>
<div id="ajax_activator_2" class="get_vis">
Click to render this Person's vis via AJAX.
</div>
<br />
<a href='<c:out value="${staticHref3}"/>'>vis query for person -> "Erb, Hollis Nancy"</a>
<div id="ajax_activator_3" class="get_vis">
Click to render this Person's vis via AJAX.
</div>
<br />
<br />
<div id="ajax_activator" class="get_vis">
AJAX Content in Text (only for research)
</div>
<br />
<br />
<div id="ajax_recipient">
vis Content via AJAX here
<!--
<div id="pub_count_areachart_vis">AREA CHART</div>
<div id="pub_count_sparkline_vis">pub sparkline chart</div>
-->
</div>
</div>

View file

@ -0,0 +1,284 @@
<%@ page import="edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineVOContainer"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<c:set var="portalBean" value="${requestScope.portalBean}" />
<c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set>
<c:url var="visImageContextPath" value="/${themeDir}site_icons/visualization/" />
<c:url var="loadingImageLink" value="/${themeDir}site_icons/visualization/ajax-loader.gif"></c:url>
<c:set var='egoPubSparkline' value='${requestScope.egoPubSparklineVO}' />
<c:set var='uniqueCoauthorsSparkline' value='${requestScope.uniqueCoauthorsSparklineVO}' />
<c:set var='egoPubSparklineContainerID' value='${requestScope.egoPubSparklineContainerID}' />
<c:set var='uniqueCoauthorsSparklineVisContainerID' value='${requestScope.uniqueCoauthorsSparklineVisContainerID}' />
<c:set var='numOfAuthors' value='${requestScope.numOfAuthors}' />
<c:set var='numOfCoAuthorShips' value='${requestScope.numOfCoAuthorShips}' />
<c:url var="egoSparklineDataURL" value="/admin/visQuery">
<c:param name="render_mode" value="data" />
<c:param name="vis" value="person_pub_count" />
<c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url>
<c:url var="coAuthorshipDownloadFile" value="/admin/visQuery">
<c:param name="vis" value="person_level" />
<c:param name="render_mode" value="data" />
<c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url>
<div id="body">
<style type="text/css">
#body h1 {
margin:0.0em;
}
.sparkline_wrapper_table {
display: inline;
vertical-align: bottom;
}
.author_name {
color: #13968c;
font-weight: bold;
}
.neutral_author_name {
color: black;
font-weight: bold;
}
.author_moniker {
color: #9C9C9C;
}
.sub_headings {
color: #121b3c;
padding-top: 10px;
margin-bottom: 0.3em;
}
.sub_headings a {
font-size:0.7em;
font-weight:normal;
}
table.sparkline_wrapper_table td, th {
vertical-align: bottom;
}
.inline_href {
}
#ego_profile {
padding-left:10px;
padding-top:10px;
min-height: 100px;
}
#ego_label {
font-size:1.1em;
/*margin-left:100px;
margin-top:9px;
position:absolute;*/
}
#ego_moniker {
/*margin-left:100px;
margin-top:27px;
position:absolute;*/
}
#ego_profile_image {
float:left;
padding-right: 5px;
/*width: 100px;*/
}
#ego_sparkline {
cursor:pointer;
height:36px;
/*
margin-left:10px;
margin-top:69px;
position:absolute;*/
width:471px;
}
#dataPanel {
/*
float: left;
width: 150px;
visibility:hidden;*/
}
#coauthorships_table th {
vertical-align: top;
}
</style>
<!--[if IE]>
<style type="text/css">
#${egoPubSparklineContainerID},
#${uniqueCoauthorsSparklineVisContainerID} {
padding-bottom:15px;
}
#ego_label {
margin-left:-3px;
}
</style>
<![endif]-->
<div id="ego_profile">
<%-- Image --%>
<span id="ego_profile_image"></span>
<%-- Label --%>
<h1><span id="ego_label" class="author_name"></span></h1>
<%-- Moniker--%>
<span id="ego_moniker" class="author_moniker"></span>
<div style="clear:both;"></div>
<%-- Sparkline --%>
<h2 class="sub_headings">General Statistics</h2>
<div id="${egoPubSparklineContainerID}">
${egoPubSparkline.sparklineContent}
</div>
<div id="${uniqueCoauthorsSparklineVisContainerID}">
${uniqueCoauthorsSparkline.sparklineContent}
</div>
<h2 class="sub_headings">Co-Author Network
<%-- A simple if/else condition --%>
<c:choose>
<c:when test="${numOfCoAuthorShips > 0 || numOfAuthors > 0}">
<a href="${coAuthorshipDownloadFile}">(.GraphML File)</a></h2>
</c:when>
<c:otherwise>
</h2>
<c:if test='${numOfAuthors > 0}'>
<c:set var='authorsText' value='multi-author' />
</c:if>
<span id="no_coauthorships">Currently there are no ${authorsText} papers for
<span id="no_coauthorships_person" class="author_name">this author</span> in the VIVO database.</span>
</c:otherwise>
</c:choose>
</div>
<c:if test='${numOfCoAuthorShips > 0 || numOfAuthors > 0}'>
<div id="bodyPannel">
<div id="visPanel" style="float: left; width: 600px;">
<script language="JavaScript" type="text/javascript">
<!--
renderCoAuthorshipVisualization();
//-->
</script>
</div>
<div id="dataPanel">
<br />
<br />
<div id="profileImage"></div>
<div class="bold"><strong><span id="authorName" class="neutral_author_name">&nbsp;</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="works"><span class="numbers" style="width: 40px;" id="works"></span>&nbsp;&nbsp;<span class="title">Works</span></div>
<div class="works"><span class="numbers" style="width: 40px;" id="coAuthors"></span>&nbsp;&nbsp;<span>Co-author(s)</span></div>
<div class="works" id="fPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="firstPublication"></span>&nbsp;&nbsp;<span>First Publication</span></div>
<div class="works" id="lPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="lastPublication"></span>&nbsp;&nbsp;<span>Last Publication</span></div>
</div>
</div>
</c:if>
<c:if test='${numOfAuthors > 0}'>
<div class="vis_stats">
<h2 class="sub_headings">Tables</h2>
<div class="vis-tables">
<p id="publications_table_container" class="datatable">
${egoPubSparkline.table}
</p>
</div>
<c:if test='${numOfCoAuthorShips > 0}'>
<div class="vis-tables">
<p id="coauth_table_container" class="datatable"></p>
</div>
</c:if>
<div style="clear:both;"></div>
</div>
</c:if>
</div>
<script language="JavaScript" type="text/javascript">
$(document).ready(function(){
<c:if test='${numOfCoAuthorShips > 0}'>
$("#coauth_table_container").empty().html('<img id="loadingData" with="auto" src="${loadingImageLink}" />');
</c:if>
processProfileInformation("ego_label",
"ego_moniker",
"ego_profile_image",
jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info")));
/*
if ($('#profileMoniker').text().length > 30) {
//$('#profileMoniker').text($('#profileMoniker').text().substr(0, 30) + "...");
console.log("what");
}*/
<c:if test='${numOfCoAuthorShips <= 0}'>
if ($('#ego_label').text().length > 0) {
setProfileName('no_coauthorships_person', $('#ego_label').text());
}
</c:if>
});
</script>

View file

@ -0,0 +1,59 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:set var="portalBean" value="${requestScope.portalBean}" />
<c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set>
<c:set var="contextPath"><c:out value="${pageContext.request.contextPath}" /></c:set>
<c:url var="egoCoAuthorshipDataFeederURL" value="/admin/visQuery">
<c:param name="vis" value="coauthorship" />
<c:param name="render_mode" value="data" />
<c:param name="uri" value="${requestScope.egoURIParam}" />
<c:param name="labelField" value="name" />
</c:url>
<c:url var="egoCoAuthorsListDataFileURL" value="/admin/visQuery">
<c:param name="vis" value="person_level" />
<c:param name="render_mode" value="data" />
<c:param name="vis_mode" value="coauthors" />
<c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url>
<c:url var="swfLink" value="/${themeDir}site_icons/visualization/coauthorship/CoAuthor.swf" />
<c:url var="jquery" value="/js/jquery.js"/>
<c:url var="adobeFlashDetector" value="/js/visualization/coauthorship/AC_OETags.js" />
<c:url var="googleVisualizationAPI" value="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"/>
<c:url var="coAuthorShipJavaScript" value="/js/visualization/personlevel/person_level.js" />
<script type="text/javascript" src="${adobeFlashDetector}"></script>
<script type="text/javascript" src="${jquery}"></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 egoCoAuthorshipDataFeederURL = "${egoCoAuthorshipDataFeederURL}";
var egoCoAuthorsListDataFileURL = "${egoCoAuthorsListDataFileURL}";
var contextPath = "${contextPath}";
// -->
</script>
<script type="text/javascript" src="${coAuthorShipJavaScript}"></script>
<c:url var="coAuthorStyle" value="/${themeDir}css/visualization/personlevel/coauthor_style.css" />
<c:url var="pageStyle" value="/${themeDir}css/visualization/personlevel/page.css" />
<link href="${coAuthorStyle}" rel="stylesheet" type="text/css" />
<link href="${pageStyle}" rel="stylesheet" type="text/css" />

View file

@ -0,0 +1,15 @@
<%@ page import="edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineVOContainer" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var='sparkline' value='${requestScope.sparklineVO}'/>
<div class="staticPageBackground">
<div id="pub_count_vis_container">
${sparkline.sparklineContent}
</div>
${sparkline.sparklineContext}
</div>

View file

@ -0,0 +1,9 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<div class="staticPageBackground">
${requestScope.error}
</div>

View file

@ -0,0 +1,24 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<% /***********************************************
This file is used to inject <link> and <script> elements
into the head element of the generated source of a VITRO
page that is being displayed by the entity controller.
In other words, anything like domain.com/entity?...
will have the lines specified here added in the <head>
of the page.
This is a great way to specify JavaScript or CSS files
at the entity display level as opposed to globally.
Example:
<link rel="stylesheet" type="text/css" href="/css/entity.css"/>" media="screen"/>
<script type="text/javascript" src="/js/jquery.js"></script>
****************************************************/ %>
<c:url var="jquery" value="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/>
<c:url var="googleVisualizationAPI" value="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"/>
<script type="text/javascript" src="${jquery}"></script>
<script type="text/javascript" src="${googleVisualizationAPI}"></script>

View file

@ -223,6 +223,18 @@ table#head{
#header img{
margin:0;
}
#research_instance {
background-color:red;
color:white;
font-size:1.25em;
font-weight:bold;
text-align:center;
}
#research_instance a {
color:white;
}
/************** header search form *********************************/