NIHVIVO-542: files for new award or honor list view

This commit is contained in:
tworrall 2011-10-11 19:55:17 +00:00
parent 9870916b52
commit ea747439ae
3 changed files with 191 additions and 0 deletions

View file

@ -38,6 +38,10 @@
<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>
<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>
<!--
******************************************************************
all roles use same config...is there a better way to specify this?

View file

@ -0,0 +1,150 @@
<?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: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&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;
SELECT DISTINCT ?award
?localName
?awardLabel
?conferredBy
?conferredByLabel
?dateTimeStart
?dateTimeEnd
?dateTime
WHERE {
?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:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
}
OPTIONAL { ?award core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
OPTIONAL { ?award core:dateTimeValue ?dateTimeValue
OPTIONAL { ?dateTimeValue core:dateTime ?dateTime
}
}
} ORDER BY ?label
</query-select>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?award .
?award ?awardProperty ?awardValue .
?award rdfs:label ?awardLabel
} WHERE {
{
?subject ?property ?award
} UNION {
?subject ?property ?award .
?award ?awardProperty ?awardValue .
?award rdfs:label ?awardLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
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
} UNION {
?subject ?property ?award .
?conferredBy a foaf:Organization .
?award core:awardConferredBy ?conferredBy .
?conferredBy core:awardConferred ?award .
?conferredBy rdfs:label ?conferredByLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
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: &lt;http://vivoweb.org/ontology/core#&gt;
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>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?award .
?award core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
} WHERE {
?subject ?property ?award .
?award core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
}
</query-construct>
<template>propStatement-awardOrHonor.ftl</template>
</list-view-config>

View file

@ -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#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-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>
<@showAward statement />
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showAward statement>
<#local linkedIndividual>
<#if statement.award??>
<a href="${profileUrl(statement.award)}" title="crap">${statement.awardLabel!statement.localName}</a>
</#if>
</#local>
<#local dateTimeVal>
<#if statement.dateTime??>
<@dt.yearSpan statement.dateTime! />
<#else>
<@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
</#if>
</#local>
<#local conferredByOrg>
<#if statement.conferredBy?has_content && statement.conferredByLabel?has_content>
conferred by <a href="${profileUrl(statement.conferredBy)}">${statement.conferredByLabel}</a>
</#if>
</#local>
<@s.join [ linkedIndividual, conferredByOrg!, dateTimeVal! ] />
</#macro>