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,40 +4,26 @@
|
|||
<!-- 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 ?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>
|
||||
<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#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
|
||||
SELECT DISTINCT ?subclass
|
||||
SELECT DISTINCT <collation-fragment> ?subclass </collation-fragment>
|
||||
?authorship
|
||||
?person ?personName WHERE {
|
||||
?subject ?property ?authorship
|
||||
OPTIONAL { ?authorship core:authorRank ?rank }
|
||||
OPTIONAL { ?authorship core:linkedAuthor ?person .
|
||||
?person rdfs:label ?personName
|
||||
?person rdfs:label ?personName
|
||||
<collation-fragment>
|
||||
OPTIONAL { ?person a ?subclass .
|
||||
?subclass rdfs:subClassOf foaf:Person
|
||||
}
|
||||
}
|
||||
} ORDER BY ?subclass ?rank ?personName
|
||||
</query-collated>
|
||||
}
|
||||
</collation-fragment>
|
||||
} ORDER BY <collation-fragment> ?subclass </collation-fragment> ?rank ?personName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue