NIHVIVO-1633 Support collation toggling for all object properties. Basic functionality in place but not all queries working perfectly yet.

This commit is contained in:
rjy7 2011-01-19 20:46:39 +00:00
parent a5a9305a5c
commit a36565442a
9 changed files with 287 additions and 65 deletions

View file

@ -4,13 +4,33 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
SELECT DISTINCT ?subclass ?authorship (afn:localname(?authorship) AS ?authorshipName)
?infoResource ?infoResourceName ?dateTime WHERE {
SELECT DISTINCT ?authorship (afn:localname(?authorship) AS ?authorshipName)
?infoResource ?infoResourceName
?dateTime WHERE {
GRAPH ?g1 { ?subject ?property ?authorship }
OPTIONAL { GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
OPTIONAL { GRAPH ?g4 { ?infoResource core:dateTimeValue ?dateTimeValue }
GRAPH ?g5 { ?dateTimeValue core:dateTime ?dateTime }
}
}
} ORDER BY DESC(?dateTime) ?infoResourceName
</query-base>
<query-collated>
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;
SELECT DISTINCT ?subclass
?authorship (afn:localname(?authorship) AS ?authorshipName)
?infoResource ?infoResourceName
?dateTime WHERE {
GRAPH ?g1 { ?subject ?property ?authorship }
OPTIONAL { GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
@ -19,12 +39,12 @@
FILTER (?g5 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g5 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime . }
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue }
GRAPH ?g7 { ?dateTimeValue core:dateTime ?dateTime }
}
}
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
</query>
</query-collated>
<template>propStatement-authorInAuthorship.ftl</template>
</list-view-config>

View file

@ -4,7 +4,7 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
@ -17,28 +17,28 @@
?dateTimeEnd
?precisionEnd WHERE {
GRAPH ?g1 { ?subject ?property ?dateTimeInterval
LET(?intervalName := afn:localname(?dateTimeInterval))
LET (?intervalName := afn:localname(?dateTimeInterval))
}
OPTIONAL { GRAPH ?g2 { ?dateTimeInterval core:start ?valueStart
LET(?valueStartName := afn:localname(?valueStart))
LET (?valueStartName := afn:localname(?valueStart))
}
OPTIONAL { GRAPH ?g3 { ?valueStart core:dateTime ?dateTimeStart } }
OPTIONAL { GRAPH ?g4 { ?valueStart core:dateTimePrecision ?dateTimePrecisionStart
LET(?precisionStart := afn:localname(?dateTimePrecisionStart))
LET (?precisionStart := afn:localname(?dateTimePrecisionStart))
}
}
}
OPTIONAL { GRAPH ?g5 { ?dateTimeInterval core:end ?valueEnd
LET(?valueEndName := afn:localname(?valueEnd))
LET (?valueEndName := afn:localname(?valueEnd))
}
OPTIONAL { GRAPH ?g6 { ?valueEnd core:dateTime ?dateTimeEnd } }
OPTIONAL { GRAPH ?g7 { ?valueEnd core:dateTimePrecision ?dateTimePrecisionEnd
LET(?precisionEnd := afn:localname(?dateTimePrecisionEnd))
LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd))
}
}
}
}
</query>
</query-base>
<template>propStatement-dateTimeInterval.ftl</template>
</list-view-config>

View file

