NIHVIVO-1879 Combine collated and uncollated list view queries into a single query, with preprocessing to get the right version.
This commit is contained in:
parent
451ddd9461
commit
2a3b6615f7
9 changed files with 56 additions and 227 deletions
|
@ -4,45 +4,29 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
|
||||||
SELECT DISTINCT ?authorship
|
SELECT DISTINCT <collation-fragment> ?subclass </collation-fragment>
|
||||||
?infoResource ?infoResourceName
|
|
||||||
?dateTime WHERE {
|
|
||||||
?subject ?property ?authorship
|
|
||||||
OPTIONAL { ?authorship core:linkedInformationResource ?infoResource .
|
|
||||||
?infoResource rdfs:label ?infoResourceName
|
|
||||||
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
|
|
||||||
?dateTimeValue core:dateTime ?dateTime
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} ORDER BY DESC(?dateTime) ?infoResourceName
|
|
||||||
</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
|
|
||||||
?authorship
|
?authorship
|
||||||
?infoResource ?infoResourceName
|
?infoResource ?infoResourceName
|
||||||
?dateTime WHERE {
|
?dateTime WHERE {
|
||||||
?subject ?property ?authorship
|
?subject ?property ?authorship
|
||||||
OPTIONAL { ?authorship core:linkedInformationResource ?infoResource .
|
OPTIONAL { ?authorship core:linkedInformationResource ?infoResource .
|
||||||
?infoResource rdfs:label ?infoResourceName
|
?infoResource rdfs:label ?infoResourceName
|
||||||
|
<collation-fragment>
|
||||||
OPTIONAL { ?subclass rdfs:subClassOf core:InformationResource .
|
OPTIONAL { ?subclass rdfs:subClassOf core:InformationResource .
|
||||||
?infoResource a ?subclass
|
?infoResource a ?subclass
|
||||||
}
|
}
|
||||||
|
</collation-fragment>
|
||||||
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
|
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
|
||||||
?dateTimeValue core:dateTime ?dateTime
|
?dateTimeValue core:dateTime ?dateTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
|
} ORDER BY <collation-fragment> ?subclass </collation-fragment> ?infoResourceName
|
||||||
</query-collated>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</query-base>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
OPTIONAL { ?dateTimeValue core:dateTime ?dateTime }
|
OPTIONAL { ?dateTimeValue core:dateTime ?dateTime }
|
||||||
OPTIONAL { ?dateTimeValue core:dateTimePrecision ?dateTimePrecision }
|
OPTIONAL { ?dateTimeValue core:dateTimePrecision ?dateTimePrecision }
|
||||||
}
|
}
|
||||||
</query-base>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
CONSTRUCT {
|
CONSTRUCT {
|
||||||
|
|
|
@ -4,46 +4,13 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<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 ?edTraining
|
|
||||||
?org ?orgName
|
|
||||||
?degreeName ?degreeAbbr
|
|
||||||
?majorField ?deptOrSchool ?info
|
|
||||||
?dateTimeStart ?dateTimeEnd
|
|
||||||
WHERE {
|
|
||||||
?subject ?property ?edTraining
|
|
||||||
OPTIONAL { ?edTraining core:trainingAtOrganization ?org .
|
|
||||||
?org rdfs:label ?orgName
|
|
||||||
}
|
|
||||||
OPTIONAL { ?edTraining core:degreeEarned ?degree
|
|
||||||
OPTIONAL { ?degree rdfs:label ?degreeName }
|
|
||||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
|
||||||
}
|
|
||||||
OPTIONAL { ?edTraining core:majorField ?majorField }
|
|
||||||
OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool }
|
|
||||||
OPTIONAL { ?edTraining core:supplementalInformation ?info }
|
|
||||||
OPTIONAL { ?edTraining core:dateTimeInterval ?dateTimeInterval
|
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
|
||||||
}
|
|
||||||
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
|
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart)
|
|
||||||
</query-base>
|
|
||||||
|
|
||||||
<query-collated>
|
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||||
|
|
||||||
SELECT DISTINCT ?subclass
|
SELECT DISTINCT <collation-fragment> ?subclass </collation-fragment>
|
||||||
?edTraining
|
?edTraining
|
||||||
?org ?orgName
|
?org ?orgName
|
||||||
?degreeName ?degreeAbbr
|
?degreeName ?degreeAbbr
|
||||||
|
@ -53,10 +20,12 @@
|
||||||
?subject ?property ?edTraining
|
?subject ?property ?edTraining
|
||||||
OPTIONAL { ?edTraining core:trainingAtOrganization ?org .
|
OPTIONAL { ?edTraining core:trainingAtOrganization ?org .
|
||||||
?org rdfs:label ?orgName
|
?org rdfs:label ?orgName
|
||||||
|
<collation-fragment>
|
||||||
OPTIONAL { ?subclass rdfs:subClassOf foaf:Organization .
|
OPTIONAL { ?subclass rdfs:subClassOf foaf:Organization .
|
||||||
?org a ?subclass
|
?org a ?subclass
|
||||||
}
|
}
|
||||||
}
|
</collation-fragment>
|
||||||
|
}
|
||||||
OPTIONAL { ?edTraining core:degreeEarned ?degree
|
OPTIONAL { ?edTraining core:degreeEarned ?degree
|
||||||
OPTIONAL { ?degree rdfs:label ?degreeName }
|
OPTIONAL { ?degree rdfs:label ?degreeName }
|
||||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
||||||
|
@ -73,7 +42,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart)
|
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart)
|
||||||
</query-collated>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
|
@ -4,37 +4,12 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
|
||||||
SELECT DISTINCT ?role
|
SELECT DISTINCT <collation-fragment>?subclass</collation-fragment>
|
||||||
?roleLabel
|
|
||||||
?activity ?activityName
|
|
||||||
?dateTimeStart ?dateTimeEnd WHERE {
|
|
||||||
?subject ?property ?role
|
|
||||||
OPTIONAL { ?role core:roleIn ?activity .
|
|
||||||
?activity rdfs:label ?activityName
|
|
||||||
}
|
|
||||||
OPTIONAL { ?role rdfs:label ?roleLabel }
|
|
||||||
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
|
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
|
||||||
}
|
|
||||||
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
|
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?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
|
|
||||||
?role
|
?role
|
||||||
?roleLabel
|
?roleLabel
|
||||||
?activity ?activityName
|
?activity ?activityName
|
||||||
|
@ -43,9 +18,11 @@
|
||||||
OPTIONAL { ?role core:roleIn ?activity .
|
OPTIONAL { ?role core:roleIn ?activity .
|
||||||
?activity rdfs:label ?activityName
|
?activity rdfs:label ?activityName
|
||||||
}
|
}
|
||||||
|
<collation-fragment>
|
||||||
OPTIONAL { ?role a ?subclass .
|
OPTIONAL { ?role a ?subclass .
|
||||||
?subclass rdfs:subClassOf core:Role
|
?subclass rdfs:subClassOf core:Role
|
||||||
}
|
}
|
||||||
|
</collation-fragment>
|
||||||
OPTIONAL { ?role rdfs:label ?roleLabel }
|
OPTIONAL { ?role rdfs:label ?roleLabel }
|
||||||
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
|
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||||
|
@ -55,8 +32,8 @@
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName
|
} ORDER BY <collation-fragment>?subclass</collation-fragment> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName
|
||||||
</query-collated>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
|
@ -4,40 +4,26 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<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 ?authorship
|
|
||||||
?person ?personName WHERE {
|
|
||||||
?subject ?property ?authorship
|
|
||||||
OPTIONAL { ?authorship core:authorRank ?rank }
|
|
||||||
OPTIONAL { ?authorship core:linkedAuthor ?person .
|
|
||||||
?person rdfs:label ?personName
|
|
||||||
}
|
|
||||||
} ORDER BY ?rank ?personName
|
|
||||||
</query-base>
|
|
||||||
|
|
||||||
<query-collated>
|
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||||
|
|
||||||
SELECT DISTINCT ?subclass
|
SELECT DISTINCT <collation-fragment> ?subclass </collation-fragment>
|
||||||
?authorship
|
?authorship
|
||||||
?person ?personName WHERE {
|
?person ?personName WHERE {
|
||||||
?subject ?property ?authorship
|
?subject ?property ?authorship
|
||||||
OPTIONAL { ?authorship core:authorRank ?rank }
|
OPTIONAL { ?authorship core:authorRank ?rank }
|
||||||
OPTIONAL { ?authorship core:linkedAuthor ?person .
|
OPTIONAL { ?authorship core:linkedAuthor ?person .
|
||||||
?person rdfs:label ?personName
|
?person rdfs:label ?personName
|
||||||
|
<collation-fragment>
|
||||||
OPTIONAL { ?person a ?subclass .
|
OPTIONAL { ?person a ?subclass .
|
||||||
?subclass rdfs:subClassOf foaf:Person
|
?subclass rdfs:subClassOf foaf:Person
|
||||||
}
|
}
|
||||||
}
|
</collation-fragment>
|
||||||
} ORDER BY ?subclass ?rank ?personName
|
} ORDER BY <collation-fragment> ?subclass </collation-fragment> ?rank ?personName
|
||||||
</query-collated>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
|
@ -4,40 +4,12 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
|
||||||
SELECT DISTINCT ?position
|
SELECT DISTINCT <collation-fragment> ?subclass </collation-fragment>
|
||||||
?positionTitle
|
|
||||||
?person ?personName
|
|
||||||
?dateTimeStart ?dateTimeEnd WHERE {
|
|
||||||
?subject ?property ?position
|
|
||||||
OPTIONAL { ?position core:positionForPerson ?person .
|
|
||||||
?person rdfs:label ?personName
|
|
||||||
}
|
|
||||||
OPTIONAL { ?position rdfs:label ?positionTitle }
|
|
||||||
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
|
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
|
||||||
}
|
|
||||||
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
|
|
||||||
?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
|
?position
|
||||||
?positionTitle
|
?positionTitle
|
||||||
?person ?personName
|
?person ?personName
|
||||||
|
@ -45,10 +17,12 @@
|
||||||
?subject ?property ?position
|
?subject ?property ?position
|
||||||
OPTIONAL { ?position core:positionForPerson ?person .
|
OPTIONAL { ?position core:positionForPerson ?person .
|
||||||
?person rdfs:label ?personName
|
?person rdfs:label ?personName
|
||||||
}
|
}
|
||||||
|
<collation-fragment>
|
||||||
OPTIONAL { ?position a ?subclass .
|
OPTIONAL { ?position a ?subclass .
|
||||||
?subclass rdfs:subClassOf core:Position
|
?subclass rdfs:subClassOf core:Position
|
||||||
}
|
}
|
||||||
|
</collation-fragment>
|
||||||
OPTIONAL { ?position rdfs:label ?positionTitle }
|
OPTIONAL { ?position rdfs:label ?positionTitle }
|
||||||
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
|
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||||
|
@ -60,8 +34,8 @@
|
||||||
# Current positions only: end date is either null or not in the past
|
# Current positions only: end date is either null or not in the past
|
||||||
} FILTER ( !bound(?dateTimeEnd) ||
|
} FILTER ( !bound(?dateTimeEnd) ||
|
||||||
afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
|
afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
|
||||||
} ORDER BY ?subclass ?personName
|
} ORDER BY <collation-fragment> ?subclass </collation-fragment> ?personName
|
||||||
</query-collated>
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
|
@ -4,39 +4,12 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
|
||||||
SELECT DISTINCT ?position
|
SELECT DISTINCT <collation-fragment>?subclass</collation-fragment>
|
||||||
?positionTitle
|
|
||||||
?hrJobTitle
|
|
||||||
?org ?orgName
|
|
||||||
?dateTimeStart ?dateTimeEnd WHERE {
|
|
||||||
?subject ?property ?position
|
|
||||||
OPTIONAL { ?position core:positionInOrganization ?org .
|
|
||||||
?org rdfs:label ?orgName
|
|
||||||
}
|
|
||||||
OPTIONAL { ?position rdfs:label ?positionTitle }
|
|
||||||
OPTIONAL { ?position core:hrJobTitle ?hrJobTitle }
|
|
||||||
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
|
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
|
||||||
}
|
|
||||||
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
|
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName
|
|
||||||
</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
|
?position
|
||||||
?positionTitle
|
?positionTitle
|
||||||
?hrJobTitle
|
?hrJobTitle
|
||||||
|
@ -56,11 +29,13 @@
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<collation-fragment>
|
||||||
OPTIONAL { ?position a ?subclass .
|
OPTIONAL { ?position a ?subclass .
|
||||||
?subclass rdfs:subClassOf core:Position
|
?subclass rdfs:subClassOf core:Position
|
||||||
}
|
}
|
||||||
} ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName
|
</collation-fragment>
|
||||||
</query-collated>
|
} ORDER BY <collation-fragment>?subclass</collation-fragment> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?orgName
|
||||||
|
</query-select>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
|
@ -4,12 +4,13 @@
|
||||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
<list-view-config>
|
<list-view-config>
|
||||||
<query-base>
|
<query-select>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
|
||||||
SELECT DISTINCT ?role
|
SELECT DISTINCT <collation-fragment>?subclass</collation-fragment>
|
||||||
|
?role
|
||||||
?roleLabel ?roleTypeLabel
|
?roleLabel ?roleTypeLabel
|
||||||
?indivInRole (afn:localname(?indivInRole) AS ?indivName)
|
?indivInRole (afn:localname(?indivInRole) AS ?indivName)
|
||||||
?indivLabel
|
?indivLabel
|
||||||
|
@ -18,9 +19,9 @@
|
||||||
?subject ?property ?role
|
?subject ?property ?role
|
||||||
|
|
||||||
OPTIONAL { ?role rdfs:label ?roleLabel }
|
OPTIONAL { ?role rdfs:label ?roleLabel }
|
||||||
|
|
||||||
# We need ?subclass in query-base to get the roleTypeLabel for roles that
|
# We need ?subclass in the uncollated query to get the roleTypeLabel
|
||||||
# have no label (e.g., InvestigatorRole and its subclasses)
|
# for roles that have no label (e.g., InvestigatorRole and its subclasses).
|
||||||
OPTIONAL { ?role a ?subclass .
|
OPTIONAL { ?role a ?subclass .
|
||||||
?subclass rdfs:subClassOf core:Role
|
?subclass rdfs:subClassOf core:Role
|
||||||
OPTIONAL { ?subclass rdfs:label ?roleTypeLabel }
|
OPTIONAL { ?subclass rdfs:label ?roleTypeLabel }
|
||||||
|
@ -39,45 +40,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} ORDER BY ?indivName ?indivLabel ?roleLabel ?roleTypeLabel
|
} ORDER BY <collation-fragment>?subclass</collation-fragment>?indivName ?indivLabel ?roleLabel ?roleTypeLabel
|
||||||
</query-base>
|
</query-select>
|
||||||
|
|
||||||
<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
|
|
||||||
?role
|
|
||||||
?roleLabel ?roleTypeLabel
|
|
||||||
?indivInRole (afn:localname(?indivInRole) AS ?indivName)
|
|
||||||
?indivLabel
|
|
||||||
?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
|
|
||||||
|
|
||||||
?subject ?property ?role
|
|
||||||
|
|
||||||
OPTIONAL { ?role rdfs:label ?roleLabel }
|
|
||||||
|
|
||||||
OPTIONAL { ?role a ?subclass .
|
|
||||||
?subclass rdfs:subClassOf core:Role
|
|
||||||
OPTIONAL { ?subclass rdfs:label ?roleTypeLabel }
|
|
||||||
?roleProp rdfs:subPropertyOf core:roleOf ;
|
|
||||||
rdfs:domain ?subclass .
|
|
||||||
?role ?roleProp ?indivInRole
|
|
||||||
OPTIONAL { ?indivInRole rdfs:label ?indivLabel }
|
|
||||||
}
|
|
||||||
|
|
||||||
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
|
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
|
||||||
}
|
|
||||||
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
|
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} ORDER BY ?subclass ?indivName ?indivLabel ?roleLabel ?roleTypeLabel
|
|
||||||
</query-collated>
|
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue