diff --git a/productMods/templates/freemarker/body/individual/individual--skos-concept.ftl b/productMods/templates/freemarker/body/individual/individual--skos-concept.ftl new file mode 100644 index 00000000..628b1780 --- /dev/null +++ b/productMods/templates/freemarker/body/individual/individual--skos-concept.ftl @@ -0,0 +1,12 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Individual profile page template for skos:Concept individuals (extends individual.ftl in vivo)--> + +<#-- Do not show the link for temporal visualization unless it's enabled --> + +<#assign affiliatedResearchAreas> + <#include "individual-affiliated-departments.ftl"> + + +<#include "individual.ftl"> + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-affiliated-departments.ftl b/productMods/templates/freemarker/body/partials/individual/individual-affiliated-departments.ftl new file mode 100644 index 00000000..59a6f9b8 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-affiliated-departments.ftl @@ -0,0 +1,35 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#if departmentsResults?has_content> + <#-- is strictly a usability issue so we can refer accurately to "faculty members" within the dept. --> + <#assign urlForDetailsPage = "affiliatedDepartments" /> + <#assign headingText = "${i18n().affiliated_departments}" /> +

+ ${headingText} +

+ + + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-affiliated-dept-details.ftl b/productMods/templates/freemarker/body/partials/individual/individual-affiliated-dept-details.ftl new file mode 100644 index 00000000..3cb68d26 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-affiliated-dept-details.ftl @@ -0,0 +1,25 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#if deptResearchAreas?has_content> +
+ <#list deptResearchAreas as firstRow> + <#assign raLink = "${urls.base}/individual?uri=${firstRow['raURI']}" /> +
+

${firstRow["orgLabel"]}

+

${i18n().individuals_with_dept(firstRow['raLabel'],raLink)} ${i18n().view_all_individuals_in_dept}

+
+ <#break> + +
+ +
+ + +
+ + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-affiliated-res-area-details.ftl b/productMods/templates/freemarker/body/partials/individual/individual-affiliated-res-area-details.ftl index bf62c621..f3c6e1d9 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-affiliated-res-area-details.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-affiliated-res-area-details.ftl @@ -3,11 +3,12 @@
<#list affiliatedResearchAreas as firstRow> <#assign firstOrgLabel = firstRow["orgLabel"]?upper_case /> + <#assign deptLink = "${urls.base}/individual?uri=${firstRow['orgURI']}" /> <#assign i18TextString1 = "" /> <#if ( firstOrgLabel?index_of("THE") == 0 ) > - <#assign i18TextString1 = "${i18n().individuals_with_researh_area_one(firstRow['orgLabel'])}" /> + <#assign i18TextString1 = "${i18n().individuals_with_researh_area_one(firstRow['orgLabel'],deptLink)}" /> <#else> - <#assign i18TextString1 = "${i18n().individuals_with_researh_area_two(firstRow['orgLabel'])}" /> + <#assign i18TextString1 = "${i18n().individuals_with_researh_area_two(firstRow['orgLabel'],deptLink)}" />

${firstRow["raLabel"]}

