From f5a8c5a7e6c49b175b8074b0ef601af5063a4ee5 Mon Sep 17 00:00:00 2001 From: tworrall Date: Thu, 19 Dec 2013 10:05:31 -0500 Subject: [PATCH] data getter sparql queries in the n3 files were using a technique that apparently is no longer supported; updated those and corresponding templates. --- .../individual-affiliated-dept-details.ftl | 50 +++++++-------- ...individual-affiliated-res-area-details.ftl | 64 +++++++++---------- .../individual-dept-res-area-details.ftl | 48 +++++++------- .../everytime/vivoConceptDataGetters.n3 | 6 +- .../everytime/vivoOrganizationDataGetters.n3 | 6 +- 5 files changed, 88 insertions(+), 86 deletions(-) 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 index 3cb68d26..cff1400b 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-affiliated-dept-details.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-affiliated-dept-details.ftl @@ -1,25 +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> - -
- -
- - -
- - +<#-- $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['ra']}" /> +
+

${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 f3c6e1d9..3f9771a3 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 @@ -1,32 +1,32 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#if affiliatedResearchAreas?has_content> -
- <#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'],deptLink)}" /> - <#else> - <#assign i18TextString1 = "${i18n().individuals_with_researh_area_two(firstRow['orgLabel'],deptLink)}" /> - -
-

${firstRow["raLabel"]}

-

${i18TextString1} ${i18n().view_all_individuals_in_area}

-
- <#break> - -
- -
- - -
- - +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#if affiliatedResearchAreas?has_content> +
+ <#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'],deptLink)}" /> + <#else> + <#assign i18TextString1 = "${i18n().individuals_with_researh_area_two(firstRow['orgLabel'],deptLink)}" /> + +
+

${firstRow["raLabel"]}

+

${i18TextString1} ${i18n().view_all_individuals_in_area}

+
+ <#break> + +
+ +
+ + +
+ + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-dept-res-area-details.ftl b/productMods/templates/freemarker/body/partials/individual/individual-dept-res-area-details.ftl index 6310f571..7e4b60d6 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-dept-res-area-details.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-dept-res-area-details.ftl @@ -1,24 +1,24 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#if deptResearchAreas?has_content> -
- <#list deptResearchAreas as firstRow> -
-

${firstRow["raLabel"]}

-

${i18n().faculty_with_researh_area(firstRow["deptLabel"])} ${i18n().view_all_faculty_in_area}

-
- <#break> - - -
- - -
- - -
+<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#if deptResearchAreas?has_content> +
+ <#list deptResearchAreas as firstRow> +
+

${firstRow["raLabel"]}

+

${i18n().faculty_with_researh_area(firstRow["orgLabel"])} ${i18n().view_all_faculty_in_area}

+
+ <#break> + + +
+ + +
+ + +
diff --git a/rdf/display/everytime/vivoConceptDataGetters.n3 b/rdf/display/everytime/vivoConceptDataGetters.n3 index 9f004fa0..367cc672 100644 --- a/rdf/display/everytime/vivoConceptDataGetters.n3 +++ b/rdf/display/everytime/vivoConceptDataGetters.n3 @@ -65,8 +65,8 @@ display:getDepartmentDataGetter ?person (Str(?researchAreaLabel) AS ?raLabel) (str(?departmentLabel) AS ?orgLabel) - ?raURI - ?orgURI + ?ra + ?org WHERE { ?orgURI vivo:relatedBy ?posn . ?posn a vivo:Position . @@ -76,6 +76,8 @@ display:getDepartmentDataGetter ?person rdfs:label ?prsnLabel . ?person vivo:hasResearchArea ?raURI . ?raURI rdfs:label ?researchAreaLabel + BIND(?raURI AS ?ra) + BIND(?orgURI AS ?org) } ORDER BY ?personLabel diff --git a/rdf/display/everytime/vivoOrganizationDataGetters.n3 b/rdf/display/everytime/vivoOrganizationDataGetters.n3 index 89466c5d..581c8fb7 100644 --- a/rdf/display/everytime/vivoOrganizationDataGetters.n3 +++ b/rdf/display/everytime/vivoOrganizationDataGetters.n3 @@ -107,9 +107,8 @@ display:getResearchAreaDataGetter SELECT DISTINCT (str (?prsnLabel) AS ?personLabel) ?person (Str(?researchAreaLabel) AS ?raLabel) - (str(?departmentLabel) AS ?orgLabel) - ?raURI - ?orgURI + (str(?organizationLabel) AS ?orgLabel) + ?ra WHERE { ?orgURI vivo:relatedBy ?posn . ?posn a vivo:Position . @@ -119,6 +118,7 @@ display:getResearchAreaDataGetter ?person rdfs:label ?prsnLabel . ?person vivo:hasResearchArea ?raURI . ?raURI rdfs:label ?researchAreaLabel + BIND(?raURI AS ?ra) } ORDER BY ?personLabel