Posted by ramya-jadda on March 3, 2011 at 2:41am
I'm trying to use an external reasoner, Jena, with Drupal for my project.
I have node class definitions and their CCK fields exported as RDF. I was wondering how
to access the RDFs at node/*/rdf from Jena.
Can anyone please help me in understanding where the RDF is stored?
Thank you for any help.
-Ramya
Comments
RDF Drupal and export
Dear Ramya,
You want to export the RDF from Drupal web pages to use as input to Jena. Correct?
There are two possibilities, depending on what you want to do. (This is my best knowledge.)
1) If you want to use the RDFa that has been put on the web pages by the RDF module, you can generate the web pages (browser or crawler) and extract the RDFa.
From the RDFa you can generate RDF triples for input to Jena. This is a bit round-about, but it will always be accurate and isn't too hard.
2) If you want to use the mappings that you've created (with difficulty at this point), I can't help you. Sorry. I'm new here too. The mappings are only "potential" assertions and are not assertions.
It's very likely that you want to use the first method. There may be a more direct way to extract the RDFa, but modifying or extending the RDF module. It's something that everyone will want to do, but it's early in that game.
Oz - 4dtext.com
The RDF triples are not
The RDF triples are not materialized in Drupal by default. Rather, as 4dtext said, the mappings are potential assertions. If you use the SPARQL endpoint module, I believe the triples are materialized in the ARC2 tables in the database. I haven't tried SPARQL Endpoint in Drupal 7 lately, so I'm not sure what the status is.
You would have to crawl your
You would have to crawl your site or use the sparql_ep module and get all your site RDF data from the sparql endpoint. I'd recommend against relying on the RDFa for Drupal 6, but if you are using Drupal 7 it's not a bad solution. node/X/rdf might be faster to serve though, but doesn't yet reflect all the wealth of RDFa that regular D7 pages have.
RDF on Drupal sites
I've found that if I use the "RDF" tab (next to Edit and View), I consistently get a crash and error message about ARC2 and a node that doesn't exist.
I suspect that this is not ready for production use...
If you do crawl and extract, don't forget to extract the namespace definitions.
Thank you everyone for the
Thank you everyone for the help!!
I think I now get an idea.