Skip to content

Commit 38bb740

Browse files
committed
Add example inspection queries about FF datafields usage
1 parent 07b2960 commit 38bb740

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
2+
@prefix ff: <https://foerderfunke.org/default#>.
3+
4+
ff:graph a ff:Graph;
5+
ff:hasId "graph_2025-11-24_12-58-57";
6+
ff:hasName "barcamp-session";
7+
ff:hasExportTimestamp "2025-11-25T13:37:46.678Z";
8+
ff:hasTranslateX 414;
9+
ff:hasTranslateY 120;
10+
ff:hasNode ff:node1, ff:node2, ff:node3, ff:node4, ff:node5, ff:node6, ff:node7;
11+
ff:hasEdge ff:edge1, ff:edge2, ff:edge3, ff:edge4, ff:edge5, ff:edge6.
12+
ff:node1 a ff:Node;
13+
ff:hasClass ff:ExternalTurtleFilesInputNode;
14+
ff:hasName "All FörderFunke triples";
15+
ff:hasPosX -363;
16+
ff:hasPosY 63;
17+
ff:hasWidth 874;
18+
ff:hasHeight 133;
19+
ff:hasValue "https://raw.githubusercontent.com/Citizen-Knowledge-Graph/knowledge-base/refs/heads/main/build/rps.built.ttl\nhttps://raw.githubusercontent.com/Citizen-Knowledge-Graph/knowledge-base/refs/heads/main/build/def.built.ttl".
20+
ff:node2 a ff:Node;
21+
ff:hasClass ff:SparqlInputNode;
22+
ff:hasName "Collecting constraints on datafields across requirement profiles";
23+
ff:hasPosX "787";
24+
ff:hasPosY "-99";
25+
ff:hasWidth 548;
26+
ff:hasHeight 594;
27+
ff:hasValue "PREFIX sh: <http://www.w3.org/ns/shacl#>\nPREFIX ff: <https://foerderfunke.org/default#>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT ?requirementProfile ?datafield ?constraintType\n (GROUP_CONCAT(?value; separator=\", \") AS ?constraintValue)\nWHERE {\n ?root ff:hasMainShape ?mainShape ;\n ff:title ?requirementProfile .\n \t\tFILTER(LANG(?requirementProfile) = \"de\")\n ?mainShape\n ( sh:property\n | sh:or\n | sh:and\n | sh:not\n | rdf:first\n | rdf:rest\n )*\n ?propShape .\n\n ?propShape sh:path ?path .\n ?path rdfs:label ?datafield .\n FILTER(LANG(?datafield) = \"de\")\n\n {\n ?propShape ?constraintType ?constraintValueRaw .\n\n FILTER(\n ?constraintType != sh:path &&\n ?constraintType != sh:message &&\n ?constraintType != sh:minCount &&\n ?constraintType != sh:not &&\n ?constraintType != sh:in\n )\n\n BIND(STR(?constraintValueRaw) AS ?value)\n }\n UNION\n {\n ?propShape sh:in ?posList .\n ?posList rdf:rest*/rdf:first ?item .\n\n BIND(sh:in AS ?constraintType)\n BIND(STR(?item) AS ?value)\n }\n UNION\n {\n SELECT ?root ?path ?constraintType\n (CONCAT(\"NOT (\", GROUP_CONCAT(STR(?negItem); separator=\", \"), \")\") AS ?value)\n WHERE {\n ?root ff:hasMainShape ?mainShape .\n\n ?mainShape\n ( sh:property\n | sh:or\n | sh:and\n | sh:not\n | rdf:first\n | rdf:rest\n )*\n ?propShape .\n\n ?propShape sh:path ?path ;\n sh:not ?notNode .\n\n ?notNode sh:in ?negList .\n ?negList rdf:rest*/rdf:first ?negItem .\n\n BIND(sh:in AS ?constraintType)\n }\n GROUP BY ?root ?path ?constraintType\n }\n}\nGROUP BY ?requirementProfile ?datafield ?constraintType\nORDER BY ?datafield ?requirementProfile ?constraintType".
28+
ff:node3 a ff:Node;
29+
ff:hasClass ff:SparqlInputNode;
30+
ff:hasName "Datafield reuse across requirement profiles";
31+
ff:hasPosX "-378";
32+
ff:hasPosY "596";
33+
ff:hasValue "PREFIX sh: <http://www.w3.org/ns/shacl#>\nPREFIX ff: <https://foerderfunke.org/default#>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\nSELECT ?datafield\n (COUNT(DISTINCT ?root) AS ?occurences)\n (GROUP_CONCAT(DISTINCT ?rootLocal; separator=\", \") AS ?RPs)\nWHERE {\n ?root ff:hasMainShape ?mainShape .\n\n BIND(IRI(STR(?root)) AS ?rootIRI)\n BIND(\n REPLACE(STR(?rootIRI), '^.*[/#]', '')\n AS ?rootLocal\n )\n ?mainShape\n ( sh:property\n | sh:or\n | sh:and\n | sh:not\n | rdf:first\n | rdf:rest\n )*\n ?propShape .\n\n ?propShape sh:path ?path .\n \n ?path rdfs:label ?datafield .\n FILTER(LANG(?datafield) = \"de\")\n}\nGROUP BY ?path ?datafield\nORDER BY DESC(?occurences)".
34+
ff:node4 a ff:Node;
35+
ff:hasClass ff:SparqlInputNode;
36+
ff:hasName "Datafields being used per requirement profile";
37+
ff:hasPosX -1185;
38+
ff:hasPosY 1312;
39+
ff:hasWidth 566;
40+
ff:hasHeight 419;
41+
ff:hasValue "PREFIX sh: <http://www.w3.org/ns/shacl#>\nPREFIX ff: <https://foerderfunke.org/default#>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n\nSELECT ?requirementProfile (COUNT(DISTINCT ?path) AS ?datafields)\nWHERE {\n ?root ff:hasMainShape ?mainShape ;\n ff:title ?requirementProfile .\n \t\tFILTER(LANG(?requirementProfile) = \"de\")\n ?mainShape\n ( sh:property\n | sh:or\n | sh:and\n | sh:not\n | rdf:first\n | rdf:rest\n )*\n ?propShape .\n\n ?propShape sh:path ?path .\n}\nGROUP BY ?requirementProfile\nORDER BY DESC(?datafields)".
42+
ff:node5 a ff:Node;
43+
ff:hasClass ff:SparqlSelectExecNode;
44+
ff:hasName "Run SPARQL SELECT";
45+
ff:hasPosX 788;
46+
ff:hasPosY 518;
47+
ff:hasWidth 1521;
48+
ff:hasHeight 8998.
49+
ff:node6 a ff:Node;
50+
ff:hasClass ff:SparqlSelectExecNode;
51+
ff:hasName "Run SPARQL SELECT";
52+
ff:hasPosX "67";
53+
ff:hasPosY "593".
54+
ff:node7 a ff:Node;
55+
ff:hasClass ff:SparqlSelectExecNode;
56+
ff:hasName "Run SPARQL SELECT";
57+
ff:hasPosX -574;
58+
ff:hasPosY 1307.
59+
ff:edge1 a ff:Edge;
60+
ff:hasSource ff:node1;
61+
ff:hasTarget ff:node6;
62+
ff:hasPortOut 1;
63+
ff:hasPortIn 1.
64+
ff:edge2 a ff:Edge;
65+
ff:hasSource ff:node1;
66+
ff:hasTarget ff:node7;
67+
ff:hasPortOut 1;
68+
ff:hasPortIn 1.
69+
ff:edge3 a ff:Edge;
70+
ff:hasSource ff:node2;
71+
ff:hasTarget ff:node5;
72+
ff:hasPortOut 1;
73+
ff:hasPortIn 1.
74+
ff:edge4 a ff:Edge;
75+
ff:hasSource ff:node3;
76+
ff:hasTarget ff:node6;
77+
ff:hasPortOut 1;
78+
ff:hasPortIn 2.
79+
ff:edge5 a ff:Edge;
80+
ff:hasSource ff:node4;
81+
ff:hasTarget ff:node7;
82+
ff:hasPortOut 1;
83+
ff:hasPortIn 2.
84+
ff:edge6 a ff:Edge;
85+
ff:hasSource ff:node1;
86+
ff:hasTarget ff:node5;
87+
ff:hasPortOut 1;
88+
ff:hasPortIn 2.
File renamed without changes.

0 commit comments

Comments
 (0)