Last active
April 21, 2019 19:32
-
-
Save Abbe98/76e3db92b0cc48fb04293b714cbc9471 to your computer and use it in GitHub Desktop.
SparQL queries for K-Samsök
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT ?sOrg (COUNT(?item) AS ?count) WHERE { | |
| OPTIONAL { ?item <http://kulturarvsdata.se/ksamsok#serviceOrganization> ?sOrg . } | |
| ?item <http://kulturarvsdata.se/ksamsok#image> ?image . | |
| FILTER NOT EXISTS { ?image <http://kulturarvsdata.se/ksamsok#mediaLicenseUrl> ?license } | |
| } GROUP BY ?sOrg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT ?color (COUNT(?color) AS ?count) WHERE { | |
| ?item <http://kulturarvsdata.se/ksamsok#itemColor> ?color . | |
| } | |
| GROUP BY ?color | |
| ORDER BY DESC(?count) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PREFIX soch: <http://kulturarvsdata.se/ksamsok#> | |
| PREFIX fmis: <http://kulturarvsdata.se/raa/fmi/> | |
| SELECT ?p WHERE { | |
| fmis:10253101330001 ?p ?o . | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| prefix owl: <http://www.w3.org/2002/07/owl#> | |
| SELECT DISTINCT * WHERE { | |
| ?class a owl:Class . | |
| FILTER(STRSTARTS(STR(?class), 'http://kulturarvsdata.se/ksamsok#')) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
| SELECT DISTINCT ?property WHERE { | |
| ?property a owl:ObjectProperty . | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PREFIX soch: <http://kulturarvsdata.se/ksamsok#> | |
| PREFIX fmis: <http://kulturarvsdata.se/raa/fmi/> | |
| SELECT ?refs WHERE { | |
| fmis:10028201230001 soch:itemDescription ?description_node . | |
| ?description_node soch:type "Referenser" . | |
| ?description_node soch:desc ?refs . | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT ?item WHERE { | |
| ?item <http://kulturarvsdata.se/ksamsok#image> ?image . | |
| ?image <http://kulturarvsdata.se/ksamsok#mediaType> ?mediaType . | |
| FILTER REGEX(STR(?mediaType), "image") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT ?license (COUNT(?license) AS ?count) WHERE { | |
| ?item <http://kulturarvsdata.se/ksamsok#image> ?o . | |
| ?o <http://kulturarvsdata.se/ksamsok#mediaLicenseUrl> ?license | |
| } | |
| GROUP BY ?license |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT ?item WHERE { | |
| ?item <http://kulturarvsdata.se/ksamsok#serviceOrganization> "upmu" . | |
| ?item <http://kulturarvsdata.se/ksamsok#image> ?image . | |
| FILTER NOT EXISTS { ?image <http://kulturarvsdata.se/ksamsok#mediaLicenseUrl> ?license } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT ?mediaType (COUNT(?mediaType) AS ?count) WHERE { | |
| ?item <http://kulturarvsdata.se/ksamsok#mediaType> ?mediaType . | |
| } | |
| GROUP BY ?mediaType | |
| ORDER BY DESC(?count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment