vivo/productMods/config/listViewConfig-organizationForPosition.xml

138 lines
5.8 KiB
XML

<?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 rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX fn: &lt;http://www.w3.org/2005/xpath-functions#&gt;
SELECT DISTINCT <collated> ?subclass </collated>
?position
?positionTitle
?person ?personName
?dateTimeStart ?dateTimeEnd
?hideThis
WHERE {
?subject ?property ?position
OPTIONAL { ?position core:relates ?person .
?person a foaf:Person .
?person rdfs:label ?personName
}
<collated>
OPTIONAL { ?position vitro:mostSpecificType ?subclass .
OPTIONAL { ?subclass vitro:displayRankAnnot ?displayRank . }
}
</collated>
OPTIONAL { ?position rdfs:label ?positionTitle }
OPTIONAL { ?position core:hideFromDisplay ?hideThis }
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
# Get current positions only: end date is either null or not in the past
FILTER ( !bound(?dateTimeEnd) ||
afn:substring(str(?dateTimeEnd), 0, 4) &gt;= afn:substring(str(afn:now()), 0, 4) )
<critical-data-required>
FILTER ( bound(?person) )
</critical-data-required>
<collated>FILTER ( ?displayRank &lt; 500 )</collated>
} ORDER BY <collated> ?subclass </collated> (fn:lower-case(?personName))
</query-select>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?position .
?position a core:Position .
?position vitro:mostSpecificType ?subclass .
?subclass vitro:displayRankAnnot ?displayRank
} WHERE {
{
?subject ?property ?position .
?position a core:Position .
?position vitro:mostSpecificType ?subclass
} UNION {
?subject ?property ?position .
?position a core:Position .
?position vitro:mostSpecificType ?subclass .
?subclass vitro:displayRankAnnot ?displayRank
}
}
</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;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?position .
?position a core:Position .
?position ?positionProperty ?positionValue .
?position core:relates ?person .
?person a foaf:Person .
?person rdfs:label ?personName
} WHERE {
{
?subject ?property ?position .
?position a core:Position .
} UNION {
?subject ?property ?position .
?position a core:Position .
?position ?positionProperty ?positionValue
} UNION {
?subject ?property ?position .
?position core:relates ?person .
?person a foaf:Person .
?person rdfs:label ?personName
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?position .
?position a core:Position .
?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?position .
?position a core:Position .
?position 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 ?position .
?position a core:Position .
?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?position .
?position a core:Position .
?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
</query-construct>
<template>propStatement-organizationForPosition.ftl</template>
</list-view-config>