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:
parent
42130a615a
commit
7dc4628302
11 changed files with 620 additions and 280 deletions
|
@ -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'}";
|
||||
|
||||
if (providedVisContainerID != null) {
|
||||
|
@ -397,7 +397,7 @@ public class CoAuthorshipVisCodeGenerator {
|
|||
+ unknownYearCoauthors) + "');");
|
||||
|
||||
visualizationCode.append("var allSparksText = ''"
|
||||
+ "+ ' co-author(s) from '"
|
||||
+ "+ ' <h3>co-author(s)</h3> from '"
|
||||
+ "+ ' <span class=\"sparkline_range\">"
|
||||
+ "" + minPubYearConsidered + " to " + currentYear + ""
|
||||
+ "</span> '"
|
||||
|
|
|
@ -80,20 +80,100 @@ public class CoPIGrantCountQueryRunner implements QueryRunner<CoPIData> {
|
|||
+ " (str(?GrantEndDate) as ?" + QueryFieldLabels.GRANT_END_DATE + ") "
|
||||
+ " (str(?CoPI) as ?" + QueryFieldLabels.CO_PI_URL + ") "
|
||||
+ " (str(?CoPILabel) as ?" + QueryFieldLabels.CO_PI_LABEL + ") "
|
||||
+ "WHERE { "
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel ;"
|
||||
+ " core:hasCo-PrincipalInvestigatorRole ?Role . "
|
||||
+ "?Role core:roleIn ?Grant . "
|
||||
+ "?Grant rdfs:label ?GrantLabel ; "
|
||||
+ "core:startDate ?GrantStartDate ; "
|
||||
+ "core:endDate ?GrantEndDate ;"
|
||||
+ "core:relatedRole ?RelatedRole . "
|
||||
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
|
||||
+ "?CoPI rdfs:label ?CoPILabel . "
|
||||
+ " }";
|
||||
+ "WHERE "
|
||||
+ "{ "
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel . "
|
||||
+ "{ "
|
||||
|
||||
+ "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?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: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);
|
||||
|
||||
//System.out.println("\n\nCOPI QUERY - " + sparqlQuery + "\n\n");
|
||||
|
||||
return sparqlQuery;
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ public class CoPIVisCodeGenerator {
|
|||
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'}";
|
||||
|
||||
if (providedVisContainerID != null) {
|
||||
|
@ -391,7 +391,7 @@ public class CoPIVisCodeGenerator {
|
|||
+ unknownYearGrants) + "');");
|
||||
|
||||
visualizationCode.append("var allSparksText = ''"
|
||||
+ "+ ' Co-Principal Investigator(s) '"
|
||||
+ "+ ' <h3>Co-Principal Investigator(s)</h3> '"
|
||||
+ "+ ' from "
|
||||
+ "<span class=\"sparkline_range\">"
|
||||
+ "" + minGrantYearConsidered + " to " + currentYear + ""
|
||||
|
|
|
@ -80,22 +80,103 @@ public class CoPIGrantCountQueryRunner implements QueryRunner<CoPIData> {
|
|||
+ " (str(?GrantEndDate) as ?" + QueryFieldLabels.GRANT_END_DATE + ") "
|
||||
+ " (str(?CoPI) as ?" + QueryFieldLabels.CO_PI_URL + ") "
|
||||
+ " (str(?CoPILabel) as ?" + QueryFieldLabels.CO_PI_LABEL + ") "
|
||||
+ "WHERE { "
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel ;"
|
||||
+ " core:hasCo-PrincipalInvestigatorRole ?Role . "
|
||||
+ "?Role core:roleIn ?Grant . "
|
||||
+ "?Grant rdfs:label ?GrantLabel ; "
|
||||
+ "core:startDate ?GrantStartDate ; "
|
||||
+ "core:endDate ?GrantEndDate ;"
|
||||
+ "core:relatedRole ?RelatedRole . "
|
||||
+ "?RelatedRole core:co-PrincipalInvestigatorRoleOf ?CoPI . "
|
||||
+ "?CoPI rdfs:label ?CoPILabel . "
|
||||
+ " }";
|
||||
+ "WHERE "
|
||||
+ "{ "
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel . "
|
||||
+ "{ "
|
||||
|
||||
+ "<" + queryURI + "> core:hasCo-PrincipalInvestigatorRole ?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: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);
|
||||
|
||||
//System.out.println("\n\nCOPI QUERY - " + sparqlQuery + "\n\n");
|
||||
|
||||
return sparqlQuery;
|
||||
}
|
||||
|
||||
|
||||
private ResultSet executeQuery(String queryText, DataSource dataSource) {
|
||||
|
||||
|
|
|
@ -120,16 +120,49 @@ public class PersonGrantCountQueryRunner implements QueryRunner<Set<Grant>>{
|
|||
private String getSparqlQuery(String queryURI){
|
||||
|
||||
String sparqlQuery = QueryConstants.getSparqlPrefixQuery()
|
||||
|
||||
+ SPARQL_QUERY_COMMON_SELECT_CLAUSE
|
||||
|
||||
+ "(str(<" + queryURI + ">) as ?PILit) "
|
||||
+ "WHERE {"
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel;"
|
||||
+ "core:hasCo-PrincipalInvestigatorRole ?Role ."
|
||||
+ "?Role core:roleIn ?Grant ."
|
||||
+ "?Grant rdfs:label ?GrantLabel ; core:startDate ?GrantStartDate ; core:endDate ?GrantEndDate ."
|
||||
+ "}";
|
||||
|
||||
+ "WHERE "
|
||||
+ "{ "
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel . "
|
||||
+ "{ "
|
||||
|
||||
+ "<" + 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);
|
||||
|
||||
return sparqlQuery;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,16 +119,49 @@ public class PersonGrantCountQueryRunner implements QueryRunner<Set<Grant>>{
|
|||
private String getSparqlQuery(String queryURI){
|
||||
|
||||
String sparqlQuery = QueryConstants.getSparqlPrefixQuery()
|
||||
|
||||
+ SPARQL_QUERY_COMMON_SELECT_CLAUSE
|
||||
|
||||
+ "(str(<" + queryURI + ">) as ?PILit) "
|
||||
+ "WHERE {"
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel;"
|
||||
+ "core:hasCo-PrincipalInvestigatorRole ?Role ."
|
||||
+ "?Role core:roleIn ?Grant ."
|
||||
+ "?Grant rdfs:label ?GrantLabel ; core:startDate ?GrantStartDate ; core:endDate ?GrantEndDate ."
|
||||
+ "}";
|
||||
|
||||
+ "WHERE "
|
||||
+ "{ "
|
||||
+ "<" + queryURI + "> rdfs:label ?PILabel . "
|
||||
+ "{ "
|
||||
|
||||
+ "<" + 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);
|
||||
|
||||
return sparqlQuery;
|
||||
}
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ public class PersonGrantCountVisCodeGenerator {
|
|||
.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'}";
|
||||
|
||||
if (providedVisContainerID != null) {
|
||||
|
@ -391,7 +391,7 @@ public class PersonGrantCountVisCodeGenerator {
|
|||
+ unknownYearGrants) + "');");
|
||||
|
||||
visualizationCode.append("var allSparksText = ''"
|
||||
+ "+ ' grant(s) '"
|
||||
+ "+ ' <h3>grant(s)</h3> '"
|
||||
+ "+ ' from "
|
||||
+ "<span class=\"sparkline_range\">"
|
||||
+ "" + minGrantYearConsidered + " to " + currentYear + ""
|
||||
|
|
|
@ -240,7 +240,7 @@ public class PersonPublicationCountVisCodeGenerator {
|
|||
.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'}";
|
||||
|
||||
if (providedVisContainerID != null) {
|
||||
|
@ -410,7 +410,7 @@ public class PersonPublicationCountVisCodeGenerator {
|
|||
+ unknownYearPublications) + "');");
|
||||
|
||||
visualizationCode.append("var allSparksText = ''"
|
||||
+ "+ ' publication(s) '"
|
||||
+ "+ ' <h3>publication(s)</h3> '"
|
||||
+ "+ ' from "
|
||||
+ "<span class=\"sparkline_range\">"
|
||||
+ "" + minPubYearConsidered + " to " + currentYear + ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue