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
1ac5eb13c8
commit
896c6f157c
3 changed files with 47 additions and 37 deletions
|
@ -6,30 +6,20 @@
|
|||
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-base>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
||||
SELECT ?object ?name ?moniker WHERE {
|
||||
?subject ?property ?object
|
||||
OPTIONAL { ?object rdfs:label ?name }
|
||||
OPTIONAL { ?object vitro:moniker ?moniker }
|
||||
} ORDER BY ?name ?object
|
||||
</query-base>
|
||||
|
||||
<query-collated>
|
||||
<query-select>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
SELECT ?subclass ?object ?name ?moniker {
|
||||
SELECT <collation-fragment> ?subclass </collation-fragment>
|
||||
?object ?name ?moniker {
|
||||
?subject ?property ?object
|
||||
OPTIONAL { ?object a ?subclass }
|
||||
<collation-fragment> OPTIONAL { ?object a ?subclass } </collation-fragment>
|
||||
OPTIONAL { ?object rdfs:label ?name }
|
||||
OPTIONAL { ?object vitro:moniker ?moniker }
|
||||
FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
} ORDER BY ?subclass ?name ?object
|
||||
</query-collated>
|
||||
} ORDER BY <collation-fragment> ?subclass </collation-fragment> ?name ?object
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-base>
|
||||
<query-select>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
OPTIONAL { ?link vitro:linkURL ?url }
|
||||
OPTIONAL { ?link vitro:linkDisplayRank ?rank }
|
||||
} ORDER BY ?rank
|
||||
</query-base>
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
CONSTRUCT {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue