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 -->
|
||||
|
||||
<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
|
||||
?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
|
||||
SELECT DISTINCT <collation-fragment> ?subclass </collation-fragment>
|
||||
?authorship
|
||||
?infoResource ?infoResourceName
|
||||
?dateTime WHERE {
|
||||
?subject ?property ?authorship
|
||||
OPTIONAL { ?authorship core:linkedInformationResource ?infoResource .
|
||||
?infoResource rdfs:label ?infoResourceName
|
||||
<collation-fragment>
|
||||
OPTIONAL { ?subclass rdfs:subClassOf core:InformationResource .
|
||||
?infoResource a ?subclass
|
||||
}
|
||||
}
|
||||
</collation-fragment>
|
||||
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime
|
||||
}
|
||||
}
|
||||
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
|
||||
</query-collated>
|
||||
}
|
||||
}
|
||||
} ORDER BY <collation-fragment> ?subclass </collation-fragment> ?infoResourceName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue