not custom list view for researchAreaOf

This commit is contained in:
tworrall 2013-02-19 12:24:34 -05:00
parent a3fec9f3d2
commit f31f527869
3 changed files with 140 additions and 0 deletions

View file

@ -128,6 +128,10 @@
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasInvestigatorRole.xml</display:listViewConfigFile>
</rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#researchAreaOf">
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-researchAreaOf.xml</display:listViewConfigFile>
</rdf:Description>
<!--
******************************************************************
end roles (from person) config

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- VIVO-specific default list view config file for object properties
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
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
</query-select>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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
}
}
</query-construct>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
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
}
}
</query-construct>
<template>propStatement-researchAreaOf.ftl</template>
</list-view-config>

View file

@ -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>
<a href="${profileUrl(statement.uri("person"))}" title="person name">${statement.personName}</a>
</#local>
<#if statement.title?has_content >
<#local posnTitle = statement.title>
<#else>
<#local posnTitle = statement.posnLabel!statement.personType>
</#if>
<@s.join [ linkedIndividual, posnTitle, statement.orgLabel!"" ] /> ${statement.type!}
</#macro>