Can I use my own ontologies?

Events happening in the community are now at Drupal community events on www.drupal.org.
villena90's picture

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

linclark's picture

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

scor's picture

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).

Semantic Web

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week