-- DESCRIBE -- Link: https://tinyurl.com/yax4zvaq SPARQL DEFINE get:soft "soft" DESCRIBE FROM -- CONSTRUCT -- Link: https://tinyurl.com/y9bhy5db DEFINE get:soft "soft" CONSTRUCT { ?s ?p ?o . } FROM WHERE { ?s ?p ?o . } ; SPARQL -- SELECT -- Uses Default Data Brower from Deployment Data Space or POD -- Link: https://tinyurl.com/ybyons66 -- No Reasoning & Inference Rules applied DEFINE get:soft "soft" SELECT DISTINCT AS ?s ?p ?o FROM WHERE { ?p ?o . } ; SPARQL -- SELECT -- Link: https://tinyurl.com/y7xv87ug -- Uses Virtuoso Faceted Browser -- No Reasoning & Inference Rules applied DEFINE get:soft "soft" SELECT DISTINCT AS ?s ?p ?o FROM WHERE { ?p ?o . } ; SPARQL -- INSERT -- Link: https://tinyurl.com/ydysd5mh -- No Reasoning & Inference Rules applied INSERT DATA { GRAPH { foaf:mbox . } } ; SPARQL -- DELETE -- Link: https://tinyurl.com/y7pldmrg -- Uses Virtuoso Faceted Browser -- No Reasoning & Inference Rules applied DELETE DATA { GRAPH { foaf:mbox . } } ; SPARQL -- UPDATE via INSERT & DELETE -- Link: https://tinyurl.com/ybzgkatr -- Uses Virtuoso Faceted Browser -- No Reasoning & Inference Rules applied INSERT DATA { GRAPH { ## Email Address foaf:mbox . foaf:mbox . foaf:mbox . foaf:mbox . foaf:mbox . ## LinkedIn Profile Page schema:sameAs . schema:sameAs . schema:sameAs . schema:sameAs . ## Twitter Profile Page schema:sameAs . schema:sameAs . schema:sameAs . schema:sameAs . } } ; DELETE DATA { GRAPH { foaf:mbox . } } ; SPARQL -- Verify effects of UPDATE -- Using Virtuoso Faceted Browser since data was added to a named graph in -- Virtuoso instance associated with /sparql endpoint -- Query Results Link: https://tinyurl.com/y9kstz4n -- Faceted Browser Page scoped to relevant named graphs link: https://tinyurl.com/y8wm2xs7 SELECT DISTINCT ?s foaf:mbox ?o FROM WHERE { ?s ?p ?o . } ; -- Inverse Functional Relationship Type Semantics for built-in Reasoning and Inference SPARQL INSERT DATA { GRAPH { foaf:mbox a owl:InverseFunctionalProperty . foaf:mbox_sha1sum a owl:InverseFunctionalProperty . schema:sameAs a owl:InverseFunctionalProperty . } } ; -- Inference Rule Test -- Re owl:InverseFunctionalProperty relationship types SPARQL DEFINE input:inference 'urn:ifp:inference:rule' SELECT DISTINCT AS ?s ?o WHERE { owl:sameAs ?o . } ; -- Inference Rule Test -- Re owl:sameAs relationship types SPARQL # DEFINE input:inference 'urn:ifp:inference:rule' DEFINE input:same-as "yes" SELECT DISTINCT AS ?s owl:sameAs as ?relation ?o WHERE { owl:sameAs ?o . } ; -- Inference Rule Test -- Re owl:sameAs relationship types -- Named Graph Provenance included SPARQL # DEFINE input:inference 'urn:ifp:inference:rule' DEFINE input:same-as "yes" SELECT DISTINCT ?g AS ?s owl:sameAs as ?relation ?o WHERE { GRAPH ?g { owl:sameAs ?o .} } ; -- Manually implement Inverse Functional Relationship Type Inference using SELECT -- Note: CONSTRUCT used for Inference Rule using SPIN/SHACL Vocab -- Email Address SPARQL SELECT ?s owl:sameAs as ?sameAs ?o # CONSTRUCT {?s owl:sameAs ?o} -- for Custom Inference Rule WHERE { { SELECT DISTINCT ?s ?mbox { ?s foaf:mbox ?mbox . } } { SELECT DISTINCT ?o ?mbox2 { ?o foaf:mbox ?mbox2 . } } FILTER (?s = ) FILTER (?mbox = ?mbox2) FILTER (?s != ?o) } ; -- Based on Profile Pages SPARQL SELECT ?s owl:sameAs as ?sameAs ?o # CONSTRUCT {?s owl:sameAs ?o} -- for Custom Inference Rule WHERE { { SELECT DISTINCT ?s ?page { ?s schema:sameAs ?page . } } { SELECT DISTINCT ?o ?page2 { ?o schema:sameAs ?page2 . } } FILTER (?s = ) FILTER (?page = ?page2) FILTER (?s != ?o) } ; -- Crawling via Sponger Test 1 SPARQL ## Prgama for de-referencing a CONSTANT DEFINE input:grab-iri ## Pragma for de-referencing a designated Variable DEFINE input:grab-var "o" # PREFIX pim: SELECT DISTINCT ?p ?o WHERE { ?p ?o . } ; -- Crawling via Sponger Test 2 SPARQL ## Prgama for de-referencing a CONSTANT DEFINE input:grab-iri ## Pragma for de-referencing a designated Variable DEFINE input:grab-var "o" # PREFIX pim: SELECT DISTINCT ?o ldp:contains AS ?containerOf ?o2 WHERE { ldp:contains ?o . ?o ldp:contains ?o2. } ; -- Crawling via Sponger Test 3 SPARQL DEFINE input:grab-var "o" DEFINE input:grab-var "o2" DEFINE input:grab-iri "https://kidehen2.solid.openlinksw.com:8444/public/" # PREFIX pim: SELECT DISTINCT ?o ?p ?o2 WHERE { ldp:contains ?o . ?o ?p ?o2. FILTER (?p = ldp:contains) . } ; -- Crawling Sponger Test 4 -- Using a single pragma to enact de-reference of constants and variables SPARQL # DEFINE input:grab-var "o" # DEFINE input:grab-var "o2" # DEFINE input:grab-iri "https://kidehen2.solid.openlinksw.com:8444/public/" DEFINE input:grab-all "yes" SELECT DISTINCT ?o ldp:contains AS ?containerOf ?o2 ?p ?o3 WHERE { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 ?p ?o3. } ; -- Union Crawl over many PODs SPARQL # DEFINE input:grab-var "o" # DEFINE input:grab-var "o2" # DEFINE input:grab-iri "https://kidehen2.solid.openlinksw.com:8444/public/" DEFINE input:grab-all "yes" # PREFIX pim: SELECT DISTINCT ?o ldp:contains AS ?containerOf ?o2 ?p ?o3 WHERE { { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 ?p ?o3. } } ; -- Reveal Solid Entities SPARQL # DEFINE input:grab-var "o" # DEFINE input:grab-var "o2" # DEFINE input:grab-iri "https://kidehen2.solid.openlinksw.com:8444/public/" DEFINE input:grab-all "yes" # PREFIX pim: SELECT DISTINCT ?s as ?solidEntities WHERE { { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } } ; -- Different Solid Pods: Doesn't work right now -- [1] https://kidehen.solid.openlinksw.com:8444/public/ -- [2] https://solid.turnguard.com:8440/public/ -- [3] https://drive.verborgh.org/public/RWWCrewQA/ -- [4] https://timbl.com/timbl/Public/Test/2018/RWWCrew%20only/ -- [5] https://melvin.solid.live/public/RWWCrew/ doesn't work because it is in OIDC mode SPARQL # DEFINE input:grab-var "o" # DEFINE input:grab-var "o2" # DEFINE input:grab-iri "https://kidehen2.solid.openlinksw.com:8444/public/" DEFINE input:grab-all "yes" # PREFIX pim: SELECT DISTINCT ?o as ?solidEntities WHERE { { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } UNION { ldp:contains ?o . ?o ldp:contains ?o2. ?o2 owl:sameAs ?s; ?p ?o3. } } ; -- Variant that works SPARQL # DEFINE input:grab-var "o" # DEFINE input:grab-var "o2" # DEFINE input:grab-iri "https://solid.turnguard.com:8440/public/" # DEFINE input:grab-iri "https://drive.verborgh.org/public/RWWCrewQA/" # DEFINE input:grab-iri "https://kidehen2.solid.openlinksw.com:8444/public/" # DEFINE input:grab-iri "https://timbl.com/timbl/Public/Test/2018/" DEFINE input:grab-all "yes" SELECT DISTINCT * WHERE { { ldp:contains ?o. OPTIONAL { ?o owl:sameAs ?o2 } } UNION { ldp:contains ?o. OPTIONAL { ?o owl:sameAs ?o2 } } UNION { ldp:contains ?o. OPTIONAL {?o owl:sameAs ?o2} } UNION { ldp:contains ?o. OPTIONAL { ?o owl:sameAs ?o2 } } } ; -- Alternative -- Variant that works SPARQL # DEFINE input:grab-var "o" # DEFINE input:grab-var "o2" # DEFINE input:grab-iri "https://solid.turnguard.com:8440/public/" DEFINE input:grab-all "yes" SELECT DISTINCT ?o2 as ?entity WHERE { { ldp:contains ?o. ?o owl:sameAs ?o2 } union { ldp:contains ?o. ?o owl:sameAs ?o2 } union { ldp:contains ?o. ?o owl:sameAs ?o2 } union { ldp:contains ?o. ?o owl:sameAs ?o2 } union { ldp:contains ?o. ?o owl:sameAs ?o2 } union { ldp:contains ?o. ?o owl:sameAs ?o2 } } ; -- Using optionals SPARQL DEFINE input:grab-all "yes" SELECT DISTINCT ?o as ?folder WHERE { { optional { ldp:contains ?o} .} union { optional { ldp:contains ?o} .} union { optional { ldp:contains ?o}.} union { optional { ldp:contains ?o} .} union { optional { ldp:contains ?o} .} union { optional { ldp:contains ?o} .} } ; -- Plume Blog Post SPARQL DEFINE input:grab-var "post" DEFINE input:grab-iri "https://kidehen2.solid.openlinksw.com:8444/public/blog/posts/" PREFIX ldp: PREFIX terms: PREFIX XML: PREFIX st: PREFIX tur: PREFIX sioc: PREFIX pim: SELECT DISTINCT * WHERE { ldp:contains ?post. ?post terms:created ?created ; terms:modified ?modified ; terms:title ?title ; sioc:content ?content } ;