NIHVIVO-536: new list view for academic adivising (core:advisorIn)
This commit is contained in:
parent
1b48676585
commit
a7ed86bb10
5 changed files with 213 additions and 19 deletions
|
@ -46,6 +46,10 @@
|
|||
<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?
|
||||
|
|
172
productMods/config/listViewConfig-advisorIn.xml
Normal file
172
productMods/config/listViewConfig-advisorIn.xml
Normal file
|
@ -0,0 +1,172 @@
|
|||
<?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 foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
PREFIX bibo: <http://purl.org/ontology/bibo/>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
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>
|
||||
?advisory
|
||||
?advisoryLabel
|
||||
?localName
|
||||
?advisee
|
||||
?adviseeLabel
|
||||
?degreeLabel
|
||||
?degreeAbbr
|
||||
?dateTimeStart
|
||||
?dateTimeEnd
|
||||
|
||||
WHERE {
|
||||
?subject ?property ?advisory
|
||||
LET ( ?localName := afn:localname(?advisory) )
|
||||
OPTIONAL { ?advisory rdfs:label ?advisoryLabel }
|
||||
OPTIONAL { ?advisory core:advisee ?advisee
|
||||
OPTIONAL { ?advisee rdfs:label ?adviseeLabel }
|
||||
}
|
||||
OPTIONAL { ?advisory core:degreeCandidacy ?degree
|
||||
OPTIONAL { ?degree rdfs:label ?degreeLabel }
|
||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
||||
}
|
||||
<collated>
|
||||
OPTIONAL { ?subclass rdfs:subClassOf core:AdvisingRelationship .
|
||||
?advisory a ?subclass
|
||||
}
|
||||
</collated>
|
||||
OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval
|
||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
}
|
||||
}
|
||||
OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval
|
||||
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd)
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subclass rdfs:subClassOf core:AdvisingRelationship
|
||||
} WHERE {
|
||||
?subclass rdfs:subClassOf core:AdvisingRelationship
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?advisory .
|
||||
?advisory ?advisoryProperty ?advisoryValue .
|
||||
?advisory rdfs:label ?advisoryLabel
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?advisory
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory ?advisoryProperty ?advisoryValue
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory ?advisoryProperty ?advisoryValue .
|
||||
?advisory rdfs:label ?advisoryLabel
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX bibo: <http://purl.org/ontology/bibo/>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:advisee ?advisee .
|
||||
?advisee rdfs:label ?adviseeLabel .
|
||||
?advisory core:degreeCandidacy ?degree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?advisory
|
||||
} UNION {
|
||||
?subject ?property ?advisory.
|
||||
?advisory core:advisee ?advisee
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:advisee ?advisee .
|
||||
?advisee rdfs:label ?adviseeLabel
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:degreeCandidacy ?degree
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:degreeCandidacy ?degree .
|
||||
?degree rdfs:label ?degreeLabel
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:degreeCandidacy ?degree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?advisory .
|
||||
?advisory a ?subclass
|
||||
} WHERE {
|
||||
?subject ?property ?advisory .
|
||||
?subclass rdfs:subClassOf core:AdvisingRelationship .
|
||||
?advisory a ?subclass
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?award .
|
||||
?award core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
} WHERE {
|
||||
?subject ?property ?award .
|
||||
?award 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 ?award .
|
||||
?award core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
} WHERE {
|
||||
?subject ?property ?award .
|
||||
?award core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-advisorIn.ftl</template>
|
||||
</list-view-config>
|
|
@ -26,15 +26,8 @@
|
|||
?subject ?property ?award
|
||||
LET ( ?localName := afn:localname(?award) )
|
||||
OPTIONAL { ?award rdfs:label ?awardLabel }
|
||||
OPTIONAL { ?conferredBy a foaf:Organization .
|
||||
OPTIONAL { ?conferredBy rdfs:label ?conferredByLabel }
|
||||
{
|
||||
?award core:awardConferredBy ?conferredBy
|
||||
} UNION
|
||||
{
|
||||
?conferredBy core:awardConferred ?award
|
||||
}
|
||||
|
||||
OPTIONAL { ?award core:awardConferredBy ?conferredBy .
|
||||
?conferredBy rdfs:label ?conferredByLabel
|
||||
}
|
||||
OPTIONAL { ?award core:dateTimeInterval ?dateTimeInterval
|
||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
|
@ -82,20 +75,16 @@
|
|||
CONSTRUCT {
|
||||
?subject ?property ?award .
|
||||
?award core:awardConferredBy ?conferredBy .
|
||||
?conferredBy a foaf:Organization .
|
||||
?conferredBy core:awardConferred ?award .
|
||||
?conferredBy rdfs:label ?conferredByLabel
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?award .
|
||||
?conferredBy a foaf:Organization .
|
||||
?award core:awardConferredBy ?conferredBy .
|
||||
?conferredBy core:awardConferred ?award
|
||||
?subject ?property ?award
|
||||
} UNION {
|
||||
?subject ?property ?award .
|
||||
?conferredBy a foaf:Organization .
|
||||
?award core:awardConferredBy ?conferredBy .
|
||||
?conferredBy core:awardConferred ?award .
|
||||
?award core:awardConferredBy ?conferredBy
|
||||
} UNION {
|
||||
?subject ?property ?award .
|
||||
?award core:awardConferredBy ?conferredBy .
|
||||
?conferredBy rdfs:label ?conferredByLabel
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<#-- $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#mailingAddress.
|
||||
|
||||
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>
|
||||
<@showAdvisorIn statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showAdvisorIn statement>
|
||||
<#-- It's possible that advisorIn relationships were created before the custom form and only have
|
||||
an rdfs:label. So check to see if there's an advisee first. If not, just display the label. -->
|
||||
<#local linkedIndividual>
|
||||
<#if statement.advisee??>
|
||||
<a href="${profileUrl(statement.advisee)}">${statement.adviseeLabel!}</a>,
|
||||
<#if statement.degreeLabel??>
|
||||
${statement.degreeAbbr!statement.degreeLabel!}
|
||||
<#if statement.dateTimeStart??> candidate,<#else> candidate</#if>
|
||||
</#if>
|
||||
<#elseif statement.advisoryLabel??>
|
||||
<a href="${profileUrl(statement.advisory)}">${statement.advisoryLabel!statement.localName}</a>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
${linkedIndividual} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
</#macro>
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<#local linkedIndividual>
|
||||
<#if statement.award??>
|
||||
<a href="${profileUrl(statement.award)}" title="crap">${statement.awardLabel!statement.localName}</a>
|
||||
<a href="${profileUrl(statement.award)}">${statement.awardLabel!statement.localName}</a>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue