File tree Expand file tree Collapse file tree 8 files changed +102
-27
lines changed
Expand file tree Collapse file tree 8 files changed +102
-27
lines changed Original file line number Diff line number Diff line change @@ -57,5 +57,5 @@ The web-UI will then (probably) be available at:
5757
5858< http://localhost:3030/#/dataset/okh/query >
5959
60- You can now try your first [ sample query] ( res/sample-query.txt )
60+ You can now try your first [ sample query] ( res/sample-queries/list-projects.sparql )
6161on the OKH data.
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2025 Robin Vobruba <[email protected] >2+ #
3+ # SPDX-License-Identifier: Unlicense
4+
5+ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
6+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
7+ PREFIX ods: <http://w3id.org/oseg/ont/ods#>
8+ PREFIX okh: <http://w3id.org/oseg/ont/okh#>
9+ PREFIX otrl: <http://purl.org/oseg/ontologies/OTRL#>
10+
11+ # Count all projects (aka modules)
12+ SELECT (COUNT (* ) AS ?count )
13+ WHERE {
14+ ?proj a okh:Module
15+ }
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2025 Robin Vobruba <[email protected] >2+ #
3+ # SPDX-License-Identifier: Unlicense
4+
5+ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
6+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
7+ PREFIX ods: <http://w3id.org/oseg/ont/ods#>
8+ PREFIX okh: <http://w3id.org/oseg/ont/okh#>
9+ PREFIX otrl: <http://purl.org/oseg/ontologies/OTRL#>
10+
11+ # First 100 projects with "bambulab" (case-insensitive)
12+ # in their name
13+ SELECT distinct ?proj ?label
14+ WHERE {
15+ ?proj a okh:Module .
16+ ?proj okh:name ?label .
17+ FILTER (CONTAINS (lcase(str(?label )), " bambulab" ))
18+ }
19+ LIMIT 100
Original file line number Diff line number Diff line change 44
55PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
66PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
7- #PREFIX bd: <http://www.bigdata.com/rdf#>
87PREFIX ods: <http://w3id.org/oseg/ont/ods#>
98PREFIX okh: <http://w3id.org/oseg/ont/okh#>
109PREFIX otrl: <http://purl.org/oseg/ontologies/OTRL#>
11- PREFIX wf: <https://wikifactory.com/>
12- PREFIX ap: <https://www.appropedia.org/>
13- PREFIX wfs: <https://wikifactory.com/@shirako/>
1410PREFIX loshdummymosha: <https://github.com/OPEN-NEXT/LOSH-dummy-MOSH-A/1.0.0#>
1511PREFIX ohloom: <https://gitlab.com/OSEGermany/ohloom/1.0.0#>
1612
17- # All triples
18- #SELECT ?subject ?predicate ?object
19- #WHERE {
20- # ?subject ?predicate ?object
21- #}
22-
23- # All Projects type triples
24- #SELECT ?subject ?predicate ?object
25- #WHERE {
26- # ?subject rdf:type okh:Module
27- #}
28-
2913# All Projects names and their licenses
30- #SELECT ?name ?license
31- #WHERE {
32- # ?subject rdf:type okh:Module ;
33- # rdfs:label ?name ;
34- # ods:license ?license
35- #}
36-
37- SELECT (COUNT(*) AS ?count)
14+ SELECT ?name ?license
3815WHERE {
39- ?proj a okh:Module
16+ ?subject rdf:type okh:Module ;
17+ rdfs:label ?name ;
18+ ods:license ?license
4019}
20+ LIMIT 100
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2025 Robin Vobruba <[email protected] >2+ #
3+ # SPDX-License-Identifier: Unlicense
4+
5+ PREFIX ods: <http://w3id.org/oseg/ont/ods#>
6+ PREFIX okh: <http://w3id.org/oseg/ont/okh#>
7+ PREFIX owl: <http://www.w3.org/2002/07/owl#>
8+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9+ PREFIX otrl: <http://w3id.org/oseg/ont/otrl#>
10+ PREFIX spdxt: <http://spdx.org/rdf/terms#>
11+ PREFIX ap: <https://www.appropedia.org/>
12+
13+ # All (direct) triples of a project (aka module)
14+ SELECT ?pred ?obj
15+ WHERE {
16+ <https://www.appropedia.org/40/Bamboo_demonstration_motor/project> ?pred ?obj
17+ }
18+ LIMIT 100
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2025 Robin Vobruba <[email protected] >2+ #
3+ # SPDX-License-Identifier: Unlicense
4+
5+ PREFIX ods: <http://w3id.org/oseg/ont/ods#>
6+ PREFIX okh: <http://w3id.org/oseg/ont/okh#>
7+ PREFIX owl: <http://www.w3.org/2002/07/owl#>
8+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9+ PREFIX otrl: <http://w3id.org/oseg/ont/otrl#>
10+ PREFIX spdxt: <http://spdx.org/rdf/terms#>
11+
12+ SELECT ?license
13+ WHERE {
14+ ?subj a okh:Module .
15+ ?subj ods:license ?license
16+ }
17+ GROUP BY ?license
18+ LIMIT 100
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2025 Robin Vobruba <[email protected] >2+ #
3+ # SPDX-License-Identifier: Unlicense
4+
5+ PREFIX ods: <http://w3id.org/oseg/ont/ods#>
6+ PREFIX okh: <http://w3id.org/oseg/ont/okh#>
7+ PREFIX owl: <http://www.w3.org/2002/07/owl#>
8+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9+ PREFIX otrl: <http://w3id.org/oseg/ont/otrl#>
10+ PREFIX spdxt: <http://spdx.org/rdf/terms#>
11+
12+ # All projects with a specific license
13+ SELECT ?subj ?name ?license
14+ WHERE {
15+ ?subj a okh:Module .
16+ ?subj okh:name ?name .
17+ ?subj ods:license ?license .
18+ ?subj ods:license spdxt:CC-BY -SA-3.0
19+ #?subj ods:license spdxt:CC-BY-SA-4.0
20+ #?subj ods:license spdxt:GPL-3.0-or-later
21+ #?subj ods:license spdxt:Unlicense
22+ #?subj ods:license spdxt:CC0-1.0
23+ #?subj ods:license spdxt:Apache-2.0
24+ }
25+ LIMIT 100
Original file line number Diff line number Diff line change 308308echo " for example:"
309309echo " $jena_db_data_querier \\ "
310310echo " --loc \" $db_dir \" \\ "
311- echo " --query \" $res_dir /sample-query.txt \" "
311+ echo " --query \" $res_dir /sample-queries/list-projects.sparql \" "
312312echo
313313echo " Or start the Web interface for running SPARQL queries with:"
314314echo " run/web-ui"
You can’t perform that action at this time.
0 commit comments