Posted by villena90 on October 10, 2011 at 6:45pm
In my content types I have created the mapping for my own ontology. myont:Product, myont:product_Description, myont:product_Picture, etc. If I try to execute a sparql query, which prefix should I use? Should I have to create a file with the specification of the namespace?
Thanks in advance.
Comments
On the site that is
On the site that is publishing the RDF, you should add the namespace prefix at
admin/config/services/rdf/namespaces. Then, once the content is in a SPARQL endpoint, you can use the prefix by adding the following to the top of the query (of course, changing example.com to your namespace):PREFIX myont: <http://example.com/>quick sanity check
Something I often do before starting writing queries is check that the data I want to query is in the endpoint, so in your case you could check that there are triples using your custom ontology. For that, go to your site SPARQL Endpoint (/sparql), choose "HTML table" in the output format drop down on the right, and execute the default query (maybe increase or remove the default limit). You can do a quick search on your namespace among the results (note your prefix won't appear there).