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,12 +27,12 @@
PREFIX core: <http://vivoweb.org/ontology/core#>
SELECT DISTINCT ?subClass ?authorship ?infoResource ?infoResourceName ?dateTime WHERE {
?subject ?property ?authorship .
?authorship core:linkedInformationResource ?infoResource .
?infoResource rdfs:label ?infoResourceName .
?subClass rdfs:subClassOf core:InformationResource .
OPTIONAL { ?infoResource core:hasDateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime . }
GRAPH ?g1 { ?subject ?property ?authorship }
GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
GRAPH ?g4 { ?subClass rdfs:subClassOf core:InformationResource }
OPTIONAL { GRAPH ?g5 { ?infoResource core:hasDateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime . } }
} ORDER BY ?subClass DESC(?dateTime) ?infoResourceName
</query>
-->

View file

@ -30,17 +30,17 @@
SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName
?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime
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:hasDateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime . }
GRAPH ?g1 { ?subject ?property ?edTraining }
OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
?org rdfs:label ?orgName . } }
OPTIONAL { GRAPH ?g3 { ?edTraining core:degreeEarned ?degree } }
OPTIONAL { GRAPH ?g4 { ?degree rdfs:label ?degreeName } }
OPTIONAL { GRAPH ?g5 { ?degree core:abbreviation ?degreeAbbr } }
OPTIONAL { GRAPH ?g6 { ?edTraining core:majorField ?majorField } }
OPTIONAL { GRAPH ?g7 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
OPTIONAL { GRAPH ?g8 { ?edTraining core:supplementalInformation ?info } }
OPTIONAL { GRAPH ?g9 { ?edTraining core:hasDateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime } }
} ORDER BY DESC(?dateTime)
</query>