diff --git a/rdf/display/everytime/vivoConceptDataGetters.n3 b/rdf/display/everytime/vivoConceptDataGetters.n3 new file mode 100644 index 00000000..47157443 --- /dev/null +++ b/rdf/display/everytime/vivoConceptDataGetters.n3 @@ -0,0 +1,82 @@ +# $This file is distributed under the terms of the license in /doc/license.txt$ + +@prefix owl: . +@prefix display: . +@prefix rdf: . +@prefix rdfs: . +@prefix core: . +@prefix vivoweb: . +@prefix afn: . + + +#### n3 for research areas #### + +## associate the classes with the datagetter ## + + display:hasDataGetter display:getDepartmentDataGetter . + +## define the datagetter ## + +display:getDepartmentDataGetter + a ; + display:saveToVar "departmentsResults"; + display:query + """ + PREFIX rdfs: + PREFIX vivo: + PREFIX afn: + SELECT DISTINCT (str(?departmentLabel) AS ?deptLabel) ?dept + WHERE { + ?individualURI vivo:researchAreaOf ?person . + ?person vivo:personInPosition ?posn . + ?posn vivo:positionInOrganization ?dept . + ?dept rdfs:label ?departmentLabel + OPTIONAL { ?posn vivo:dateTimeInterval ?dti + OPTIONAL { ?dti vivo:end ?end . + ?end vivo:dateTime ?endDate + } + } + FILTER ( !bound(?endDate) || + afn:substring(str(?endDate), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) + } + ORDER BY ?deptLabel + """ . + +## detail page for dept research areas ## + + + a ; + ; + "individual-affiliated-dept-details.ftl" ; + "Affiliated Departments" ; + "/affiliatedDepartments" . + + + a ; + + """ + PREFIX rdfs: + PREFIX vivo: + SELECT DISTINCT (str (?prsnLabel) AS ?personLabel) + ?person + (Str(?researchAreaLabel) AS ?raLabel) + (str(?departmentLabel) AS ?orgLabel) + ?raURI + ?orgURI + WHERE { + ?orgURI vivo:organizationForPosition ?posn . + ?orgURI rdfs:label ?orgLabel . + ?posn vivo:positionForPerson ?person . + ?person rdfs:label ?prsnLabel . + ?person vivo:hasResearchArea ?raURI . + ?raURI rdfs:label ?researchAreaLabel + + } + ORDER BY ?personLabel + """ ; + + "deptResearchAreas" . + + + + diff --git a/rdf/display/everytime/vivoOrganizationDataGetters.n3 b/rdf/display/everytime/vivoOrganizationDataGetters.n3 index b1ece312..7e3c301f 100644 --- a/rdf/display/everytime/vivoOrganizationDataGetters.n3 +++ b/rdf/display/everytime/vivoOrganizationDataGetters.n3 @@ -69,6 +69,7 @@ display:getResearchAreaDataGetter (str(?researchAreaLabel) AS ?raLabel) (str(?organizationLabel) AS ?orgLabel) ?raURI + ?orgURI WHERE { ?orgURI vivo:organizationForPosition ?posn . ?orgURI rdfs:label ?organizationLabel . @@ -101,6 +102,7 @@ display:getResearchAreaDataGetter (Str(?researchAreaLabel) AS ?raLabel) (str(?departmentLabel) AS ?orgLabel) ?raURI + ?orgURI WHERE { ?orgURI vivo:organizationForPosition ?posn . ?orgURI rdfs:label ?orgLabel . diff --git a/rdf/tbox/firsttime/vivo-core-1.5-annotations.rdf b/rdf/tbox/firsttime/vivo-core-1.5-annotations.rdf index 88df4862..d203cf88 100644 --- a/rdf/tbox/firsttime/vivo-core-1.5-annotations.rdf +++ b/rdf/tbox/firsttime/vivo-core-1.5-annotations.rdf @@ -2953,6 +2953,7 @@ + individual--skos-concept.ftl -1 {0} who have an interest in this research area. +individuals_with_researh_area_two = Here are the individuals in the {0} who have an interest in this research area. +individuals_with_dept = Here are the individuals with an interest in {0} who are in this organization. faculty_with_researh_area = Here are the faculty members in the {0} department who have an interest in this research area. view_all_individuals_in_area = View all individuals with an interest in this area. +view_all_individuals_in_dept = View all individuals in this organization. view_all_faculty_in_area = View all faculty with an interest in this area. faculty_research_areas = Faculty Research Areas affiliated_research_areas = Affiliated Research Areas -research_area = research area +affiliated_departments = Associated Departments +research_area = individuals in the department with this research area +organization = individuals with the research area in this organization display_more = more display_less = less