NIHVIVO-1334 Fixes to queries to prevent incorrect solutions

This commit is contained in:
rjy7 2011-01-05 21:45:57 +00:00
parent 96f70ea2a8
commit 2db6e37522
5 changed files with 37 additions and 31 deletions

View file

@ -14,14 +14,16 @@
GRAPH ?g1 { ?subject ?property ?position }
OPTIONAL { GRAPH ?g2 { ?position core:positionInOrganization ?org }
GRAPH ?g3 { ?org rdfs:label ?orgName }
}
}
OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } }
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart } }
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd } }
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g7 { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY DESC(?dateTimeStart) DESC(?dateTimeEnd) ?orgName
</query>