From 91c22de27e22d8c0b91859eb7f0b7d4738042e61 Mon Sep 17 00:00:00 2001 From: sjm222 Date: Sat, 5 Feb 2011 21:27:39 +0000 Subject: [PATCH] NIHVIVO-1973 - Dates not showing up with Educational Training in migrated data --- .../sparqlConstructs/additions/atYear.sparql | 7 +++++ .../atYearEducationalTraining.sparql | 27 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYearEducationalTraining.sparql diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYear.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYear.sparql index b3028911..9f5c0b19 100644 --- a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYear.sparql +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYear.sparql @@ -20,4 +20,11 @@ Construct { ?thing core:dateTimeValue _:dtv . } where { ?thing core:year ?theDate . + + Optional { + ?thing a ?type . + ?thing a core:EducationalTraining + } + + FILTER (!bound(?type)) } \ No newline at end of file diff --git a/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYearEducationalTraining.sparql b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYearEducationalTraining.sparql new file mode 100644 index 00000000..81ccf55c --- /dev/null +++ b/productMods/WEB-INF/ontologies/update/sparqlConstructs/additions/atYearEducationalTraining.sparql @@ -0,0 +1,27 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX owl: +PREFIX swrl: +PREFIX swrlb: +PREFIX vitro: +PREFIX vivo: +PREFIX bibo: +PREFIX dcterms: +PREFIX event: +PREFIX foaf: +PREFIX skos: +PREFIX core: + +Construct { + _:edtv a core:DateTimeValue . + _:edtv core:dateTime ?theYear . + _:edtv core:dateTimePrecision core:yearPrecision . + ?thing core:dateTimeInterval _:dti . + _:dti a core:DateTimeInterval . + _:dti core:end _:edtv . + _:dti core:dateTimeIntervalFor ?thing . +} where { + ?thing core:year ?theYear . + ?thing a core:EducationalTraining . +} \ No newline at end of file