NIHVIVO-1570 changes to support SPARQL queries with GRAPH filtering in non-SDB Jena implementation

This commit is contained in:
bjl23 2010-12-22 20:11:16 +00:00
parent 2d711702cf
commit e9feb745b1
2 changed files with 19 additions and 19 deletions

View file

@ -27,14 +27,14 @@
PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX core: <http://vivoweb.org/ontology/core#>
SELECT DISTINCT ?subClass ?authorship ?infoResource ?infoResourceName ?dateTime WHERE { SELECT DISTINCT ?subClass ?authorship ?infoResource ?infoResourceName ?dateTime WHERE {
?subject ?property ?authorship . GRAPH ?g1 { ?subject ?property ?authorship }
?authorship core:linkedInformationResource ?infoResource . GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
?infoResource rdfs:label ?infoResourceName . GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
?subClass rdfs:subClassOf core:InformationResource . GRAPH ?g4 { ?subClass rdfs:subClassOf core:InformationResource }
OPTIONAL { ?infoResource core:hasDateTimeValue ?dateTimeValue . OPTIONAL { GRAPH ?g5 { ?infoResource core:hasDateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime . } ?dateTimeValue core:dateTime ?dateTime . } }
} ORDER BY ?subClass DESC(?dateTime) ?infoResourceName } ORDER BY ?subClass DESC(?dateTime) ?infoResourceName
</query> </query>
--> -->
<template>propStatement-authorInAuthorship.ftl</template> <template>propStatement-authorInAuthorship.ftl</template>
</list-view-config> </list-view-config>

View file

@ -30,19 +30,19 @@
SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName
?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime ?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime
WHERE { WHERE {
?subject ?property ?edTraining . GRAPH ?g1 { ?subject ?property ?edTraining }
OPTIONAL { ?edTraining core:trainingAtOrganization ?org . OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
?org rdfs:label ?orgName . } ?org rdfs:label ?orgName . } }
OPTIONAL { ?edTraining core:degreeEarned ?degree . } OPTIONAL { GRAPH ?g3 { ?edTraining core:degreeEarned ?degree } }
OPTIONAL { ?degree rdfs:label ?degreeName . } OPTIONAL { GRAPH ?g4 { ?degree rdfs:label ?degreeName } }
OPTIONAL { ?degree core:abbreviation ?degreeAbbr . } OPTIONAL { GRAPH ?g5 { ?degree core:abbreviation ?degreeAbbr } }
OPTIONAL { ?edTraining core:majorField ?majorField . } OPTIONAL { GRAPH ?g6 { ?edTraining core:majorField ?majorField } }
OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool . } OPTIONAL { GRAPH ?g7 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
OPTIONAL { ?edTraining core:supplementalInformation ?info . } OPTIONAL { GRAPH ?g8 { ?edTraining core:supplementalInformation ?info } }
OPTIONAL { ?edTraining core:hasDateTimeValue ?dateTimeValue . OPTIONAL { GRAPH ?g9 { ?edTraining core:hasDateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime . } ?dateTimeValue core:dateTime ?dateTime } }
} ORDER BY DESC(?dateTime) } ORDER BY DESC(?dateTime)
</query> </query>
<template>propStatement-educationalTraining.ftl</template> <template>propStatement-educationalTraining.ftl</template>
</list-view-config> </list-view-config>