Made the following changes:

1) Rewrote queries for CoPIGrantCount and PersonGrantCount -- Fixed a major bug
2) lots of styling changes to coauthor_style.css and page.css and couple of changes to person_level.jsp to incorporate new changes from Elisha's mockup.
3) Increased the width of sparklines to 150px. The text surrounding the sparklines needs to be further styled.
This commit is contained in:
bkoniden 2010-12-22 00:44:02 +00:00
parent 42130a615a
commit 7dc4628302
11 changed files with 620 additions and 280 deletions

View file

@ -9,33 +9,36 @@
<c:url var="visImageContextPath" value="/${themeDir}site_icons/visualization/" /> <c:url var="visImageContextPath" value="/${themeDir}site_icons/visualization/" />
<c:url var="loadingImageLink" value="/${themeDir}site_icons/visualization/ajax-loader.gif"></c:url> <c:url var="loadingImageLink" value="/${themeDir}site_icons/visualization/ajax-loader.gif"></c:url>
<!-- Co-Author section -->
<c:set var='egoPubSparkline' value='${requestScope.egoPubSparklineVO}' /> <c:set var='egoPubSparkline' value='${requestScope.egoPubSparklineVO}' />
<c:set var='egoGrantSparkline' value='${requestScope.egoGrantSparklineVO}' />
<c:set var='uniqueCoauthorsSparkline' value='${requestScope.uniqueCoauthorsSparklineVO}' /> <c:set var='uniqueCoauthorsSparkline' value='${requestScope.uniqueCoauthorsSparklineVO}' />
<c:set var='uniqueCopisSparkline' value='${requestScope.uniqueCopisSparklineVO}' />
<c:set var='egoPubSparklineContainerID' value='${requestScope.egoPubSparklineContainerID}' />
<c:set var='uniqueCoauthorsSparklineVisContainerID' value='${requestScope.uniqueCoauthorsSparklineVisContainerID}' />
<c:set var='numOfAuthors' value='${requestScope.numOfAuthors}' /> <c:set var='numOfAuthors' value='${requestScope.numOfAuthors}' />
<c:set var='numOfCoAuthorShips' value='${requestScope.numOfCoAuthorShips}' /> <c:set var='numOfCoAuthorShips' value='${requestScope.numOfCoAuthorShips}' />
<c:url var="coAuthorshipDownloadFile" value="/visualization">
<c:param name="vis" value="person_level" />
<c:param name="render_mode" value="data" />
<c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url>
<c:url var="coauthorshipURL" value="/visualization">
<c:param name="vis" value="person_level"/>
<c:param name="render_mode" value="standalone"/>
<c:param name="uri" value="${requestScope.egoURIParam}"/>
<c:param name = "vis_mode" value = "coauthorship"/>
</c:url>
<!-- Co-PI section -->
<c:set var='egoGrantSparkline' value='${requestScope.egoGrantSparklineVO}' />
<c:set var='uniqueCopisSparkline' value='${requestScope.uniqueCopisSparklineVO}' />
<c:set var='numOfInvestigators' value='${requestScope.numOfInvestigators}' /> <c:set var='numOfInvestigators' value='${requestScope.numOfInvestigators}' />
<c:set var='numOfCoPIs' value='${requestScope.numOfCoPIs}' /> <c:set var='numOfCoPIs' value='${requestScope.numOfCoPIs}' />
<!-- Needs to be changed -->
<c:url var="egoVivoProfileURL" value="/individual"> <c:url var="coprincipalinvestigatorDownloadFile" value="/visualization">
<c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url>
<c:url var="egoSparklineDataURL" value="/visualization">
<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="/visualization">
<c:param name="vis" value="person_level" /> <c:param name="vis" value="person_level" />
<c:param name="render_mode" value="data" /> <c:param name="render_mode" value="data" />
<c:param name="uri" value="${requestScope.egoURIParam}" /> <c:param name="uri" value="${requestScope.egoURIParam}" />
@ -48,250 +51,306 @@
<c:param name = "vis_mode" value = "copi"/> <c:param name = "vis_mode" value = "copi"/>
</c:url> </c:url>
<c:url var="coauthorshipURL" value="/visualization"> <!-- Common section -->
<c:param name="vis" value="person_level"/>
<c:param name="render_mode" value="standalone"/> <c:set var='egoPubSparklineContainerID' value='${requestScope.egoPubSparklineContainerID}' />
<c:param name="uri" value="${requestScope.egoURIParam}"/> <c:set var='uniqueCoauthorsSparklineVisContainerID' value='${requestScope.uniqueCoauthorsSparklineVisContainerID}' />
<c:param name = "vis_mode" value = "coauthorship"/>
<c:url var="egoVivoProfileURL" value="/individual">
<c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url> </c:url>
<!-- Needs to be changed based on visMode-->
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
<c:if test='${numOfCoAuthorShips > 0}'> <c:choose>
$("#coauth_table_container").empty().html('<img id="loadingData" with="auto" src="${loadingImageLink}" />'); <c:when test='${visMode == "coauthorship"}'>
</c:if> <c:if test='${numOfCoAuthorShips > 0}'>
$("#coauth_table_container").empty().html('<img id="loadingData" width="auto" src="${loadingImageLink}" />');
</c:if>
</c:when>
<c:otherwise>
<c:if test='${numOfCoPIs > 0}'>
$("#coauth_table_container").empty().html('<img id="loadingData" width="auto" src="${loadingImageLink}" />');
</c:if>
</c:otherwise>
</c:choose>
processProfileInformation("ego_label", processProfileInformation("ego_label",
"ego_moniker", "ego_moniker",
"ego_profile_image", "ego_profile_image",
jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info"))); jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info")));
<c:if test='${empty numOfCoAuthorShips || empty numOfAuthors}'>
<c:choose>
if ($('#ego_label').text().length > 0) { <c:when test='${visMode == "coauthorship"}'>
setProfileName('no_coauthorships_person', $('#ego_label').text()); <c:if test='${empty numOfCoAuthorShips || empty numOfAuthors}'>
}
if ($('#ego_label').text().length > 0) {
</c:if> setProfileName('no_coauthorships_person', $('#ego_label').text());
}
</c:if>
</c:when>
<c:otherwise>
<c:if test='${empty numOfCoPIs || empty numOfInvestigators}'>
if ($('#ego_label').text().length > 0) {
setProfileName('no_coauthorships_person', $('#ego_label').text());
}
</c:if>
</c:otherwise>
</c:choose>
}); });
</script> </script>
<div id="body"> <c:choose>
<c:when test='${visMode == "coauthorship"}'>
<!--[if IE]>
<style type="text/css">
#${egoPubSparklineContainerID}, <c:url var="egoSparklineDataURL" value="/visualization">
#${uniqueCoauthorsSparklineVisContainerID} { <c:param name="render_mode" value="data" />
padding-bottom:15px; <c:param name="vis" value="person_pub_count" />
} <c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url>
#ego_label {
margin-left:-3px; <div id="body">
} <div id="ego_profile">
</style>
<![endif]--> <%-- Label --%>
<h2 style="width:20%"><a href="${egoVivoProfileURL}"><span id="ego_label" class="author_name"></span></a></h2>
<div id="ego_profile">
<%-- Image --%>
<div id="ego_profile_image" class="thumbnail"></div>
<%-- Label --%> <%-- Moniker--%>
<h2><a href="${egoVivoProfileURL}"><span id="ego_label" class="author_name"></span></a></h2> <em id="ego_moniker" class="moniker"></em>
<%-- Moniker--%> <div class = "toggle_visualization">
<span id="ego_moniker" class="author_moniker"></span> <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>
<c:choose>
<c:when test='${numOfAuthors > 0}'>
<h2 class="sub_headings">Co-Author Network </h2>
<c:choose> <c:choose>
<c:when test='${visMode == "coauthorship"}'> <c:when test="${numOfCoAuthorShips > 0 || numOfAuthors > 0}">
<h2 class = "toggle_visualization" style="text-align:center; clear: left;">Co-Investigator Network</h2> <a class = "fileDownloadPlaceHolder" href="${coAuthorshipDownloadFile}">(GraphML File)</a>
<a href='<c:out value="${coprincipalinvestigatorURL}"/>'>view</a> </c:when>
</c:when> <c:otherwise>
<c:otherwise> <c:if test='${numOfAuthors > 0}'>
<h2 class = "toggle_visualization" style="text-align:center; clear: left;"> <c:set var='authorsText' value='multi-author' />
<a href='<c:out value="${coauthorshipURL}"/>'> Co-Author Network</a> </c:if>
</h2>
</c:otherwise> <span id="no_coauthorships">Currently there are no ${authorsText} papers for
</c:choose> <a href="${egoVivoProfileURL}"><span id="no_coauthorships_person" class="author_name">this author</span></a>
in the VIVO database.
<div style="clear:both;"></div> </span>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<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>
</c:otherwise>
</c:choose>
</div>
<c:choose> <c:if test='${numOfCoAuthorShips > 0 || numOfAuthors > 0}'>
<c:when test='${numOfAuthors > 0}'> <div id="bodyPannel">
<div id="visPanel" style="float: right; width: 600px;">
<%-- Sparkline --%> <script language="JavaScript" type="text/javascript">
<h2 class="sub_headings">General Statistics</h2> <!--
<c:choose> renderCoAuthorshipVisualization();
<c:when test='${visMode == "coauthorship"}'> //-->
<div id="${egoPubSparklineContainerID}"> </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">&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="author_stats" id="num_works"><span class="numbers" style="width: 40px;" id="works"></span>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<span>First Publication</span></div>
<div class="author_stats" id="lPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="lastPublication"></span>&nbsp;&nbsp;<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>
</c:if>
<%-- Sparkline --%>
<div style="width: 60%; height: 100px; float:right;">
<div id="${egoPubSparklineContainerID}" style="float: left; width: 40%">
${egoPubSparkline.sparklineContent} ${egoPubSparkline.sparklineContent}
</div> </div>
<div id="${uniqueCoauthorsSparklineVisContainerID}"> <div id="${uniqueCoauthorsSparklineVisContainerID}" style="float: right;width: 40%">
${uniqueCoauthorsSparkline.sparklineContent} ${uniqueCoauthorsSparkline.sparklineContent}
</div> </div>
</c:when> </div>
<c:otherwise>
<div id="${egoPubSparklineContainerID}"> <c:if test='${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">
${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>
</c:when>
<c:otherwise>
<c:url var="egoSparklineDataURL" value="/visualization">
<c:param name="render_mode" value="data" />
<c:param name="vis" value="person_pub_count" />
<c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url>
<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" style="text-align:center; clear: left;">
<h2>Co-Author Network</h2>
<a class="view-all-style" href='<c:out value="${coprincipalinvestigatorURL}"/>'>View</a>
<span class="pictos-arrow-10">4</span>
</div>
<div style="clear:both;"></div>
<c:choose>
<c:when test='${numOfInvestigators > 0}'>
<h2 class="sub_headings">Co-Investigator Network </h2>
<c:choose>
<c:when test="${numOfCoPIs > 0 || numOfInvestigators > 0}">
<a class = "fileDownloadPlaceHolder" href="${coprincipalinvestigatorDownloadFile}">(GraphML File)</a>
</c:when>
<c:otherwise>
<c:if test='${numOfInvestigators > 0}'>
<c:set var='authorsText' value='multi-author' />
</c:if>
<span id="no_coauthorships">Currently there are no ${authorsText} grants for
<a href="${egoVivoProfileURL}"><span id="no_coauthorships_person" class="author_name">this investigator</span></a> in the VIVO database.</span>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<span id="no_coauthorships">Currently there are no ${authorsText} grants for
<a href="${egoVivoProfileURL}"><span id="no_coauthorships_person" class="author_name">this investigator</span></a> in the VIVO database.
</span>
</c:otherwise>
</c:choose>
</div>
<c:if test='${numOfCoPIs > 0 || numOfInvestigators > 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">&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-PI network</a></div>
<br />
<div class="author_stats" id="num_works"><span class="numbers" style="width: 40px;" id="works"></span>&nbsp;&nbsp;<span class="author_stats_text">Grant(s)</span></div>
<div class="author_stats" id="num_authors"><span class="numbers" style="width: 40px;" id="coAuthors"></span>&nbsp;&nbsp;<span class="author_stats_text">Co-PI(s)</span></div>
<div class="author_stats" id="fPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="firstPublication"></span>&nbsp;&nbsp;<span>First Grant</span></div>
<div class="author_stats" id="lPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="lastPublication"></span>&nbsp;&nbsp;<span>Last Grant</span></div>
<div id="incomplete-data">Note: This information is based solely on grants which have been loaded into the VIVO system.
This may only be a small sample of the person's total work. </div>
</div>
</div>
</c:if>
<%-- Sparkline --%>
<div style="width: 60%; height: 100px; float:right;">
<div id="${egoPubSparklineContainerID}" style="float: left;width: 40%">
${egoGrantSparkline.sparklineContent} ${egoGrantSparkline.sparklineContent}
</div> </div>
<div id="${uniqueCoauthorsSparklineVisContainerID}"> <div id="${uniqueCoauthorsSparklineVisContainerID}" style="float: right;width: 40%">
${uniqueCopisSparkline.sparklineContent} ${uniqueCopisSparkline.sparklineContent}
</div> </div>
</c:otherwise>
</c:choose>
<c:choose> </div>
<c:when test='${visMode == "coauthorship"}'>
<h2 class="sub_headings">Co-Author Network </h2>
</c:when>
<c:otherwise>
<h2 class="sub_headings">Co-PI Network </h2>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${numOfCoAuthorShips > 0 || numOfAuthors > 0}">
<a class = "fileDownloadPlaceHolder" href="${coAuthorshipDownloadFile}">(GraphML File)</a>
</c:when>
<c:otherwise>
<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
<a href="${egoVivoProfileURL}"><span id="no_coauthorships_person" class="author_name">this author</span></a> in the VIVO database.</span>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<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>
</c:otherwise>
</c:choose>
</div> <c:if test='${numOfInvestigators > 0}'>
<c:if test='${numOfCoAuthorShips > 0 || numOfAuthors > 0}'>
<div id="bodyPannel">
<div id="visPanel" style="float: right; width: 600px;">
<script language="JavaScript" type="text/javascript">
<!--
renderCoAuthorshipVisualization();
//-->
</script>
</div>
<c:choose>
<c:when test='${visMode == "coauthorship"}'>
<div id="dataPanel">
<br /> <div class="vis_stats">
<br />
<div id="profileImage" class="thumbnail"></div> <h3 class="sub_headings" id="table_heading">Tables</h3>
<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="author_stats" id="num_works"><span class="numbers" style="width: 40px;" id="works"></span>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<span>First Publication</span></div>
<div class="author_stats" id="lPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="lastPublication"></span>&nbsp;&nbsp;<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>
</c:when>
<c:otherwise>
<div id="dataPanel">
<br />
<br />
<div id="profileImage" class="thumbnail"></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-PI network</a></div>
<br />
<div class="author_stats" id="num_works"><span class="numbers" style="width: 40px;" id="works"></span>&nbsp;&nbsp;<span class="author_stats_text">Grant(s)</span></div>
<div class="author_stats" id="num_authors"><span class="numbers" style="width: 40px;" id="coAuthors"></span>&nbsp;&nbsp;<span class="author_stats_text">Co-PI(s)</span></div>
<div class="author_stats" id="fPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="firstPublication"></span>&nbsp;&nbsp;<span>First Grant</span></div>
<div class="author_stats" id="lPub" style="visibility:hidden"><span class="numbers" style="width:40px;" id="lastPublication"></span>&nbsp;&nbsp;<span>Last Grant</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>
</c:otherwise>
</c:choose>
</div>
</c:if>
<c:choose>
<c:when test='${visMode == "coauthorship"}'>
<c:if test='${numOfAuthors > 0}'>
<div class="vis_stats">
<h3 class="sub_headings">Tables</h3>
<div class="vis-tables">
<p id="publications_table_container" class="datatable">
${egoPubSparkline.table}
</p>
</div>
<c:if test='${numOfCoAuthorShips > 0}'>
<div class="vis-tables"> <div class="vis-tables">
<p id="coauth_table_container" class="datatable"></p> <p id="publications_table_container" class="datatable">
${egoGrantSparkline.table}
</p>
</div> </div>
<c:if test='${numOfCoPIs > 0}'>
</c:if> <div class="vis-tables">
<p id="coauth_table_container" class="datatable"></p>
</div>
</c:if>
<div style="clear:both;"></div>
<div style="clear:both;"></div>
</div>
</c:if>
</c:when>
<c:otherwise>
<c:if test='${numOfInvestigators > 0}'>
<div class="vis_stats">
<h2 class="sub_headings">Tables</h2>
<div class="vis-tables">
<p id="publications_table_container" class="datatable">
${egoGrantSparkline.table}
</p>
</div> </div>
</c:if>
<c:if test='${numOfCoPIs > 0}'> </div>
<div class="vis-tables"> </c:otherwise>
<p id="coauth_table_container" class="datatable"></p>
</div> </c:choose>
</c:if>
<div style="clear:both;"></div>
</div>
</c:if>
</c:otherwise>
</c:choose>
</div>

View file

@ -227,7 +227,7 @@ public class CoAuthorshipVisCodeGenerator {
} }
String sparklineDisplayOptions = "{width: 65, height: 30, showAxisLines: false, " String sparklineDisplayOptions = "{width: 150, height: 30, showAxisLines: false, "
+ "showValueLabels: false, labelPosition: 'none'}"; + "showValueLabels: false, labelPosition: 'none'}";
if (providedVisContainerID != null) { if (providedVisContainerID != null) {
@ -397,7 +397,7 @@ public class CoAuthorshipVisCodeGenerator {
+ unknownYearCoauthors) + "');"); + unknownYearCoauthors) + "');");
visualizationCode.append("var allSparksText = ''" visualizationCode.append("var allSparksText = ''"
+ "+ ' co-author(s) from '" + "+ ' <h3>co-author(s)</h3> from '"
+ "+ ' <span class=\"sparkline_range\">" + "+ ' <span class=\"sparkline_range\">"
+ "" + minPubYearConsidered + " to " + currentYear + "" + "" + minPubYearConsidered + " to " + currentYear + ""
+ "</span> '" + "</span> '"

View file

@ -80,20 +80,100 @@ public class CoPIGrantCountQueryRunner implements QueryRunner<CoPIData> {
+ " (str(?GrantEndDate) as ?" + QueryFieldLabels.GRANT_END_DATE + ") " + " (str(?GrantEndDate) as ?" + QueryFieldLabels.GRANT_END_DATE + ") "
+ " (str(?CoPI) as ?" + QueryFieldLabels.CO_PI_URL + ") " + " (str(?CoPI) as ?" + QueryFieldLabels.CO_PI_URL + ") "
+ " (str(?CoPILabel) as ?" + QueryFieldLabels.CO_PI_LABEL + ") " + " (str(?CoPILabel) as ?" + QueryFieldLabels.CO_PI_LABEL + ") "
+ "WHERE { " + "WHERE "
+ "<" + queryURI + "> rdfs:label ?PILabel ;" + "{ "
+ " core:hasCo-PrincipalInvestigatorRole ?Role . " + "<" + queryURI + "> rdfs:label ?PILabel . "
+ "?Role core:roleIn ?Grant . " + "{ "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:startDate ?GrantStartDate ; " + "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?Role . "
+ "core:endDate ?GrantEndDate ;"
+ "core:relatedRole ?RelatedRole . " + "?Role core:roleIn ?Grant . "
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . " + "?Grant rdfs:label ?GrantLabel ; "
+ " }";
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:principalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasPrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:principalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasPrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "} ";
log.debug("COPI QUERY - " + sparqlQuery); log.debug("COPI QUERY - " + sparqlQuery);
//System.out.println("\n\nCOPI QUERY - " + sparqlQuery + "\n\n");
return sparqlQuery; return sparqlQuery;
} }

View file

@ -223,7 +223,7 @@ public class CoPIVisCodeGenerator {
VOConstants.DEFAULT_GRANT_YEAR).size(); VOConstants.DEFAULT_GRANT_YEAR).size();
} }
String sparklineDisplayOptions = "{width: 65, height: 30, showAxisLines: false, " String sparklineDisplayOptions = "{width: 150, height: 30, showAxisLines: false, "
+ "showValueLabels: false, labelPosition: 'none'}"; + "showValueLabels: false, labelPosition: 'none'}";
if (providedVisContainerID != null) { if (providedVisContainerID != null) {
@ -391,7 +391,7 @@ public class CoPIVisCodeGenerator {
+ unknownYearGrants) + "');"); + unknownYearGrants) + "');");
visualizationCode.append("var allSparksText = ''" visualizationCode.append("var allSparksText = ''"
+ "+ ' Co-Principal Investigator(s) '" + "+ ' <h3>Co-Principal Investigator(s)</h3> '"
+ "+ ' from " + "+ ' from "
+ "<span class=\"sparkline_range\">" + "<span class=\"sparkline_range\">"
+ "" + minGrantYearConsidered + " to " + currentYear + "" + "" + minGrantYearConsidered + " to " + currentYear + ""

View file

@ -80,22 +80,103 @@ public class CoPIGrantCountQueryRunner implements QueryRunner<CoPIData> {
+ " (str(?GrantEndDate) as ?" + QueryFieldLabels.GRANT_END_DATE + ") " + " (str(?GrantEndDate) as ?" + QueryFieldLabels.GRANT_END_DATE + ") "
+ " (str(?CoPI) as ?" + QueryFieldLabels.CO_PI_URL + ") " + " (str(?CoPI) as ?" + QueryFieldLabels.CO_PI_URL + ") "
+ " (str(?CoPILabel) as ?" + QueryFieldLabels.CO_PI_LABEL + ") " + " (str(?CoPILabel) as ?" + QueryFieldLabels.CO_PI_LABEL + ") "
+ "WHERE { " + "WHERE "
+ "<" + queryURI + "> rdfs:label ?PILabel ;" + "{ "
+ " core:hasCo-PrincipalInvestigatorRole ?Role . " + "<" + queryURI + "> rdfs:label ?PILabel . "
+ "?Role core:roleIn ?Grant . " + "{ "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:startDate ?GrantStartDate ; " + "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?Role . "
+ "core:endDate ?GrantEndDate ;"
+ "core:relatedRole ?RelatedRole . " + "?Role core:roleIn ?Grant . "
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . " + "?Grant rdfs:label ?GrantLabel ; "
+ " }";
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:principalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasPrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:principalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasPrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel ; "
+ "core:relatedRole ?RelatedRole . "
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
+ "?CoPI rdfs:label ?CoPILabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "} ";
log.debug("COPI QUERY - " + sparqlQuery); log.debug("COPI QUERY - " + sparqlQuery);
//System.out.println("\n\nCOPI QUERY - " + sparqlQuery + "\n\n");
return sparqlQuery; return sparqlQuery;
} }
private ResultSet executeQuery(String queryText, DataSource dataSource) { private ResultSet executeQuery(String queryText, DataSource dataSource) {

View file

@ -120,16 +120,49 @@ public class PersonGrantCountQueryRunner implements QueryRunner<Set<Grant>>{
private String getSparqlQuery(String queryURI){ private String getSparqlQuery(String queryURI){
String sparqlQuery = QueryConstants.getSparqlPrefixQuery() String sparqlQuery = QueryConstants.getSparqlPrefixQuery()
+ SPARQL_QUERY_COMMON_SELECT_CLAUSE + SPARQL_QUERY_COMMON_SELECT_CLAUSE
+ "(str(<" + queryURI + ">) as ?PILit) " + "(str(<" + queryURI + ">) as ?PILit) "
+ "WHERE {"
+ "<" + queryURI + "> rdfs:label ?PILabel;" + "WHERE "
+ "core:hasCo-PrincipalInvestigatorRole ?Role ." + "{ "
+ "?Role core:roleIn ?Grant ." + "<" + queryURI + "> rdfs:label ?PILabel . "
+ "?Grant rdfs:label ?GrantLabel ; core:startDate ?GrantStartDate ; core:endDate ?GrantEndDate ." + "{ "
+ "}";
+ "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasPrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "} ";
log.debug("SPARQL query for person grant count -> \n"+ sparqlQuery); log.debug("SPARQL query for person grant count -> \n"+ sparqlQuery);
return sparqlQuery; return sparqlQuery;
} }

View file

@ -119,16 +119,49 @@ public class PersonGrantCountQueryRunner implements QueryRunner<Set<Grant>>{
private String getSparqlQuery(String queryURI){ private String getSparqlQuery(String queryURI){
String sparqlQuery = QueryConstants.getSparqlPrefixQuery() String sparqlQuery = QueryConstants.getSparqlPrefixQuery()
+ SPARQL_QUERY_COMMON_SELECT_CLAUSE + SPARQL_QUERY_COMMON_SELECT_CLAUSE
+ "(str(<" + queryURI + ">) as ?PILit) " + "(str(<" + queryURI + ">) as ?PILit) "
+ "WHERE {"
+ "<" + queryURI + "> rdfs:label ?PILabel;" + "WHERE "
+ "core:hasCo-PrincipalInvestigatorRole ?Role ." + "{ "
+ "?Role core:roleIn ?Grant ." + "<" + queryURI + "> rdfs:label ?PILabel . "
+ "?Grant rdfs:label ?GrantLabel ; core:startDate ?GrantStartDate ; core:endDate ?GrantEndDate ." + "{ "
+ "}";
+ "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "UNION "
+ "{ "
+ "<" + queryURI + "> core:hasPrincipalInvestigatorRole ?Role . "
+ "?Role core:roleIn ?Grant . "
+ "?Grant rdfs:label ?GrantLabel . "
+ "OPTIONAL { ?Grant core:startDate ?GrantStartDate } . "
+ "OPTIONAL { ?Grant core:endDate ?GrantEndDate } . "
+ "} "
+ "} ";
log.debug("SPARQL query for person grant count -> \n"+ sparqlQuery); log.debug("SPARQL query for person grant count -> \n"+ sparqlQuery);
return sparqlQuery; return sparqlQuery;
} }

View file

@ -225,7 +225,7 @@ public class PersonGrantCountVisCodeGenerator {
.get(VOConstants.DEFAULT_GRANT_YEAR); .get(VOConstants.DEFAULT_GRANT_YEAR);
} }
String sparklineDisplayOptions = "{width: 65, height: 30, showAxisLines: false, " String sparklineDisplayOptions = "{width: 150, height: 30, showAxisLines: false, "
+ "showValueLabels: false, labelPosition: 'none'}"; + "showValueLabels: false, labelPosition: 'none'}";
if (providedVisContainerID != null) { if (providedVisContainerID != null) {
@ -391,7 +391,7 @@ public class PersonGrantCountVisCodeGenerator {
+ unknownYearGrants) + "');"); + unknownYearGrants) + "');");
visualizationCode.append("var allSparksText = ''" visualizationCode.append("var allSparksText = ''"
+ "+ ' grant(s) '" + "+ ' <h3>grant(s)</h3> '"
+ "+ ' from " + "+ ' from "
+ "<span class=\"sparkline_range\">" + "<span class=\"sparkline_range\">"
+ "" + minGrantYearConsidered + " to " + currentYear + "" + "" + minGrantYearConsidered + " to " + currentYear + ""

View file

@ -240,7 +240,7 @@ public class PersonPublicationCountVisCodeGenerator {
.get(VOConstants.DEFAULT_PUBLICATION_YEAR); .get(VOConstants.DEFAULT_PUBLICATION_YEAR);
} }
String sparklineDisplayOptions = "{width: 65, height: 30, showAxisLines: false, " String sparklineDisplayOptions = "{width: 150, height: 30, showAxisLines: false, "
+ "showValueLabels: false, labelPosition: 'none'}"; + "showValueLabels: false, labelPosition: 'none'}";
if (providedVisContainerID != null) { if (providedVisContainerID != null) {
@ -410,7 +410,7 @@ public class PersonPublicationCountVisCodeGenerator {
+ unknownYearPublications) + "');"); + unknownYearPublications) + "');");
visualizationCode.append("var allSparksText = ''" visualizationCode.append("var allSparksText = ''"
+ "+ ' publication(s) '" + "+ ' <h3>publication(s)</h3> '"
+ "+ ' from " + "+ ' from "
+ "<span class=\"sparkline_range\">" + "<span class=\"sparkline_range\">"
+ "" + minPubYearConsidered + " to " + currentYear + "" + "" + minPubYearConsidered + " to " + currentYear + ""

View file

@ -21,10 +21,19 @@
padding-left: 16px; padding-left: 16px;
height: 840px; height: 840px;
} }
#dataPanel {
margin-top: 50px;
width: 25%;
background-color: #f7f9f9;
/* height: 80%; */
padding-left: 10px;
padding-bottom: 30px;
}
#dataPanel div { #dataPanel div {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-size: 11px; font-size: 11px;
color: #000;
} }
#dataPanel .italicize { #dataPanel .italicize {
font-style: italic; font-style: italic;
@ -42,5 +51,32 @@
/* container override from liquid.css */ /* container override from liquid.css */
.container { .container {
width: inherit; width: inherit;
} }
#incomplete-data{
width: 75%;
margin : auto;
line-height: 150%;
color: #595b5b;
}
.fileDownloadPlaceHolder{
margin-left: 20px;
}
#profileTitle{
padding: 10px;
padding-left: 5%;
background-color: #2A2A2A;
color: white;
width: 50%;
margin-left: -10px;
margin-top: -10px;
}
#table_heading{
margin-bottom:20px;
width: 80%;
}

View file

@ -14,15 +14,18 @@ a.no_href_styles {
padding-left:10px; padding-left:10px;
padding-top:10px; padding-top:10px;
background: #fff; background: #fff;
margin-left: 35%;
clear: right;
} }
.vis-tables { .vis-tables {
width: 33%; /* width: 33%; */
padding: 5px; padding: 10px;
margin: 5px; margin: 10px;
background-color: #FFF; background-color: #FFF;
border: 1px solid #ddebf1; border: 1px solid #ddebf1;
float: left; float:left;
font-size: 0.8em;
} }
p.datatable { p.datatable {
@ -95,6 +98,21 @@ p.datatable {
color: #121b3c; color: #121b3c;
padding-top: 10px; padding-top: 10px;
margin-bottom: 0.3em; margin-bottom: 0.3em;
float:left;
}
.toggle_visualization{
/*
margin-bottom: 0.3em;
clear:left;
float:right;
width: 150px;
*/
text-align: left;
margin-left: 78%;
margin-top: -8%;
max-width: 250px;
} }
.sub_headings a { .sub_headings a {
@ -136,4 +154,4 @@ table.sparkline_wrapper_table td, th {
#coauthorships_table th { #coauthorships_table th {
vertical-align: top; vertical-align: top;
} }