67 lines
No EOL
3.7 KiB
XML
67 lines
No EOL
3.7 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-base>
|
|
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 ?position (afn:localname(?position) AS ?positionName)
|
|
?positionTitle
|
|
?person ?personName
|
|
?dateTimeStart ?dateTimeEnd WHERE {
|
|
GRAPH ?g1 { ?subject ?property ?position }
|
|
OPTIONAL { GRAPH ?g2 { ?position core:positionForPerson ?person }
|
|
GRAPH ?g3 { ?person rdfs:label ?personName }
|
|
}
|
|
OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } }
|
|
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval }
|
|
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue }
|
|
GRAPH ?g7 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
|
|
}
|
|
OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue }
|
|
GRAPH ?g9 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
|
|
|
}
|
|
# Current positions only: end date is either null or not in the past
|
|
} FILTER ( !bound(?dateTimeEnd) ||
|
|
afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
|
|
} ORDER BY ?personName
|
|
</query-base>
|
|
|
|
<query-collated>
|
|
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 ?subclass
|
|
?position (afn:localname(?position) AS ?positionName)
|
|
?positionTitle
|
|
?person ?personName
|
|
?dateTimeStart ?dateTimeEnd WHERE {
|
|
GRAPH ?g1 { ?subject ?property ?position }
|
|
OPTIONAL { GRAPH ?g2 { ?position core:positionForPerson ?person }
|
|
GRAPH ?g3 { ?person rdfs:label ?personName }
|
|
}
|
|
OPTIONAL { GRAPH ?g4 { ?position a ?subclass }
|
|
GRAPH ?g5 { ?subclass rdfs:subClassOf core:Position }
|
|
}
|
|
OPTIONAL { GRAPH ?g6 { ?position rdfs:label ?positionTitle } }
|
|
OPTIONAL { GRAPH ?g7 { ?position core:dateTimeInterval ?dateTimeInterval }
|
|
OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:start ?dateTimeStartValue }
|
|
GRAPH ?g9 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
|
|
}
|
|
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:end ?dateTimeEndValue }
|
|
GRAPH ?g11 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
|
}
|
|
# Current positions only: end date is either null or not in the past
|
|
} FILTER ( !bound(?dateTimeEnd) ||
|
|
afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
|
|
} ORDER BY ?subclass ?personName
|
|
</query-collated>
|
|
|
|
<template>propStatement-organizationForPosition.ftl</template>
|
|
</list-view-config> |