NIHVIVO-1470: new custom list view for core:organizationForTraining
This commit is contained in:
parent
e5723abab2
commit
1c04d7a05b
3 changed files with 181 additions and 0 deletions
|
@ -35,6 +35,10 @@
|
|||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-organizationForPosition.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#organizationForTraining">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-organizationForTraining.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#mailingAddress">
|
||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-mailingAddress.xml</display:listViewConfigFile>
|
||||
</rdf:Description>
|
||||
|
|
140
productMods/config/listViewConfig-organizationForTraining.xml
Normal file
140
productMods/config/listViewConfig-organizationForTraining.xml
Normal file
|
@ -0,0 +1,140 @@
|
|||
<?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
|
||||
<http://localhost:8080/vivo/n1402> <http://vivoweb.org/ontology/core#organizationForTraining>
|
||||
-->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT DISTINCT <collated> ?subclass </collated>
|
||||
?localName
|
||||
?training
|
||||
?person
|
||||
?personName
|
||||
?degree
|
||||
?degreeName
|
||||
?degreeAbbr
|
||||
?field
|
||||
?suppInfo
|
||||
?dateTimeStart ?dateTimeEnd
|
||||
WHERE {
|
||||
?subject ?property ?training
|
||||
LET ( ?localName := afn:localname(?training) )
|
||||
OPTIONAL { ?training core:educationalTrainingOf ?person
|
||||
OPTIONAL { ?person rdfs:label ?personName }
|
||||
}
|
||||
OPTIONAL { ?training core:degreeEarned ?degree
|
||||
OPTIONAL { ?degree rdfs:label ?degreeName }
|
||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
||||
}
|
||||
<collated>
|
||||
OPTIONAL { ?training a ?subclass .
|
||||
?subclass rdfs:subClassOf core:EducationalTraining
|
||||
}
|
||||
</collated>
|
||||
|
||||
OPTIONAL { ?training rdfs:label ?trainingLabel }
|
||||
OPTIONAL { ?training core:majorField ?field }
|
||||
OPTIONAL { ?training core:supplementalInformation ?suppInfo }
|
||||
OPTIONAL { ?training 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(?person) )
|
||||
</critical-data-required>
|
||||
} ORDER BY <collated> ?subclass </collated> ?personName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subclass rdfs:subClassOf core:EducationalTraining
|
||||
} WHERE {
|
||||
?subclass rdfs:subClassOf core:EducationalTraining
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?training .
|
||||
?training ?trainingProperty ?trainingValue .
|
||||
?person rdfs:label ?personName
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?training
|
||||
} UNION {
|
||||
?subject ?property ?training .
|
||||
?training ?trainingProperty ?trainingValue
|
||||
} UNION {
|
||||
?subject ?property ?training .
|
||||
?training core:educationalTrainingOf ?person .
|
||||
?person rdfs:label ?personName
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
|
||||
CONSTRUCT {
|
||||
?degree rdfs:label ?degreeName .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?training .
|
||||
?training core:degreeEarned ?degree .
|
||||
?degree rdfs:label ?degreeName
|
||||
} UNION {
|
||||
?subject ?property ?training .
|
||||
?training core:degreeEarned ?degree .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?position .
|
||||
?position core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
} WHERE {
|
||||
?subject ?property ?position .
|
||||
?position 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 ?position .
|
||||
?position core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
} WHERE {
|
||||
?subject ?property ?position .
|
||||
?position core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-organizationForTraining.ftl</template>
|
||||
</list-view-config>
|
|
@ -0,0 +1,37 @@
|
|||
<#-- $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>
|
||||
<#import "lib-datetime.ftl" as dt>
|
||||
|
||||
<@showTraining statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showTraining statement>
|
||||
|
||||
<#local linkedIndividual>
|
||||
<#if statement.person??>
|
||||
<a href="${profileUrl(statement.person)}">${statement.personName}</a>
|
||||
<#else>
|
||||
<#-- This shouldn't happen, but we must provide for it -->
|
||||
<a href="${profileUrl(statement.training)}">missing person in this position</a>
|
||||
</#if>
|
||||
</#local>
|
||||
<#local detailedInfo>
|
||||
<#if statement.degree??>
|
||||
${statement.degreeAbbr!} in ${statement.field!}
|
||||
<#elseif statement.field??>
|
||||
${statement.field!}, ${statement.suppInfo!}
|
||||
<#else>
|
||||
${statement.suppInfo!}
|
||||
</#if>
|
||||
</#local>
|
||||
<@s.join [ linkedIndividual, detailedInfo ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
|
||||
</#macro>
|
Loading…
Add table
Add a link
Reference in a new issue