NIHVIVO-1339 In relatedRole view, display role type label if role has no label (for investigator roles and children).
NIHVIVO-1334 Remove terms from SELECT clause that don't get displayed (e.g., dateTimeInterval) but are used to get other terms.
This commit is contained in:
parent
3aaed96705
commit
7edc978038
6 changed files with 18 additions and 18 deletions
|
@ -10,12 +10,12 @@
|
|||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName)
|
||||
?specificRole ?activity ?activityName ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
?roleLabel ?activity ?activityName ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?role }
|
||||
OPTIONAL { GRAPH ?g2 { ?role core:roleIn ?activity }
|
||||
GRAPH ?g3 { ?activity rdfs:label ?activityName }
|
||||
}
|
||||
OPTIONAL { GRAPH ?g4 { ?role rdfs:label ?specificRole } }
|
||||
OPTIONAL { GRAPH ?g4 { ?role rdfs:label ?roleLabel } }
|
||||
OPTIONAL { GRAPH ?g5 { ?role core:dateTimeInterval ?dateTimeInterval }
|
||||
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart }
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?subclass ?position (afn:localname(?position) AS ?positionName)
|
||||
?positionTitle ?person ?personName ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
?positionTitle ?person ?personName ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?position }
|
||||
OPTIONAL { GRAPH ?g2 { ?position core:positionForPerson ?person }
|
||||
GRAPH ?g3 { ?person rdfs:label ?personName }
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?position (afn:localname(?position) AS ?positionName)
|
||||
?positionTitle ?org ?orgName ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
?positionTitle ?org ?orgName ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?position }
|
||||
OPTIONAL { GRAPH ?g2 { ?position core:positionInOrganization ?org }
|
||||
GRAPH ?g3 { ?org rdfs:label ?orgName }
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT ?subclass ?role (afn:localname(?role) AS ?roleName)
|
||||
?specificRole ?indivInRole ?indivName ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName)
|
||||
?roleLabel ?roleTypeLabel ?indivInRole ?indivName ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
||||
GRAPH ?g1 { ?subject ?property ?role }
|
||||
OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf }
|
||||
GRAPH ?g3 { ?role ?roleProp ?indivInRole }
|
||||
|
@ -18,21 +18,19 @@
|
|||
?g3 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
||||
GRAPH ?g4 { ?indivInRole rdfs:label ?indivName }
|
||||
}
|
||||
OPTIONAL { GRAPH ?g5 { ?subclass rdfs:subClassOf core:Role }
|
||||
GRAPH ?g6 { ?role a ?subclass }
|
||||
FILTER (?g6 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
|
||||
?g6 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
||||
OPTIONAL { GRAPH ?g7 { ?role rdfs:label ?roleLabel } }
|
||||
OPTIONAL { GRAPH ?g8 { ?role a ?roleType }
|
||||
GRAPH ?g9 { ?roleType rdfs:label ?roleTypeLabel }
|
||||
}
|
||||
OPTIONAL { GRAPH ?g7 { ?role rdfs:label ?specificRole } }
|
||||
OPTIONAL { GRAPH ?g8 { ?role core:dateTimeInterval ?dateTimeInterval }
|
||||
OPTIONAL { GRAPH ?g9 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
OPTIONAL { GRAPH ?g9 { ?role core:dateTimeInterval ?dateTimeInterval }
|
||||
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart }
|
||||
}
|
||||
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
||||
}
|
||||
}
|
||||
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?indivName
|
||||
} ORDER BY ?indivName ?roleLabel ?roleTypeLabel
|
||||
</query>
|
||||
|
||||
<template>propStatement-relatedRole.ftl</template>
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
</#if>
|
||||
</#local>
|
||||
|
||||
${linkedIndividual} ${statement.specificRole!} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
${linkedIndividual} ${statement.roleLabel!} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
|
||||
</#macro>
|
|
@ -20,6 +20,8 @@
|
|||
</#if>
|
||||
</#local>
|
||||
|
||||
${linkedIndividual} ${statement.specificRole!} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
<#-- Generally roles are assigned a label when entered through a custom form. Investigator and its subclasses do not,
|
||||
so use the type label instead. -->
|
||||
${linkedIndividual} ${statement.roleLabel!statement.roleTypeLabel!} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
|
||||
</#macro>
|
Loading…
Add table
Reference in a new issue