<div dir="ltr"><div><div><div>Hi<br></div>Does librdf supports custom operators ( Sparql) , custom properties ( Jena ) or other means to trigger custom code execution from a query. For example<br><br></div><div>Sesame:<br>
<br> (<a href="http://rivuli-development.com/further-reading/sesame-cookbook/creating-custom-sparql-functions">http://rivuli-development.com/further-reading/sesame-cookbook/creating-custom-sparql-functions</a>)<br></div><div>
<p>"We would like to be able to formulate a SPARQL query that allows us 
to retrieve all resources that have a palindrome as their label:</p>
<div class=""><div class=""><code class="">PREFIX rdfs: <<a href="http://www.w3.org/2000/01/rdf-schema#">http://www.w3.org/2000/01/rdf-schema#</a>> .</code></div><div class=""><code class="">PREFIX cfn: <<a href="http://example.org/customfunction/">http://example.org/customfunction/</a>> </code></div>
<div class=""><code class="">SELECT ?x ?label</code></div><div class=""><code class="">WHERE {</code></div><div class=""><code class="">      </code><code class="">?x rdfs:label ?label .</code></div><div class=""><code class="">      </code><code class="">FILTER(cfn:palindrome(str(?label)))</code></div>
<div class=""><code class="">}</code></div></div>"<br><br></div>or from Jena/ARQ:<br><br>(<a href="http://jena.sourceforge.net/ARQ/extension.html#propertyFunctions">http://jena.sourceforge.net/ARQ/extension.html#propertyFunctions</a>)<br>
<p>"Property functions, sometimes called "magic properties", are
  properties that cause triple matching to happen by executing some
  piece of code, determined by the property URI, and not by the
  usual graph matching. They can be used to give certain kinds of
  inference and rule processing. ....</p><p>... One common case is for access to collections (RDF lists) or
  containers (rdf:Bag, rdf:Seq, rdf:Alt).</p>
  <pre class="">PREFIX list: <<a href="http://jena.hpl.hp.com/ARQ/list#">http://jena.hpl.hp.com/ARQ/list#</a>><br><br>SELECT ?member<br>{ ?x :p ?list .           # Some way to find the list<br> ?list list:member ?member .<br>
}</pre><br></div>Thanks for your help.<br><div><div><br></div></div></div>