{"id":91,"date":"2005-08-20T11:42:31","date_gmt":"2005-08-20T15:42:31","guid":{"rendered":"http:\/\/crschmidt.net\/blog\/?p=91"},"modified":"2005-08-20T11:42:31","modified_gmt":"2005-08-20T15:42:31","slug":"sparql-construct-as-rules","status":"publish","type":"post","link":"https:\/\/crschmidt.net\/blog\/archives\/91\/sparql-construct-as-rules\/","title":{"rendered":"SPARQL CONSTRUCT as Rules"},"content":{"rendered":"<p>So, I implemented SPARQL CONSTRUCT queries in Julie yesterday (http:\/\/crschmidt.net\/noets\/115) along with ASK queries (http:\/\/crschmidt.net\/noets\/114). Really, the CONSTRUCT queries are pretty silly to have: who wants to see serialized triples on an IRC interface? but I was thinking: what if instead of spitting the triples into IRC, it sent them into the backend?<\/p>\n<p>I&#8217;m sure that the people in charge of SPARQL thought of this long ago, but it just occured to me, that this is a simple way to achieve rules-like processing:<\/p>\n<blockquote><p>10:49:36 &lt;crschmidt&gt; ^q CONSTRUCT { ?a rel:childOf &lt;http:\/\/crschmidt.net\/foaf.rdf#crschmidt&gt;. } where { &lt;http:\/\/crschmidt.net\/foaf.rdf#crschmidt&gt; rel:parentOf  ?a. }<br \/>\n10:49:37 &lt;+julie&gt;  {[http:\/\/crschmidt.net\/~julie\/me.rdf#julie], [http:\/\/purl.org\/vocab\/relationship\/childOf], [http:\/\/crschmidt.net\/foaf.rdf#crschmidt]},<br \/>\n{[http:\/\/crschmidt.net\/~alicia\/me.rdf#alicia], [http:\/\/purl.org\/vocab\/relationship\/childOf], [http:\/\/crschmidt.net\/foaf.rdf#crschmidt]}<\/p><\/blockquote>\n<p>Feeding these kind of results back into julie could let people create the equivilant of rules, passing them back into julie to add to the triplestore.<\/p>\n<p>Man, I thought I gave up on this RDF stuff. Looks like maybe I wasn&#8217;t as done as I thought I was.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, I implemented SPARQL CONSTRUCT queries in Julie yesterday (http:\/\/crschmidt.net\/noets\/115) along with ASK queries (http:\/\/crschmidt.net\/noets\/114). Really, the CONSTRUCT queries are pretty silly to have: who wants to see serialized triples on an IRC interface? but I was thinking: what if instead of spitting the triples into IRC, it sent them into the backend? I&#8217;m sure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,2,29],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-julie","category-semantic-web","category-sparql"],"_links":{"self":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":0,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"wp:attachment":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}