From 19f1db691d8d5d1544516bc52df633a5be0fb969 Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Fri, 29 Aug 2014 12:27:06 -0400 Subject: [PATCH] VIVO-827: display the vocabulary source on a concept profile page --- .../freemarker/body/individual/individual.ftl | 1 + .../individual-vocabularyService.ftl | 26 +++++++++++++++++++ .../everytime/vivoConceptDataGetters.n3 | 15 +++++++++++ 3 files changed, 42 insertions(+) create mode 100644 productMods/templates/freemarker/body/partials/individual/individual-vocabularyService.ftl diff --git a/productMods/templates/freemarker/body/individual/individual.ftl b/productMods/templates/freemarker/body/individual/individual.ftl index 5914ca06..6089d97b 100644 --- a/productMods/templates/freemarker/body/individual/individual.ftl +++ b/productMods/templates/freemarker/body/individual/individual.ftl @@ -10,6 +10,7 @@ ${classSpecificExtension!} ${departmentalGrantsExtension!} + <#include "individual-vocabularyService.ftl"> <#include "individual-webpage.ftl"> <#include "individual-overview.ftl"> ${affiliatedResearchAreas!} diff --git a/productMods/templates/freemarker/body/partials/individual/individual-vocabularyService.ftl b/productMods/templates/freemarker/body/partials/individual/individual-vocabularyService.ftl new file mode 100644 index 00000000..5fff092e --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-vocabularyService.ftl @@ -0,0 +1,26 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + + +<#if vocabularyService?has_content> +

Vocabulary Service

+ + diff --git a/rdf/display/everytime/vivoConceptDataGetters.n3 b/rdf/display/everytime/vivoConceptDataGetters.n3 index 5afbcd82..41dbc7e7 100644 --- a/rdf/display/everytime/vivoConceptDataGetters.n3 +++ b/rdf/display/everytime/vivoConceptDataGetters.n3 @@ -14,6 +14,7 @@ ## associate the classes with the datagetter ## display:hasDataGetter display:getDepartmentDataGetter . + display:hasDataGetter display:getVocabServiceDataGetter . ## define the datagetter ## @@ -45,6 +46,20 @@ display:getDepartmentDataGetter ORDER BY ?deptLabel """ . + display:getVocabServiceDataGetter + a ; + display:saveToVar "vocabularyService"; + display:query + """ + PREFIX rdfs: + PREFIX vivo: + SELECT DISTINCT (str(?vocabularySourceName) AS ?vocabService) + WHERE { + ?individualURI rdfs:isDefinedBy ?vocabularySource . + ?vocabularySource rdfs:label ?vocabularySourceName . + } + """ . + ## detail page for dept research areas ##