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 . +}