Skip to content

Commit

Permalink
chore: rm sparql graph specification from queries
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsOveTen committed Mar 19, 2024
1 parent 0a2cd46 commit fe110ad
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
sessions: tests
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "7ae7a4ad-1c7c-47a1-8f83-c154ca98dbba",
"name" : "",
"request" : {
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+skos:+%3Chttp://www.w3.org/2004/02/skos/core%23%3E%0A++++++++SELECT+?organizationNumber+(COUNT(DISTINCT+?concept)+AS+?count)%0A++++++++FROM+%3Chttps://concepts.fellesdatakatalog.digdir.no%3E%0A++++++++WHERE+%7B%7B%0A++++++++++++?concept+a+skos:Concept+.%0A++++++++++++?concept+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+?organizationNumber+.%0A++++++++%7D%7D%0A++++++++GROUP+BY+?organizationNumber%0A++++",
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+skos:+%3Chttp://www.w3.org/2004/02/skos/core%23%3E%0A++++++++SELECT+?organizationNumber+(COUNT(DISTINCT+?concept)+AS+?count)%0A++++++++WHERE+%7B%7B%0A++++++++++++?concept+a+skos:Concept+.%0A++++++++++++?record+foaf:primaryTopic+?concept+.%0A++++++++++++?record+a+dcat:CatalogRecord+.%0A++++++++++++?concept+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+?organizationNumber+.%0A++++++++%7D%7D%0A++++++++GROUP+BY+?organizationNumber%0A++++",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "0c8a2616-6a9b-4394-b0e3-33074d8c870f",
"name" : "",
"request" : {
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+skos:+%3Chttp://www.w3.org/2004/02/skos/core%23%3E%0A++++++++SELECT+DISTINCT+?concept+?issued%0A++++++++FROM+%3Chttps://concepts.fellesdatakatalog.digdir.no%3E%0A++++++++WHERE+%7B%7B%0A++++++++++++?concept+a+skos:Concept+.%0A++++++++++++?record+foaf:primaryTopic+?concept+.%0A++++++++++++?record+dct:issued+?issued+.%0A++++++++++++?concept+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+%22910258028%22+.%0A++++++++%7D%7D%0A++++",
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+skos:+%3Chttp://www.w3.org/2004/02/skos/core%23%3E%0A++++++++SELECT+DISTINCT+?concept+?issued%0A++++++++WHERE+%7B%7B%0A++++++++++++?concept+a+skos:Concept+.%0A++++++++++++?record+foaf:primaryTopic+?concept+.%0A++++++++++++%3Frecord+a+dcat:CatalogRecord+.%0A++++++++++++?record+dct:issued+?issued+.%0A++++++++++++?concept+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+%22910258028%22+.%0A++++++++%7D%7D%0A++++",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "f3c0e9ca-934e-4ea1-bc1d-4e496da56b54",
"name" : "",
"request" : {
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+skos:+%3Chttp://www.w3.org/2004/02/skos/core%23%3E%0A++++++++SELECT+DISTINCT+?concept+?issued%0A++++++++FROM+%3Chttps://concepts.fellesdatakatalog.digdir.no%3E%0A++++++++WHERE+%7B%7B%0A++++++++++++?concept+a+skos:Concept+.%0A++++++++++++?record+foaf:primaryTopic+?concept+.%0A++++++++++++?record+dct:issued+?issued+.%0A++++++++++++?concept+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+%22974767880%22+.%0A++++++++%7D%7D%0A++++",
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+skos:+%3Chttp://www.w3.org/2004/02/skos/core%23%3E%0A++++++++SELECT+DISTINCT+?concept+?issued%0A++++++++WHERE+%7B%7B%0A++++++++++++?concept+a+skos:Concept+.%0A++++++++++++?record+foaf:primaryTopic+?concept+.%0A++++++++++++%3Frecord+a+dcat:CatalogRecord+.%0A++++++++++++?record+dct:issued+?issued+.%0A++++++++++++?concept+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+%22974767880%22+.%0A++++++++%7D%7D%0A++++",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "231595e6-0ef7-4224-8b37-9b8f164aa528",
"name" : "sparql",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0ASELECT+?organizationNumber+(COUNT(DISTINCT+?service)+AS+?count)%0AFROM+%3Chttps://dataservices.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?service+a+dcat:DataService+.%0A++++?service+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+?organizationNumber+.%0A%7D%7D%0AGROUP+BY+?organizationNumber",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0ASELECT+?organizationNumber+(COUNT(DISTINCT+?service)+AS+?count)%0A++++?service+a+dcat:DataService+.%0A++++?record+foaf:primaryTopic+?service+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?service+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+?organizationNumber+.%0A%7D%7D%0AGROUP+BY+?organizationNumber",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "95a4739c-fe68-4b36-919e-896df9830219",
"name" : "",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A%0ASELECT+DISTINCT+?service+?issued%0AFROM+%3Chttps://dataservices.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?service+a+dcat:DataService+.%0A++++?record+foaf:primaryTopic+?service+.%0A++++?record+dct:issued+?issued+.%0A++++?service+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910244132%22+.%0A%7D%7D",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A%0ASELECT+DISTINCT+?service+?issued%0AWHERE+%7B%7B%0A++++?service+a+dcat:DataService+.%0A++++?record+foaf:primaryTopic+?service+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?record+dct:issued+?issued+.%0A++++?service+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910244132%22+.%0A%7D%7D",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "ba92a50c-5ef0-406f-82b4-3b5b0a008152",
"name" : "",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A%0ASELECT+DISTINCT+?service+?issued%0AFROM+%3Chttps://dataservices.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?service+a+dcat:DataService+.%0A++++?record+foaf:primaryTopic+?service+.%0A++++?record+dct:issued+?issued+.%0A++++?service+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910258028%22+.%0A%7D%7D",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A%0ASELECT+DISTINCT+?service+?issued%0AWHERE+%7B%7B%0A++++?service+a+dcat:DataService+.%0A++++?record+foaf:primaryTopic+?service+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?record+dct:issued+?issued+.%0A++++?service+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910258028%22+.%0A%7D%7D",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "767627a7-28c2-4d65-b5ce-835effab0ee5",
"name" : "sparql",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0ASELECT+?organizationNumber+(COUNT(DISTINCT+?dataset)+AS+?count)%0AFROM+%3Chttps://datasets.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+?organizationNumber+.%0A%7D%7D%0AGROUP+BY+?organizationNumber",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0ASELECT+?organizationNumber+(COUNT(DISTINCT+?dataset)+AS+?count)%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+?organizationNumber+.%0A%7D%7D%0AGROUP+BY+?organizationNumber",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "ab8001c4-966b-4e44-b617-93b4c4675a6b",
"name" : "",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+DISTINCT+?dataset+?issued+?isAuthoritative+?isOpenData%0AFROM+%3Chttps://datasets.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?dataset+fdk:isRelatedToTransportportal+?isNAP+.%0A++++FILTER+(STR(?isNAP)+%3D+%22true%22)%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+dct:issued+?issued+.%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isOpenData+?isOpenData+.+%7D%7D%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isAuthoritative+?isAuthoritative+.+%7D%7D%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910244132%22+.%0A%7D%7D",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+DISTINCT+?dataset+?issued+?isAuthoritative+?isOpenData%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?dataset+fdk:isRelatedToTransportportal+?isNAP+.%0A++++FILTER+(STR(?isNAP)+%3D+%22true%22)%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?record+dct:issued+?issued+.%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isOpenData+?isOpenData+.+%7D%7D%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isAuthoritative+?isAuthoritative+.+%7D%7D%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910244132%22+.%0A%7D%7D",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "ed239cd1-4289-4e77-a2bb-daeabef7a573",
"name" : "",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+DISTINCT+?dataset+?issued+?isAuthoritative+?isOpenData%0AFROM+%3Chttps://datasets.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+dct:issued+?issued+.%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isOpenData+?isOpenData+.+%7D%7D%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isAuthoritative+?isAuthoritative+.+%7D%7D%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910244132%22+.%0A%7D%7D",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+DISTINCT+?dataset+?issued+?isAuthoritative+?isOpenData%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?record+dct:issued+?issued+.%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isOpenData+?isOpenData+.+%7D%7D%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isAuthoritative+?isAuthoritative+.+%7D%7D%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910244132%22+.%0A%7D%7D",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "3a7e8201-a9cd-4746-ba0e-489392e5f655",
"name" : "",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+DISTINCT+?dataset+?issued+?isAuthoritative+?isOpenData%0AFROM+%3Chttps://datasets.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+dct:issued+?issued+.%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isOpenData+?isOpenData+.+%7D%7D%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isAuthoritative+?isAuthoritative+.+%7D%7D%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910258028%22+.%0A%7D%7D",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+DISTINCT+?dataset+?issued+?isAuthoritative+?isOpenData%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?record+dct:issued+?issued+.%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isOpenData+?isOpenData+.+%7D%7D%0A++++OPTIONAL+%7B%7B+?dataset+fdk:isAuthoritative+?isAuthoritative+.+%7D%7D%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+%22910258028%22+.%0A%7D%7D",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "f0ba32c5-88b2-48b9-94fc-399c14d3ac59",
"name" : "",
"request" : {
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+?organizationNumber+(COUNT(DISTINCT+?dataset)+AS+?count)%0AFROM+%3Chttps://datasets.fellesdatakatalog.digdir.no%3E%0AWHERE+%7B%7B%0A++++?dataset+a+dcat:Dataset+.%0A++++?dataset+fdk:isRelatedToTransportportal+?isNAP+.%0A++++FILTER+(STR(?isNAP)+%3D+%22true%22)%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+?organizationNumber+.%0A%7D%7D%0AGROUP+BY+?organizationNumber",
"url" : "/sparql?query=%0APREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0APREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0APREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0APREFIX+fdk:+%3Chttps://raw.githubusercontent.com/Informasjonsforvaltning/fdk-reasoning-service/main/src/main/resources/ontology/fdk.owl%23%3E%0A%0ASELECT+?organizationNumber+(COUNT(DISTINCT+?dataset)+AS+?count)%0A++++?dataset+a+dcat:Dataset+.%0A++++?record+foaf:primaryTopic+?dataset+.%0A++++?record+a+dcat:CatalogRecord+.%0A++++?dataset+fdk:isRelatedToTransportportal+?isNAP+.%0A++++FILTER+(STR(?isNAP)+%3D+%22true%22)%0A++++?dataset+dct:publisher+?publisher+.%0A++++?publisher+dct:identifier+?organizationNumber+.%0A%7D%7D%0AGROUP+BY+?organizationNumber",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "09356022-3b25-41f3-8bed-bf475c8e1a4b",
"name" : "",
"request" : {
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+modelldcatno:+%3Chttps://data.norge.no/vocabulary/modelldcatno%23%3E%0A++++++++SELECT+?organizationNumber+(COUNT(DISTINCT+?informationmodel)+AS+?count)%0A++++++++FROM+%3Chttps://informationmodels.fellesdatakatalog.digdir.no%3E%0A++++++++WHERE+%7B%7B%0A++++++++++++?informationmodel+a+modelldcatno:InformationModel+.%0A++++++++++++?informationmodel+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+?organizationNumber+.%0A++++++++%7D%7D%0A++++++++GROUP+BY+?organizationNumber%0A++++",
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+modelldcatno:+%3Chttps://data.norge.no/vocabulary/modelldcatno%23%3E%0A++++++++SELECT+?organizationNumber+(COUNT(DISTINCT+?informationmodel)+AS+?count)%0A++++++++WHERE+%7B%7B%0A++++++++++++?informationmodel+a+modelldcatno:InformationModel+.%0A++++++++++++?record+foaf:primaryTopic+?informationmodel+.%0A++++++++++++?record+a+dcat:CatalogRecord+.%0A++++++++++++?informationmodel+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+?organizationNumber+.%0A++++++++%7D%7D%0A++++++++GROUP+BY+?organizationNumber%0A++++",
"method" : "GET"
},
"response" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "e06965ee-8935-494b-bbf8-5f1750208fdf",
"name" : "",
"request" : {
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+modelldcatno:+%3Chttps://data.norge.no/vocabulary/modelldcatno%23%3E%0A++++++++SELECT+DISTINCT+?informationmodel+?issued%0A++++++++FROM+%3Chttps://informationmodels.fellesdatakatalog.digdir.no%3E%0A++++++++WHERE+%7B%7B%0A++++++++++++?informationmodel+a+modelldcatno:InformationModel+.%0A++++++++++++?record+foaf:primaryTopic+?informationmodel+.%0A++++++++++++?record+dct:issued+?issued+.%0A++++++++++++?informationmodel+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+%22910258028%22+.%0A++++++++%7D%7D%0A++++",
"url" : "/sparql?query=%0A++++++++PREFIX+dct:+%3Chttp://purl.org/dc/terms/%3E%0A++++++++PREFIX+dcat:+%3Chttp://www.w3.org/ns/dcat%23%3E%0A++++++++PREFIX+foaf:+%3Chttp://xmlns.com/foaf/0.1/%3E%0A++++++++PREFIX+modelldcatno:+%3Chttps://data.norge.no/vocabulary/modelldcatno%23%3E%0A++++++++SELECT+DISTINCT+?informationmodel+?issued%0A++++++++WHERE+%7B%7B%0A++++++++++++?informationmodel+a+modelldcatno:InformationModel+.%0A++++++++++++?record+foaf:primaryTopic+?informationmodel+.%0A++++++++++++?record+a+dcat:CatalogRecord+.%0A++++++++++++?record+dct:issued+?issued+.%0A++++++++++++?informationmodel+dct:publisher+?publisher+.%0A++++++++++++?publisher+dct:identifier+%22910258028%22+.%0A++++++++%7D%7D%0A++++",
"method" : "GET"
},
"response" : {
Expand Down
8 changes: 6 additions & 2 deletions src/fdk_organization_bff/sparql/concept_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ def build_concepts_by_publisher_query() -> str:
"""Build query to count concepts grouped by publisher."""
return """
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?organizationNumber (COUNT(DISTINCT ?concept) AS ?count)
FROM <https://concepts.fellesdatakatalog.digdir.no>
WHERE {{
?concept a skos:Concept .
?record foaf:primaryTopic ?concept .
?record a dcat:CatalogRecord .
?concept dct:publisher ?publisher .
?publisher dct:identifier ?organizationNumber .
}}
Expand All @@ -24,13 +27,14 @@ def build_org_concepts_query(organization_id: str) -> str:
return Template(
"""
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?concept ?issued
FROM <https://concepts.fellesdatakatalog.digdir.no>
WHERE {{
?concept a skos:Concept .
?record foaf:primaryTopic ?concept .
?record a dcat:CatalogRecord .
?record dct:issued ?issued .
?concept dct:publisher ?publisher .
?publisher dct:identifier "$org_id" .
Expand Down
Loading

0 comments on commit fe110ad

Please sign in to comment.