Skip to content

Commit

Permalink
Added number of annotations to pipeline explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
dschiese committed Jun 19, 2024
1 parent 7a8e8c2 commit c8ae0b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public String getComposedExplanation(String graph, String component) throws IOEx
String explanation = null;
String inputExplanation = null;
String outputExplanation = null;
if (component == null) {
if (component == null) { // Pipeline explanation
inputExplanation = explainPipelineInput(graph);
outputExplanation = explainPipelineOutput(graph);
} else {
Expand Down
15 changes: 12 additions & 3 deletions src/main/resources/queries/select_pipeline_information.rq
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX qa: <http://www.wdaqua.eu/qa#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX urn: <http://fliqz.com/>
PREFIX oa: <http://www.w3.org/ns/openannotation/core/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT DISTINCT ?component ?questionId
SELECT (COUNT(?s) AS ?annotations) ?component ?questionId
FROM ?graph
WHERE {
?s oa:annotatedBy ?component .
?questionId owl:sameAs <urn:qanary:currentQuestion> .
}
?s rdf:type ?type .
FILTER NOT EXISTS { ?type rdfs:subClassOf qa:AnnotationOfLog }
OPTIONAL {
?questionId owl:sameAs <urn:qanary:currentQuestion> .
}
}
GROUP BY ?component ?questionId

0 comments on commit c8ae0b7

Please sign in to comment.