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 }
|
||||
OPTIONAL { GRAPH ?g2 { ?authorship core:linkedInformationResource ?infoResource }
|
||||
GRAPH ?g3 { ?infoResource rdfs:label ?infoResourceName }
|
||||
}
|
||||
OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf core:InformationResource }
|
||||
GRAPH ?g5 { ?infoResource a ?subclass }
|
||||
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
|
||||
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
||||
}
|
||||
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime . } }
|
||||
OPTIONAL { GRAPH ?g4 { ?subclass rdfs:subClassOf core:InformationResource }
|
||||
GRAPH ?g5 { ?infoResource a ?subclass }
|
||||
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
|
||||
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
|
||||
}
|
||||
OPTIONAL { GRAPH ?g6 { ?infoResource core:dateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime . }
|
||||
}
|
||||
}
|
||||
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
|
||||
</query>
|
||||
|
||||
|
|
|
@ -12,20 +12,21 @@
|
|||
SELECT DISTINCT ?edTraining (afn:localname(?edTraining) AS ?edTrainingName) ?org ?orgName
|
||||
?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime
|
||||
WHERE {
|
||||
|
||||
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 } }
|
||||
?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:dateTimeValue ?dateTimeValue .
|
||||
?dateTimeValue core:dateTime ?dateTime } }
|
||||
|
||||
} ORDER BY DESC(?dateTime)
|
||||
?dateTimeValue core:dateTime ?dateTime }
|
||||
}
|
||||
} ORDER BY DESC(?dateTime)
|
||||
</query>
|
||||
|
||||
<template>propStatement-educationalTraining.ftl</template>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
OPTIONAL { GRAPH ?g2 { ?authorship core:authorRank ?rank } }
|
||||
OPTIONAL { GRAPH ?g3 { ?authorship core:linkedAuthor ?person }
|
||||
GRAPH ?g4 { ?person rdfs:label ?personName }
|
||||
}
|
||||
}
|
||||
} ORDER BY ?rank ?personName
|
||||
</query>
|
||||
|
||||
|
|
|
@ -14,14 +14,16 @@
|
|||
GRAPH ?g1 { ?subject ?property ?position }
|
||||
OPTIONAL { GRAPH ?g2 { ?position core:positionForPerson ?person }
|
||||
GRAPH ?g3 { ?person rdfs:label ?personName }
|
||||
}
|
||||
}
|
||||
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) ?personName
|
||||
</query>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue