NIHVIVO-1246: hasInvestigatorRole and subclasses now have own list view showing either grantAwardedBy or administeredBy
This commit is contained in:
parent
589112da0d
commit
230fb27df4
3 changed files with 202 additions and 23 deletions
|
@ -46,31 +46,26 @@
|
|||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#awardOrHonor">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-awardOrHonor.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#advisorIn">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-advisorIn.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
<!--
|
||||
******************************************************************
|
||||
all roles use same config...is there a better way to specify this?
|
||||
** core:hasAttendeeRole
|
||||
** core:hasClinicalRole
|
||||
** core:hasLeaderRole
|
||||
** core:hasMemberRole
|
||||
** core:hasOutreachProviderRole
|
||||
** core:hasServiceProviderRole
|
||||
** core:hasResearcherRole
|
||||
** core:hasTeacherRole
|
||||
** core:hasOrganizerRole
|
||||
these three are an exception, and share a separate config
|
||||
** core:hasInvestigatorRole
|
||||
** core:hasCo-PrincipalInvestigatorRole
|
||||
** core:hasPrincipalInvestigatorRole
|
||||
** core:hasTeacherRole
|
||||
** core:hasOrganizerRole
|
||||
******************************************************************
|
||||
-->
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasAttendeeRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasClinicalRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
@ -94,19 +89,7 @@
|
|||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasResearcherRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasInvestigatorRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasCo-PrincipalInvestigatorRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasTeacherRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
@ -124,12 +107,24 @@
|
|||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasReviewerRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasEditReviewRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasPresenterRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasPresenterRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<!-- The next three roles use a different config -->
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#hasInvestigatorRole">
|
||||
<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#hasCo-PrincipalInvestigatorRole">
|
||||
<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#hasPrincipalInvestigatorRole">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasInvestigatorRole.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<!--
|
||||
******************************************************************
|
||||
end roles (from person) config
|
||||
|
|
145
productMods/config/listViewConfig-hasInvestigatorRole.xml
Normal file
145
productMods/config/listViewConfig-hasInvestigatorRole.xml
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
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#>
|
||||
|
||||
SELECT DISTINCT <collated>?subclass</collated>
|
||||
?role
|
||||
?activity ?activityName
|
||||
?activityLabel
|
||||
?awardedBy
|
||||
?adminedBy
|
||||
?awardedByLabel
|
||||
?adminedByLabel
|
||||
?dateTimeStart ?dateTimeEnd WHERE {
|
||||
|
||||
?subject ?property ?role
|
||||
|
||||
OPTIONAL { ?role core:roleIn ?activity
|
||||
LET (?activityName := afn:localname(?activity))
|
||||
OPTIONAL { ?activity rdfs:label ?activityLabel }
|
||||
|
||||
<collated>
|
||||
?activity vitro:mostSpecificType ?subclass
|
||||
</collated>
|
||||
}
|
||||
OPTIONAL { ?activity core:grantAwardedBy ?awardedBy .
|
||||
?awardedBy rdfs:label ?awardedByLabel
|
||||
}
|
||||
OPTIONAL { ?activity core:administeredBy ?adminedBy .
|
||||
?adminedBy rdfs:label ?adminedByLabel
|
||||
}
|
||||
|
||||
OPTIONAL { ?role rdfs:label ?roleLabel }
|
||||
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
|
||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
}
|
||||
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
}
|
||||
}
|
||||
<critical-data-required>
|
||||
FILTER ( bound(?activity) )
|
||||
</critical-data-required>
|
||||
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
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#>
|
||||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?role .
|
||||
?role core:roleIn ?activity .
|
||||
?activity vitro:mostSpecificType ?subclass .
|
||||
} WHERE {
|
||||
?subject ?property ?role .
|
||||
?role core:roleIn ?activity .
|
||||
?activity vitro:mostSpecificType ?subclass
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?role .
|
||||
?role ?roleProperty ?roleValue .
|
||||
?activity rdfs:label ?activityName .
|
||||
?activity core:grantAwardedBy ?awardedBy .
|
||||
?awardedBy rdfs:label ?awardedByLabel .
|
||||
?activity core:administeredBy ?adminedBy .
|
||||
?adminedBy rdfs:label ?adminedByLabel
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?role
|
||||
} UNION {
|
||||
?subject ?property ?role .
|
||||
?role ?roleProperty ?roleValue
|
||||
} UNION {
|
||||
?subject ?property ?role .
|
||||
?role core:roleIn ?activity .
|
||||
?activity rdfs:label ?activityName
|
||||
} UNION {
|
||||
?subject ?property ?role .
|
||||
?role core:roleIn ?activity .
|
||||
?activity core:grantAwardedBy ?awardedBy
|
||||
} UNION {
|
||||
?subject ?property ?role .
|
||||
?role core:roleIn ?activity .
|
||||
?activity core:grantAwardedBy ?awardedBy .
|
||||
?awardedBy rdfs:label ?awardedByLabel
|
||||
} UNION {
|
||||
?subject ?property ?role .
|
||||
?role core:roleIn ?activity .
|
||||
?activity core:administeredBy ?adminedBy
|
||||
} UNION {
|
||||
?subject ?property ?role .
|
||||
?role core:roleIn ?activity .
|
||||
?activity core:administeredBy ?adminedBy .
|
||||
?adminedBy rdfs:label ?adminedByLabel
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?role .
|
||||
?role core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
} WHERE {
|
||||
?subject ?property ?role .
|
||||
?role core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?role .
|
||||
?role core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
} WHERE {
|
||||
?subject ?property ?role .
|
||||
?role core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-hasInvestigatorRole.ftl</template>
|
||||
</list-view-config>
|
|
@ -0,0 +1,39 @@
|
|||
<#-- $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#hasRole and its child properties.
|
||||
|
||||
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-datetime.ftl" as dt>
|
||||
|
||||
<@showRole statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showRole statement>
|
||||
<#local linkedIndividual>
|
||||
<#if statement.activity??>
|
||||
<a href="${profileUrl(statement.activity)}">${statement.activityLabel!statement.activityName}</a>
|
||||
<#else>
|
||||
<#-- This shouldn't happen, but we must provide for it -->
|
||||
<a href="${profileUrl(statement.role)}">missing activity</a>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local awardOrAdminBy>
|
||||
<#if statement.awardedByLabel??>
|
||||
awarded by <a href="${profileUrl(statement.awardedBy)}">${statement.awardedByLabel!}</a>
|
||||
<#elseif statement.adminedByLabel??>
|
||||
administered by <a href="${profileUrl(statement.adminedBy)}">${statement.adminedByLabel!}</a>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTime>
|
||||
<@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
</#local>
|
||||
|
||||
${linkedIndividual} ${awardOrAdminBy} ${dateTime!}
|
||||
|
||||
</#macro>
|
Loading…
Add table
Reference in a new issue