From d1806c7c9f882388aa2355e130366ae6ed79dbe7 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:02:54 +0200 Subject: [PATCH 01/26] Update select_highestScore_AnnotationOfAnswerSPARQL.rq --- .../queries/select_highestScore_AnnotationOfAnswerSPARQL.rq | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_highestScore_AnnotationOfAnswerSPARQL.rq b/qanary_commons/src/main/resources/queries/select_highestScore_AnnotationOfAnswerSPARQL.rq index c95510e4..817c0711 100644 --- a/qanary_commons/src/main/resources/queries/select_highestScore_AnnotationOfAnswerSPARQL.rq +++ b/qanary_commons/src/main/resources/queries/select_highestScore_AnnotationOfAnswerSPARQL.rq @@ -5,8 +5,8 @@ PREFIX rdf: PREFIX xsd: SELECT * +FROM ?graph WHERE { - GRAPH ?graph { ?newAnnotation rdf:type qa:AnnotationOfAnswerSPARQL . ?newAnnotation oa:hasTarget ?targetQuestion . ?newAnnotation oa:hasBody ?selectQueryThatShouldComputeTheAnswer . @@ -25,6 +25,5 @@ WHERE { ?newAnnotation oa:annotatedBy ?application . } -} ORDER BY DESC(?confidence) LIMIT 1 From 5b5dded84847c31a2a235dc2b8e9d91475f945cf Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:27:43 +0200 Subject: [PATCH 02/26] Create select_all_AnnotationOfRelation.rq --- .../queries/select_all_AnnotationOfRelation.rq | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq new file mode 100644 index 00000000..2b56c7df --- /dev/null +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq @@ -0,0 +1,16 @@ +@prefix qa: . +@prefix oa: . + + a qa:AnnotationOfRelation . + oa:hasTarget [ + a oa:SpecificResource; + oa:hasSource ?hasSource ; + oa:hasSelector [ + a oa:TextPositionSelector ; + oa:start ?start ; + oa:end ?end + ] + ] . + oa:hasBody ?hasBody ; + oa:annotatedBy ?annotatedBy ; + oa:annotatedAt ?annotatedAt . From a1ee6eb027f2098739b38dd8591f04c25ce01be0 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:40:08 +0200 Subject: [PATCH 03/26] Update select_all_AnnotationOfAnswerJson.rq --- .../queries/select_all_AnnotationOfAnswerJson.rq | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq index 52c4a138..e94647b5 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq @@ -5,8 +5,9 @@ PREFIX rdf: PREFIX rdfs: PREFIX xsd: -SELECT * WHERE { - GRAPH ?graph { +SELECT * +FROM ?graphURI +WHERE { ?annotationAnswer a qa:AnnotationOfAnswerJson ; oa:hasTarget ?question ; @@ -17,5 +18,4 @@ SELECT * WHERE { ?answer a qa:AnswerJson ; rdf:value ?answerJson . - } -} \ No newline at end of file +} From a45c9b4925cd21402744f177df9270a0878a767f Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:42:50 +0200 Subject: [PATCH 04/26] Update select_all_AnnotationOfAnswerJson.rq --- .../select_all_AnnotationOfAnswerJson.rq | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq index e94647b5..ee4f2470 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq @@ -8,14 +8,14 @@ PREFIX xsd: SELECT * FROM ?graphURI WHERE { - ?annotationAnswer - a qa:AnnotationOfAnswerJson ; - oa:hasTarget ?question ; - oa:hasBody ?answer ; - oa:annotatedBy ?service ; - oa:annotatedAt ?time ; - qa:score ?score . + ?annotationAnswer + a qa:AnnotationOfAnswerJson ; + oa:hasTarget ?question ; + oa:hasBody ?answer ; + oa:annotatedBy ?service ; + oa:annotatedAt ?time ; + qa:score ?score . ?answer - a qa:AnswerJson ; - rdf:value ?answerJson . + a qa:AnswerJson ; + rdf:value ?answerJson . } From d1f1ef6b69ecfc1e87b7bc934c96f1990974ff77 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:43:48 +0200 Subject: [PATCH 05/26] Update select_all_AnnotationOfAnswerSPARQL.rq --- .../select_all_AnnotationOfAnswerSPARQL.rq | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq index cc5476d5..d64a19b9 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq @@ -4,14 +4,13 @@ PREFIX qa: PREFIX rdf: PREFIX xsd: -SELECT * +SELECT * +FROM ?graph WHERE { - GRAPH ?graph { - ?newAnnotation rdf:type qa:AnnotationOfAnswerSPARQL . - ?newAnnotation oa:hasTarget ?targetQuestion . - ?newAnnotation oa:hasBody ?selectQueryThatShouldComputeTheAnswer . - ?newAnnotation qa:score ?confidence . - ?newAnnotation oa:annotatedAt ?time . - ?newAnnotation oa:annotatedBy ?application . - } + ?annotationId rdf:type qa:AnnotationOfAnswerSPARQL . + ?newAnnotation oa:hasTarget ?hasTarget . + ?newAnnotation oa:hasBody ?hasBody . + ?newAnnotation qa:score ?score . + ?newAnnotation oa:annotatedAt ?annotatedAt . + ?newAnnotation oa:annotatedBy ?annotatedBy . } From e5bd39300979949dd1b73ad41ad661fc5b144b3f Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:44:10 +0200 Subject: [PATCH 06/26] Update select_all_AnnotationOfAnswerJson.rq --- .../queries/select_all_AnnotationOfAnswerJson.rq | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq index ee4f2470..6c14d216 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq @@ -10,12 +10,12 @@ FROM ?graphURI WHERE { ?annotationAnswer a qa:AnnotationOfAnswerJson ; - oa:hasTarget ?question ; - oa:hasBody ?answer ; - oa:annotatedBy ?service ; - oa:annotatedAt ?time ; + oa:hasTarget ?hasTarget ; + oa:hasBody ?hasBody ; + oa:annotatedBy ?annotatedBy ; + oa:annotatedAt ?annotatedAt ; qa:score ?score . ?answer a qa:AnswerJson ; - rdf:value ?answerJson . + rdf:value ?value . } From 728c0618ca5b62f01f87604ffc7f54bfad66e67e Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:44:18 +0200 Subject: [PATCH 07/26] Update select_all_AnnotationOfAnswerJson.rq --- .../main/resources/queries/select_all_AnnotationOfAnswerJson.rq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq index 6c14d216..4d52150a 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerJson.rq @@ -15,7 +15,7 @@ WHERE { oa:annotatedBy ?annotatedBy ; oa:annotatedAt ?annotatedAt ; qa:score ?score . - ?answer + ?hasBody a qa:AnswerJson ; rdf:value ?value . } From cd19209c043a295b0fb1621fdacc9b25d16d6a49 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 12:12:30 +0200 Subject: [PATCH 08/26] Create select_all_AnnotationOfInstance --- .../queries/select_all_AnnotationOfInstance | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance new file mode 100644 index 00000000..03929709 --- /dev/null +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance @@ -0,0 +1,22 @@ +PREFIX rdf: +PREFIX oa: +PREFIX qa: + +SELECT * +FROM ?graph +WHERE { + ?annotationId rdf:type qa:AnnotationOfInstance . + ?annotationId oa:hasTarget [ + a oa:SpecificResource; + oa:hasSource ?hasSource; + oa:hasSelector [ + a oa:TextPositionSelector; + oa:start ?start; + oa:end ?end; + ] + ]. + ?annotationId oa:hasBody ?hasBody ; + oa:annotatedBy ?annotatedBy ; + oa:annotatedAt ?annotatedAt ; + qa:score ?score . +} From f16932695de804dd35f738c8d2ebcdee4466277e Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:35:03 +0200 Subject: [PATCH 09/26] Delete qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance --- .../queries/select_all_AnnotationOfInstance | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance deleted file mode 100644 index 03929709..00000000 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance +++ /dev/null @@ -1,22 +0,0 @@ -PREFIX rdf: -PREFIX oa: -PREFIX qa: - -SELECT * -FROM ?graph -WHERE { - ?annotationId rdf:type qa:AnnotationOfInstance . - ?annotationId oa:hasTarget [ - a oa:SpecificResource; - oa:hasSource ?hasSource; - oa:hasSelector [ - a oa:TextPositionSelector; - oa:start ?start; - oa:end ?end; - ] - ]. - ?annotationId oa:hasBody ?hasBody ; - oa:annotatedBy ?annotatedBy ; - oa:annotatedAt ?annotatedAt ; - qa:score ?score . -} From 1da83d9a124cbe2e40c5310c55b82d07010c40e5 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:35:28 +0200 Subject: [PATCH 10/26] Create select_all_AnnotationOfInstance.rq --- .../select_all_AnnotationOfInstance.rq | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq new file mode 100644 index 00000000..03929709 --- /dev/null +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq @@ -0,0 +1,22 @@ +PREFIX rdf: +PREFIX oa: +PREFIX qa: + +SELECT * +FROM ?graph +WHERE { + ?annotationId rdf:type qa:AnnotationOfInstance . + ?annotationId oa:hasTarget [ + a oa:SpecificResource; + oa:hasSource ?hasSource; + oa:hasSelector [ + a oa:TextPositionSelector; + oa:start ?start; + oa:end ?end; + ] + ]. + ?annotationId oa:hasBody ?hasBody ; + oa:annotatedBy ?annotatedBy ; + oa:annotatedAt ?annotatedAt ; + qa:score ?score . +} From 1b858ea3f730bc63b74043145a7b3654d427c4ad Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:37:49 +0200 Subject: [PATCH 11/26] Create select_all_AnnotationOfClass.rq --- .../queries/select_all_AnnotationOfClass.rq | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq new file mode 100644 index 00000000..f4a99d04 --- /dev/null +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq @@ -0,0 +1,16 @@ +@prefix qa: . +@prefix oa: . +@prefix xsd: . + +SELECT * +FROM ?graph +WHERE { +?annotationId a qa:AnnotationOfClass . +?annotationId oa:hasTarget [ + a oa:SpecificClass ; + oa:hasSource ?hasSource ; +] . +?annotationId oa:hasBody ?hasBody ; + oa:annotatedBy ?annotatedBy ; + oa:annotatedAt ?annotatedAt . + } From 9f7947a831117541dd927d7bf75a9886e0353237 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:02:20 +0200 Subject: [PATCH 12/26] Update select_all_AnnotationOfAnswerSPARQL.rq --- .../queries/select_all_AnnotationOfAnswerSPARQL.rq | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq index d64a19b9..b99540b6 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq @@ -8,9 +8,9 @@ SELECT * FROM ?graph WHERE { ?annotationId rdf:type qa:AnnotationOfAnswerSPARQL . - ?newAnnotation oa:hasTarget ?hasTarget . - ?newAnnotation oa:hasBody ?hasBody . - ?newAnnotation qa:score ?score . - ?newAnnotation oa:annotatedAt ?annotatedAt . - ?newAnnotation oa:annotatedBy ?annotatedBy . + ?annotationId oa:hasTarget ?hasTarget ; + oa:hasBody ?hasBody ; + qa:score ?score ; + oa:annotatedAt ?annotatedAt ; + oa:annotatedBy ?annotatedBy . } From 7dbcdf07042e728f7aa74f1a2aff34e316596bcc Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:22:01 +0200 Subject: [PATCH 13/26] Create select_all_AnnotationOfSpotInstance.rq --- .../select_all_AnnotationOfSpotInstance.rq | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq new file mode 100644 index 00000000..bc55a94d --- /dev/null +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq @@ -0,0 +1,20 @@ +PREFIX rdf: +PREFIX oa: +PREFIX qa: + +SELECT * +FROM ?graph +WHERE { + ?annotationId rdf:type qa:AnnotationOfSpotInstance. + ?annotationId oa:hasTarget [ + a oa:SpecificResource; + oa:hasSource ?hasSource; + oa:hasSelector [ + a oa:TextPositionSelector; + oa:start ?start; + oa:end ?end; + ] + ]. + ?annotationId oa:annotatedAt ?annotatedAt ; + oa:annotatedBy ?annotatedBy . +} From a9947e8a49c5aef465cca00c76c6d0b0eac1cbec Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:25:37 +0200 Subject: [PATCH 14/26] Create select_all_AnnotationOfQuestionLanguage.rq --- .../select_all_AnnotationOfQuestionLanguage.rq | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq new file mode 100644 index 00000000..0dd3faba --- /dev/null +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq @@ -0,0 +1,13 @@ +@prefix qa: . +@prefix oa: . +@prefix xsd: . + +SELECT * +FROM ?graph +WHERE { +?annotationId a qa:AnnotationOfQuestionLanguage . +?annotationId oa:hasTarget ?hasTarget ; + oa:hasBody ?hasBody ; + oa:annotatedBy ?annotatedBy ; + oa:annotatedAt ?annotatedAt . + } From f5ade41ba15e7faa8af0751b75a3a427c877319b Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:31:00 +0200 Subject: [PATCH 15/26] Create select_all_AnnotationOfTextAnswerJson.rq --- .../select_all_AnnotationOfTextAnswerJson.rq | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq new file mode 100644 index 00000000..a3490000 --- /dev/null +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq @@ -0,0 +1,19 @@ +PREFIX qa: +PREFIX oa: +PREFIX dbr: +PREFIX rdf: +PREFIX xsd: +PREFIX rdfs: + +SELECT * +FROM ?graph +WHERE { + ?annotationId rdf:type qa:AnnotationOfTextAnswerJson . + ?annotationId oa:hasTarget ?hasTarget + ?annotationId oa:hasBody ?hasBody . + ?annotationId oa:annotatedAt ?annotatedAt . + ?annotationId oa:annotatedBy . + ?hasBody rdf:type qa:AnswerJson . + ?hasBody rdf:value ?value . + qa:AnswerJson rdfs:subClassOf qa:Answer . + } From 9fe0b0be09f8b6ea12269ea0c69805b41db51924 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Tue, 19 Sep 2023 09:28:23 +0200 Subject: [PATCH 16/26] Update select_all_AnnotationOfInstance.rq --- .../resources/queries/select_all_AnnotationOfInstance.rq | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq index 03929709..91ecbbc7 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq @@ -17,6 +17,8 @@ WHERE { ]. ?annotationId oa:hasBody ?hasBody ; oa:annotatedBy ?annotatedBy ; - oa:annotatedAt ?annotatedAt ; - qa:score ?score . -} + oa:annotatedAt ?annotatedAt . + OPTIONAL { + ?annotationId qa:score ?score . + } + } From fbe60d8fc65e6be3b6d472f1c5a30a6a960a233b Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:24:37 +0200 Subject: [PATCH 17/26] Update select_all_AnnotationOfQuestionLanguage.rq --- .../queries/select_all_AnnotationOfQuestionLanguage.rq | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq index 0dd3faba..19f926cd 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq @@ -1,6 +1,6 @@ -@prefix qa: . -@prefix oa: . -@prefix xsd: . +Prefix qa: +Prefix oa: +Prefix xsd: SELECT * FROM ?graph From 1d03cae312c8dde7d098f2601e4bff218e93dbc1 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:25:08 +0200 Subject: [PATCH 18/26] Update select_all_AnnotationOfRelation.rq --- .../main/resources/queries/select_all_AnnotationOfRelation.rq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq index 2b56c7df..c8915f27 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq @@ -1,5 +1,5 @@ -@prefix qa: . -@prefix oa: . +PREFIX qa: +PREFIX oa: a qa:AnnotationOfRelation . oa:hasTarget [ From 1036dda4af6dc260485974f0344a2053887dd6f2 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:25:38 +0200 Subject: [PATCH 19/26] Update select_all_AnnotationOfClass.rq --- .../main/resources/queries/select_all_AnnotationOfClass.rq | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq index f4a99d04..f377111d 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfClass.rq @@ -1,6 +1,6 @@ -@prefix qa: . -@prefix oa: . -@prefix xsd: . +PREFIX qa: +PREFIX oa: +PREFIX xsd: SELECT * FROM ?graph From a0181758a460ca096da09d1417239d829e4fdedb Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:25:52 +0200 Subject: [PATCH 20/26] Update select_all_AnnotationOfQuestionLanguage.rq --- .../queries/select_all_AnnotationOfQuestionLanguage.rq | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq index 19f926cd..69b53d65 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionLanguage.rq @@ -1,6 +1,6 @@ -Prefix qa: -Prefix oa: -Prefix xsd: +PREFIX qa: +PREFIX oa: +PREFIX xsd: SELECT * FROM ?graph From 43caa0b1f64bc32505e5744c7bd43dabc5786282 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:37:30 +0200 Subject: [PATCH 21/26] Update select_all_AnnotationOfTextAnswerJson.rq --- .../resources/queries/select_all_AnnotationOfTextAnswerJson.rq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq index a3490000..c1f1ec17 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfTextAnswerJson.rq @@ -12,7 +12,7 @@ WHERE { ?annotationId oa:hasTarget ?hasTarget ?annotationId oa:hasBody ?hasBody . ?annotationId oa:annotatedAt ?annotatedAt . - ?annotationId oa:annotatedBy . + ?annotationId oa:annotatedBy ?annotatedBy . ?hasBody rdf:type qa:AnswerJson . ?hasBody rdf:value ?value . qa:AnswerJson rdfs:subClassOf qa:Answer . From 7332d8454658689196ddf7672ac7f012824d61b8 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:41:43 +0200 Subject: [PATCH 22/26] Update select_all_AnnotationOfAnswerSPARQL.rq --- .../queries/select_all_AnnotationOfAnswerSPARQL.rq | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq index b99540b6..d9ef6230 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfAnswerSPARQL.rq @@ -9,8 +9,10 @@ FROM ?graph WHERE { ?annotationId rdf:type qa:AnnotationOfAnswerSPARQL . ?annotationId oa:hasTarget ?hasTarget ; - oa:hasBody ?hasBody ; - qa:score ?score ; - oa:annotatedAt ?annotatedAt ; + oa:hasBody ?hasBody . + OPTIONAL { + ?annotationnId qa:score ?score ; + } + ?annotationId oa:annotatedAt ?annotatedAt ; oa:annotatedBy ?annotatedBy . } From 3bcbc480cc37b75d6f1da04be52023c963869df3 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:51:11 +0200 Subject: [PATCH 23/26] Update select_all_AnnotationOfQuestionTranslation.rq --- .../select_all_AnnotationOfQuestionTranslation.rq | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionTranslation.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionTranslation.rq index 8774205e..599f09b4 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionTranslation.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfQuestionTranslation.rq @@ -1,11 +1,14 @@ PREFIX qa: PREFIX oa: -SELECT ?a ?translation ?time +SELECT * FROM ?graph WHERE { - ?a a qa:AnnotationOfQuestionTranslation . - ?a oa:hasTarget ?targetQuestion . - ?a oa:hasBody ?translation . - FILTER (lang(?translation) = ?language). + ?annotationId a qa:AnnotationOfQuestionTranslation . + ?annotationId oa:hasTarget ?hasTarget ; + oa:hasBody ?hasBody ; + oa:annotatedBy ?annotatedBy ; + oa:annotatedAt ?annotatedAt . + FILTER (lang(?hasBody) = ?language). } + From 1c6668775e3887f329d0e6c1a525b502fa3cce2e Mon Sep 17 00:00:00 2001 From: Andreas Both Date: Mon, 2 Oct 2023 04:25:32 +0200 Subject: [PATCH 24/26] Update select_all_AnnotationOfInstance.rq --- .../queries/select_all_AnnotationOfInstance.rq | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq index 91ecbbc7..97f198e2 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfInstance.rq @@ -7,18 +7,18 @@ FROM ?graph WHERE { ?annotationId rdf:type qa:AnnotationOfInstance . ?annotationId oa:hasTarget [ - a oa:SpecificResource; + a oa:SpecificResource; oa:hasSource ?hasSource; oa:hasSelector [ - a oa:TextPositionSelector; - oa:start ?start; - oa:end ?end; - ] - ]. + a oa:TextPositionSelector; + oa:start ?start; + oa:end ?end + ] + ]. ?annotationId oa:hasBody ?hasBody ; oa:annotatedBy ?annotatedBy ; oa:annotatedAt ?annotatedAt . OPTIONAL { - ?annotationId qa:score ?score . + ?annotationId qa:score ?score . } - } +} From 47fd1a542a3826ae4599b7e991fcf5e1e43b0522 Mon Sep 17 00:00:00 2001 From: Andreas Both Date: Mon, 2 Oct 2023 04:28:22 +0200 Subject: [PATCH 25/26] Update select_all_AnnotationOfSpotInstance.rq --- .../queries/select_all_AnnotationOfSpotInstance.rq | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq index bc55a94d..b0da197f 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfSpotInstance.rq @@ -7,14 +7,14 @@ FROM ?graph WHERE { ?annotationId rdf:type qa:AnnotationOfSpotInstance. ?annotationId oa:hasTarget [ - a oa:SpecificResource; + a oa:SpecificResource; oa:hasSource ?hasSource; oa:hasSelector [ - a oa:TextPositionSelector; - oa:start ?start; - oa:end ?end; - ] - ]. + a oa:TextPositionSelector; + oa:start ?start; + oa:end ?end . + ] + ]. ?annotationId oa:annotatedAt ?annotatedAt ; oa:annotatedBy ?annotatedBy . } From 4d6e16952ca30743b9eb45ffa7c8aaacb9818d20 Mon Sep 17 00:00:00 2001 From: Dennis Schiese <135758800+dschiese@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:43:15 +0200 Subject: [PATCH 26/26] Update select_all_AnnotationOfRelation.rq --- .../select_all_AnnotationOfRelation.rq | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq index c8915f27..43a95872 100644 --- a/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq +++ b/qanary_commons/src/main/resources/queries/select_all_AnnotationOfRelation.rq @@ -1,16 +1,29 @@ + + PREFIX qa: PREFIX oa: - a qa:AnnotationOfRelation . - oa:hasTarget [ +SELECT * +FROM ?graph +WHERE { +?annotationId a qa:AnnotationOfRelation . +?annotationId oa:hasTarget [ a oa:SpecificResource; - oa:hasSource ?hasSource ; + oa:hasSource ?hasSource + ] . + OPTIONAL { + ?annotationId oa:hasTarget [ oa:hasSelector [ a oa:TextPositionSelector ; oa:start ?start ; oa:end ?end - ] + ] ] . - oa:hasBody ?hasBody ; +} +OPTIONAL { +?annotationId qa:score ?score . +} +?annotationId oa:hasBody ?hasBody ; oa:annotatedBy ?annotatedBy ; oa:annotatedAt ?annotatedAt . +}