NIHVIVO-1334 Fixes to queries to prevent incorrect solutions
This commit is contained in:
parent
96f70ea2a8
commit
2db6e37522
5 changed files with 37 additions and 31 deletions
|
@ -14,14 +14,15 @@
|
||||||
GRAPH ?g1 { ?subject ?property ?authorship }
|
GRAPH ?g1 { ?subject ?property ?authorship }
|
||||||
OPTIONAL { GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
|
OPTIONAL { GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
|
||||||
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
|
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
|
||||||
}
|
|
||||||
OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf core:InformationResource }
|
OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf core:InformationResource }
|
||||||
GRAPH ?g5 { ?infoResource a ?subclass }
|
GRAPH ?g5 { ?infoResource a ?subclass }
|
||||||
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
|
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
|
||||||
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
||||||
}
|
}
|
||||||
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue .
|
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue .
|
||||||
?dateTimeValue core:dateTime ?dateTime . } }
|
?dateTimeValue core:dateTime ?dateTime . }
|
||||||
|
}
|
||||||
|
}
|
||||||
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
|
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
|
||||||
</query>
|
</query>
|
||||||
|
|
||||||
|
|
|
@ -12,19 +12,20 @@
|
||||||
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 {
|
||||||
|
|
||||||
GRAPH ?g1 { ?subject ?property ?edTraining }
|
GRAPH ?g1 { ?subject ?property ?edTraining }
|
||||||
OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
|
OPTIONAL { GRAPH ?g2 { ?edTraining core:trainingAtOrganization ?org .
|
||||||
?org rdfs:label ?orgName . } }
|
?org rdfs:label ?orgName . }
|
||||||
OPTIONAL { GRAPH ?g3 { ?edTraining core:degreeEarned ?degree } }
|
}
|
||||||
|
OPTIONAL { GRAPH ?g3 { ?edTraining core:degreeEarned ?degree }
|
||||||
OPTIONAL { GRAPH ?g4 { ?degree rdfs:label ?degreeName } }
|
OPTIONAL { GRAPH ?g4 { ?degree rdfs:label ?degreeName } }
|
||||||
OPTIONAL { GRAPH ?g5 { ?degree core:abbreviation ?degreeAbbr } }
|
OPTIONAL { GRAPH ?g5 { ?degree core:abbreviation ?degreeAbbr } }
|
||||||
|
}
|
||||||
OPTIONAL { GRAPH ?g6 { ?edTraining core:majorField ?majorField } }
|
OPTIONAL { GRAPH ?g6 { ?edTraining core:majorField ?majorField } }
|
||||||
OPTIONAL { GRAPH ?g7 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
|
OPTIONAL { GRAPH ?g7 { ?edTraining core:departmentOrSchool ?deptOrSchool } }
|
||||||
OPTIONAL { GRAPH ?g8 { ?edTraining core:supplementalInformation ?info } }
|
OPTIONAL { GRAPH ?g8 { ?edTraining core:supplementalInformation ?info } }
|
||||||
OPTIONAL { GRAPH ?g9 { ?edTraining core:dateTimeValue ?dateTimeValue .
|
OPTIONAL { GRAPH ?g9 { ?edTraining core:dateTimeValue ?dateTimeValue .
|
||||||
?dateTimeValue core:dateTime ?dateTime } }
|
?dateTimeValue core:dateTime ?dateTime }
|
||||||
|
}
|
||||||
} ORDER BY DESC(?dateTime)
|
} ORDER BY DESC(?dateTime)
|
||||||
</query>
|
</query>
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,14 @@
|
||||||
GRAPH ?g3 { ?person rdfs:label ?personName }
|
GRAPH ?g3 { ?person rdfs:label ?personName }
|
||||||
}
|
}
|
||||||
OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } }
|
OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } }
|
||||||
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval .
|
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval }
|
||||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart } }
|
?dateTimeStartValue core:dateTime ?dateTimeStart }
|
||||||
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval .
|
}
|
||||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
OPTIONAL { GRAPH ?g7 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd } }
|
?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
||||||
|
}
|
||||||
|
}
|
||||||
} ORDER BY DESC(?dateTimeStart) DESC(?dateTimeEnd) ?personName
|
} ORDER BY DESC(?dateTimeStart) DESC(?dateTimeEnd) ?personName
|
||||||
</query>
|
</query>
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,14 @@
|
||||||
GRAPH ?g3 { ?org rdfs:label ?orgName }
|
GRAPH ?g3 { ?org rdfs:label ?orgName }
|
||||||
}
|
}
|
||||||
OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } }
|
OPTIONAL { GRAPH ?g4 { ?position rdfs:label ?positionTitle } }
|
||||||
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval .
|
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval }
|
||||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
OPTIONAL { GRAPH ?g6 { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart } }
|
?dateTimeStartValue core:dateTime ?dateTimeStart }
|
||||||
OPTIONAL { GRAPH ?g5 { ?position core:dateTimeInterval ?dateTimeInterval .
|
}
|
||||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
OPTIONAL { GRAPH ?g7 { ?dateTimeInterval core:end ?dateTimeEndValue .
|
||||||
?dateTimeEndValue core:dateTime ?dateTimeEnd } }
|
?dateTimeEndValue core:dateTime ?dateTimeEnd }
|
||||||
|
}
|
||||||
|
}
|
||||||
} ORDER BY DESC(?dateTimeStart) DESC(?dateTimeEnd) ?orgName
|
} ORDER BY DESC(?dateTimeStart) DESC(?dateTimeEnd) ?orgName
|
||||||
</query>
|
</query>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue