From 9a67388f6a87cb034e6efe37a7a08940ef474636 Mon Sep 17 00:00:00 2001 From: stellamit Date: Mon, 15 Aug 2011 16:38:40 +0000 Subject: [PATCH] fix for sparql issues found during testing with Digital Vita team --- .../advising/adviseesDegreeAlt.sparql | 11 +++++++++++ .../advising/adviseesEducationEndDate.sparql | 12 ++++++++++++ .../adviseesEducationalInsitituionAlt.sparql | 12 ++++++++++++ .../associatedEducationalTrainingAlt.sparql | 10 ++++++++++ .../educationalTrainingEndDate.sparql | 1 + .../rich-export/funding/grantAwardedBy.sparql | 17 +++++++++++++++++ .../presentation/meetingLocation.sparql | 12 ++++++++++++ .../rich-export/presentation/meetingName.sparql | 1 + .../presentation/presentationLocation.sparql | 10 ---------- .../rich-export/publication/authors.sparql | 10 +++++++--- .../publication/presentedAtEventLocation.sparql | 5 +++-- 11 files changed, 86 insertions(+), 15 deletions(-) create mode 100644 productMods/WEB-INF/rich-export/advising/adviseesDegreeAlt.sparql create mode 100644 productMods/WEB-INF/rich-export/advising/adviseesEducationEndDate.sparql create mode 100644 productMods/WEB-INF/rich-export/advising/adviseesEducationalInsitituionAlt.sparql create mode 100644 productMods/WEB-INF/rich-export/advising/associatedEducationalTrainingAlt.sparql create mode 100644 productMods/WEB-INF/rich-export/funding/grantAwardedBy.sparql create mode 100644 productMods/WEB-INF/rich-export/presentation/meetingLocation.sparql delete mode 100644 productMods/WEB-INF/rich-export/presentation/presentationLocation.sparql diff --git a/productMods/WEB-INF/rich-export/advising/adviseesDegreeAlt.sparql b/productMods/WEB-INF/rich-export/advising/adviseesDegreeAlt.sparql new file mode 100644 index 00000000..aa9225e3 --- /dev/null +++ b/productMods/WEB-INF/rich-export/advising/adviseesDegreeAlt.sparql @@ -0,0 +1,11 @@ +PREFIX core: + +CONSTRUCT { + ?degree ?property ?object +} WHERE { + PERSON_URI core:advisorIn ?advisingRelationship . + ?advisingRelationship core:advisee ?advisee . + ?advisee core:educationalTraining ?educationalTraining . + ?educationalTraining core:degreeEarned ?degree . + ?degree ?property ?object +} \ No newline at end of file diff --git a/productMods/WEB-INF/rich-export/advising/adviseesEducationEndDate.sparql b/productMods/WEB-INF/rich-export/advising/adviseesEducationEndDate.sparql new file mode 100644 index 00000000..48b726d0 --- /dev/null +++ b/productMods/WEB-INF/rich-export/advising/adviseesEducationEndDate.sparql @@ -0,0 +1,12 @@ +PREFIX core: + +CONSTRUCT { + ?dateTimeValue ?property ?object . +} WHERE { + PERSON_URI core:advisorIn ?advisingRelationship . + ?advisingRelationship core:advisee ?advisee . + ?advisee core:educationalTraining ?educationalTraining . + ?educationalTraining core:dateTimeInterval ?dateTimeInterval . + ?dateTimeInterval core:end ?dateTimeValue . + ?dateTimeValue ?property ?object . +} \ No newline at end of file diff --git a/productMods/WEB-INF/rich-export/advising/adviseesEducationalInsitituionAlt.sparql b/productMods/WEB-INF/rich-export/advising/adviseesEducationalInsitituionAlt.sparql new file mode 100644 index 00000000..d715cc60 --- /dev/null +++ b/productMods/WEB-INF/rich-export/advising/adviseesEducationalInsitituionAlt.sparql @@ -0,0 +1,12 @@ +PREFIX core: +PREFIX rdfs: + +CONSTRUCT { + ?educationalInstitution rdfs:label ?label +} WHERE { + PERSON_URI core:advisorIn ?advisingRelationship . + ?advisingRelationship core:advisee ?advisee . + ?advisee core:educationalTraining ?educationalTraining . + ?educationalTraining core:trainingAtOrganization ?educationalInstitution . + ?educationalInstitution rdfs:label ?label +} \ No newline at end of file diff --git a/productMods/WEB-INF/rich-export/advising/associatedEducationalTrainingAlt.sparql b/productMods/WEB-INF/rich-export/advising/associatedEducationalTrainingAlt.sparql new file mode 100644 index 00000000..29a31bc9 --- /dev/null +++ b/productMods/WEB-INF/rich-export/advising/associatedEducationalTrainingAlt.sparql @@ -0,0 +1,10 @@ +PREFIX core: + +CONSTRUCT { + ?educationalTraining ?property ?object . +} WHERE { + PERSON_URI core:advisorIn ?advisingRelationship . + ?advisingRelationship core:advisee ?advisee . + ?advisee core:educationalTraining ?educationalTraining . + ?educationalTraining ?property ?object . +} \ No newline at end of file diff --git a/productMods/WEB-INF/rich-export/educationalTraining/educationalTrainingEndDate.sparql b/productMods/WEB-INF/rich-export/educationalTraining/educationalTrainingEndDate.sparql index e7a4a94c..095f8c4a 100644 --- a/productMods/WEB-INF/rich-export/educationalTraining/educationalTrainingEndDate.sparql +++ b/productMods/WEB-INF/rich-export/educationalTraining/educationalTrainingEndDate.sparql @@ -1,6 +1,7 @@ PREFIX core: CONSTRUCT { + ?dateTimeInterval core:end ?date . ?date ?property ?object . } WHERE { PERSON_URI core:educationalTraining ?educationalTraining . diff --git a/productMods/WEB-INF/rich-export/funding/grantAwardedBy.sparql b/productMods/WEB-INF/rich-export/funding/grantAwardedBy.sparql new file mode 100644 index 00000000..3afbf296 --- /dev/null +++ b/productMods/WEB-INF/rich-export/funding/grantAwardedBy.sparql @@ -0,0 +1,17 @@ +PREFIX core: +PREFIX rdf: + +CONSTRUCT { + ?awardingOrganization ?p ?o +} WHERE { + { + {PERSON_URI core:hasPrincipalInvestigatorRole ?investigatorRole } + union + {PERSON_URI core:hasCo-PrincipalInvestigatorRole ?investigatorRole } + } + + ?investigatorRole core:roleIn ?grant . + ?grant a core:Grant . + ?grant core:grantAwardedBy ?awardingOrganization . + ?awardingOrganization ?p ?o +} \ No newline at end of file diff --git a/productMods/WEB-INF/rich-export/presentation/meetingLocation.sparql b/productMods/WEB-INF/rich-export/presentation/meetingLocation.sparql new file mode 100644 index 00000000..a629e584 --- /dev/null +++ b/productMods/WEB-INF/rich-export/presentation/meetingLocation.sparql @@ -0,0 +1,12 @@ +PREFIX core: +PREFIX rdfs: + +CONSTRUCT { + ?location rdfs:label ?locationName . +} WHERE { + PERSON_URI core:hasPresenterRole ?presenterRole . + ?presenterRole core:roleIn ?presentation . + ?presentation core:eventWithin ?containingEvent . + ?containingEvent core:hasGeographicLocation ?location . + ?location rdfs:label ?locationName . +} diff --git a/productMods/WEB-INF/rich-export/presentation/meetingName.sparql b/productMods/WEB-INF/rich-export/presentation/meetingName.sparql index 7545c07a..e0a392a4 100644 --- a/productMods/WEB-INF/rich-export/presentation/meetingName.sparql +++ b/productMods/WEB-INF/rich-export/presentation/meetingName.sparql @@ -1,4 +1,5 @@ PREFIX core: +PREFIX rdfs: CONSTRUCT { ?containingEvent rdfs:label ?containingEventName diff --git a/productMods/WEB-INF/rich-export/presentation/presentationLocation.sparql b/productMods/WEB-INF/rich-export/presentation/presentationLocation.sparql deleted file mode 100644 index 3dd5c6f9..00000000 --- a/productMods/WEB-INF/rich-export/presentation/presentationLocation.sparql +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX core: - -CONSTRUCT { - ?location ?rdfs:label ?locationName . -} WHERE { - PERSON_URI core:hasPresenterRole ?presenterRole . - ?presenterRole core:roleIn ?presentation . - ?presentation core:hasGeographicLocation ?location . - ?location ?rdfs:label ?locationName . -} \ No newline at end of file diff --git a/productMods/WEB-INF/rich-export/publication/authors.sparql b/productMods/WEB-INF/rich-export/publication/authors.sparql index 420de5b0..bf4ac16a 100644 --- a/productMods/WEB-INF/rich-export/publication/authors.sparql +++ b/productMods/WEB-INF/rich-export/publication/authors.sparql @@ -1,9 +1,13 @@ PREFIX core: CONSTRUCT { - ?person ?property ?object . + ?coAuthorship ?property1 ?object1 . + ?person ?property2 ?object2 . } WHERE { PERSON_URI core:authorInAuthorship ?authorship . - ?authorship core:linkedAuthor ?person . - ?person ?property ?object . + ?authorship core:linkedInformationResource ?publication . + ?publication core:informationResourceInAuthorship ?coAuthorship . + ?coAuthorship ?property1 ?object1 . + ?coAuthorship core:linkedAuthor ?person . + ?person ?property2 ?object2 . } \ No newline at end of file diff --git a/productMods/WEB-INF/rich-export/publication/presentedAtEventLocation.sparql b/productMods/WEB-INF/rich-export/publication/presentedAtEventLocation.sparql index c993c80e..80560c0f 100644 --- a/productMods/WEB-INF/rich-export/publication/presentedAtEventLocation.sparql +++ b/productMods/WEB-INF/rich-export/publication/presentedAtEventLocation.sparql @@ -1,12 +1,13 @@ PREFIX core: PREFIX bibo: +PREFIX rdfs: CONSTRUCT { - ?location ?property ?object . + ?location rdfs:label ?locationName . } WHERE { PERSON_URI core:authorInAuthorship ?authorship . ?authorship core:linkedInformationResource ?publication . ?publication bibo:presentedAt ?event . ?event core:hasGeographicLocation ?location . - ?location ?property ?object . + ?location rdfs:label ?locationName . } \ No newline at end of file