@ -4,18 +4,20 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
SELECT DISTINCT ?dateTimeValue (afn:localname(?dateTimeValue) AS ?dateTimeValueName)
(afn:localname(?dateTimePrecision) AS ?precision) ?dateTime WHERE {
SELECT DISTINCT ?dateTimeValue
(afn:localname(?dateTimeValue) AS ?dateTimeValueName)
(afn:localname(?dateTimePrecision) AS ?precision)
?dateTime WHERE {
GRAPH ?g1 { ?subject ?property ?dateTimeValue }
OPTIONAL { GRAPH ?g2 { ?dateTimeValue core:dateTime ?dateTime } }
OPTIONAL { GRAPH ?g3 { ?dateTimeValue core:dateTimePrecision ?dateTimePrecision } }
}
</query>
</query-base>
<template>propStatement-dateTimeValue.ftl</template>
</list-view-config>

View file

@ -4,15 +4,20 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName
?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTimeStart ?dateTimeEnd
SELECT DISTINCT ?edTraining ?edTrainingName
?org ?orgName
?degreeName ?degreeAbbr
?majorField ?deptOrSchool ?info
?dateTimeStart ?dateTimeEnd
WHERE {
GRAPH ?g1 { ?subject ?property ?edTraining }
GRAPH ?g1 { ?subject ?property ?edTraining
LET (?edTrainingName := afn:localName(?edTraining))
}
OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
?org rdfs:label ?orgName . }
}
@ -24,15 +29,56 @@
OPTIONAL { GRAPH ?g7 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
OPTIONAL { GRAPH ?g8 { ?edTraining core:supplementalInformation ?info } }
OPTIONAL { GRAPH ?g9 { ?edTraining core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart }
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g11 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd }
OPTIONAL { GRAPH ?g12 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g13 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart)
</query>
</query-base>
<query-collated>
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;
SELECT DISTINCT ?subclass
?edTraining ?edTrainingName
?org ?orgName
?degreeName ?degreeAbbr
?majorField ?deptOrSchool ?info
?dateTimeStart ?dateTimeEnd
WHERE {
GRAPH ?g1 { ?subject ?property ?edTraining
LET (?edTrainingName := afn:localName(?edTraining))
}
OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
?org rdfs:label ?orgName }
OPTIONAL { GRAPH ?g3 { ?subclass rdfs:subClassOf core:Organization }
GRAPH ?g4 { ?org a ?subclass }
FILTER (?g4 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g4 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
}
OPTIONAL { GRAPH ?g5 { ?edTraining core:degreeEarned ?degree }
OPTIONAL { GRAPH ?g6 { ?degree rdfs:label ?degreeName } }
OPTIONAL { GRAPH ?g7 { ?degree core:abbreviation ?degreeAbbr } }
}
OPTIONAL { GRAPH ?g8 { ?edTraining core:majorField ?majorField } }
OPTIONAL { GRAPH ?g9 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
OPTIONAL { GRAPH ?g10 { ?edTraining core:supplementalInformation ?info } }
OPTIONAL { GRAPH ?g11 { ?edTraining core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g12 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g13 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g14 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g15 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart)
</query-collated>
<template>propStatement-educationalTraining.ftl</template>
</list-view-config>

View file

@ -4,28 +4,61 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName)
?roleLabel ?activity ?activityName ?dateTimeStart ?dateTimeEnd WHERE {
?roleLabel
?activity ?activityName
?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?role }
OPTIONAL { GRAPH ?g2 { ?role core:roleIn ?activity }
GRAPH ?g3 { ?activity rdfs:label ?activityName }
}
OPTIONAL { GRAPH ?g4 { ?role rdfs:label ?roleLabel } }
OPTIONAL { GRAPH ?g5 { ?role core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart }
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g7 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g7 { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd }
OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g9 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName
</query>
</query-base>
<query-collated>
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;
SELECT DISTINCT ?subclass
?role (afn:localname(?role) AS ?roleName)
?roleLabel
?activity ?activityName
?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?role }
OPTIONAL { GRAPH ?g2 { ?role core:roleIn ?activity }
GRAPH ?g3 { ?activity rdfs:label ?activityName }
}
OPTIONAL { GRAPH ?g4 { ?role a ?subclass }
GRAPH ?g5 { ?subclass rdfs:subClassOf core:Role }
FILTER (?g5 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g5 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
OPTIONAL { GRAPH ?g6 { ?role rdfs:label ?roleLabel } }
OPTIONAL { GRAPH ?g7 { ?role 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 }
}
}
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName
</query-collated>
<template>propStatement-hasRole.ftl</template>
</list-view-config>

View file

@ -4,7 +4,7 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
@ -17,7 +17,29 @@
GRAPH ?g4 { ?person rdfs:label ?personName }
}
} ORDER BY ?rank ?personName
</query>
</query-base>
<query-collated>
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 foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
SELECT DISTINCT ?subclass
?authorship (afn:localname(?authorship) AS ?authorshipName)
?person ?personName WHERE {
GRAPH ?g1 { ?subject ?property ?authorship }
OPTIONAL { GRAPH ?g2 { ?authorship core:authorRank ?rank } }
OPTIONAL { GRAPH ?g3 { ?authorship core:linkedAuthor ?person }
GRAPH ?g4 { ?person rdfs:label ?personName }
OPTIONAL { GRAPH ?g5 { ?person a ?subclass }
GRAPH ?g6 { ?subclass rdfs:subClassOf foaf:Person }
FILTER (?g6 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g6 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
}
} ORDER BY ?subclass ?rank ?personName
</query-collated>
<template>propStatement-informationResourceInAuthorship.ftl</template>
</list-view-config>

View file

@ -4,33 +4,61 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
SELECT DISTINCT ?subclass ?position (afn:localname(?position) AS ?positionName)
?positionTitle ?person ?personName ?dateTimeStart ?dateTimeEnd WHERE {
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 }
}
}
} ORDER BY ?personName
</query-base>
<query-collated>
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;
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 }
FILTER (?g5 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g5 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
GRAPH ?g5 { ?subclass rdfs:subClassOf core:Position }
FILTER (?g5 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g5 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
OPTIONAL { GRAPH ?g6 { ?position rdfs:label ?positionTitle } }
OPTIONAL { GRAPH ?g7 { ?position core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart }
OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g9 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g9 { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd }
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g11 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY ?subclass ?personName
</query>
</query-collated>
<template>propStatement-organizationForPosition.ftl</template>
</list-view-config>

View file

@ -4,28 +4,61 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
SELECT DISTINCT ?position (afn:localname(?position) AS ?positionName)
?positionTitle ?org ?orgName ?dateTimeStart ?dateTimeEnd WHERE {
SELECT DISTINCT ?position (afn:localname(?position) AS ?positionName)
?positionTitle
?org ?orgName
?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?position }
OPTIONAL { GRAPH ?g2 { ?position core:positionInOrganization ?org }
GRAPH ?g3 { ?org rdfs:label ?orgName }
}
OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } }
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart }
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g7 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g7 { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd }
OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g9 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName
</query>
</query-base>
<query-collated>
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;
SELECT DISTINCT ?subclass
?position (afn:localname(?position) AS ?positionName)
?positionTitle
?org ?orgName
?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?position }
OPTIONAL { GRAPH ?g2 { ?position core:positionInOrganization ?org }
GRAPH ?g3 { ?org rdfs:label ?orgName }
}
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 }
}
}
OPTIONAL { GRAPH ?g8 { ?position a ?subclass }
GRAPH ?g9 { ?subclass rdfs:subClassOf core:Position }
FILTER (?g9 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g9 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName
</query-collated>
<template>propStatement-personInPosition.ftl</template>
</list-view-config>

View file

@ -4,13 +4,14 @@
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query>
<query-base>
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;
SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName)
?roleLabel ?roleTypeLabel ?indivInRole ?indivName
?roleLabel ?roleTypeLabel
?indivInRole ?indivName
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?role }
OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf }
@ -24,15 +25,52 @@
GRAPH ?g7 { ?roleType rdfs:label ?roleTypeLabel }
}
OPTIONAL { GRAPH ?g8 { ?role core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g9 { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart }
OPTIONAL { GRAPH ?g9 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g10 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd }
OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g12 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY ?indivName ?roleLabel ?roleTypeLabel
</query>
</query-base>
<query-collated>
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;
SELECT DISTINCT ?subclass
?role (afn:localname(?role) AS ?roleName)
?roleLabel ?roleTypeLabel
?indivInRole ?indivName
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?role }
OPTIONAL { GRAPH ?g2 { ?roleProp rdfs:subPropertyOf core:roleOf }
GRAPH ?g3 { ?role ?roleProp ?indivInRole }
FILTER (?g3 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g3 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
GRAPH ?g4 { ?indivInRole rdfs:label ?indivName }
}
OPTIONAL { GRAPH ?g5 { ?role rdfs:label ?roleLabel } }
OPTIONAL { GRAPH ?g6 { ?role a ?roleType }
GRAPH ?g7 { ?roleType rdfs:label ?roleTypeLabel }
}
OPTIONAL { GRAPH ?g8 { ?role core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g9 { ?dateTimeInterval core:start ?dateTimeStartValue }
GRAPH ?g10 { ?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g11 { ?dateTimeInterval core:end ?dateTimeEndValue }
GRAPH ?g12 { ?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
OPTIONAL { GRAPH ?g13 { ?role a ?subclass }
GRAPH ?g14 { ?subclass rdfs:subClassOf core:Role }
FILTER (?g14 != &lt;http://vitro.mannlib.cornell.edu/default/inferred-tbox&gt; &amp;&amp;
?g14 != &lt;http://vitro.mannlib.cornell.edu/default/vitro-kb-inf&gt; )
}
} ORDER BY ?subclass ?indivName ?roleLabel ?roleTypeLabel
</query-collated>
<template>propStatement-relatedRole.ftl</template>
</list-view-config>