From f31f527869180ebefa1513b3257a65a342c9341d Mon Sep 17 00:00:00 2001 From: tworrall Date: Tue, 19 Feb 2013 12:24:34 -0500 Subject: [PATCH] not custom list view for researchAreaOf --- .../loadedAtStartup/vivoListViewConfig.rdf | 4 + .../config/listViewConfig-researchAreaOf.xml | 110 ++++++++++++++++++ .../propStatement-researchAreaOf.ftl | 26 +++++ 3 files changed, 140 insertions(+) create mode 100644 productMods/config/listViewConfig-researchAreaOf.xml create mode 100644 productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl diff --git a/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf b/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf index e9d0ac85..6a134509 100644 --- a/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf +++ b/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf @@ -128,6 +128,10 @@ listViewConfig-hasInvestigatorRole.xml + + listViewConfig-researchAreaOf.xml + + + + + + + + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + + SELECT DISTINCT + ?person + ?personName + ?posnLabel + ?orgLabel + ?type + ?personType + ?title + WHERE { + ?subject ?property ?person . + ?person core:personInPosition ?position . + OPTIONAL { ?person rdfs:label ?personName } + OPTIONAL { ?person core:preferredTitle ?title } + OPTIONAL { ?person vitro:mostSpecificType ?personType . + ?personType rdfs:subClassOf foaf:Person + } + OPTIONAL { ?position rdfs:label ?posnLabel } + OPTIONAL { ?position core:positionInOrganization ?org . + ?org rdfs:label ?orgLabel + } + OPTIONAL { ?position core:hrJobTitle ?hrJobTitle } + OPTIONAL { ?position core:rank ?rank } + } + ORDER BY ?personName ?type + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + + CONSTRUCT { + ?subject ?property ?person . + ?person core:personInPosition ?position . + ?position rdfs:label ?positionLabel . + ?position core:positionInOrganization ?org . + ?org rdfs:label ?orgName . + ?position core:hrJobTitle ?hrJobTitle + } WHERE { + { + ?subject ?property ?person + } UNION { + ?subject ?property ?person . + ?person core:personInPosition ?position + } UNION { + ?subject ?property ?person . + ?person core:personInPosition ?position . + ?position rdfs:label ?positionLabel + } UNION { + ?subject ?property ?person . + ?person core:personInPosition ?position . + ?position core:positionInOrganization ?org + } UNION { + ?subject ?property ?person . + ?person core:personInPosition ?position . + ?position core:positionInOrganization ?org . + ?org rdfs:label ?orgName + } UNION { + ?subject ?property ?person . + ?person core:personInPosition ?position . + ?position core:hrJobTitle ?hrJobTitle + } + } + + + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + CONSTRUCT { + ?subject ?property ?person . + ?person rdfs:label ?label . + ?person core:preferredTitle ?title . + ?person vitro:mostSpecificType ?personType . + ?personType rdfs:subClassOf foaf:Person + } WHERE { + { + ?subject ?property ?person + } UNION { + ?subject ?property ?person . + ?person rdfs:label ?label + } UNION { + ?subject ?property ?person . + ?person core:preferredTitle ?title + } UNION { + ?subject ?property ?person . + ?person vitro:mostSpecificType ?personType . + ?personType rdfs:subClassOf foaf:Person + } + } + + + + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl new file mode 100644 index 00000000..a7ca7fa1 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl @@ -0,0 +1,26 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Custom object property statement view for http://vivoweb.org/ontology/core#organizationForPosition. + + This template must be self-contained and not rely on other variables set for the individual page, because it + is also used to generate the property statement during a deletion. + --> + +<#import "lib-sequence.ftl" as s> + +<@showResearchers statement /> + +<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the + next statement --> +<#macro showResearchers statement> + <#local linkedIndividual> + ${statement.personName} + + <#if statement.title?has_content > + <#local posnTitle = statement.title> + <#else> + <#local posnTitle = statement.posnLabel!statement.personType> + + + <@s.join [ linkedIndividual, posnTitle, statement.orgLabel!"" ] /> ${statement.type!} +