Hello,
I was wanting to produce RDF files for each member of a large online community of writers. It is using Drupal 7, so it has RDFa and many vocabularies "out of the box." I might want to add doac (description of a career), vcard RDF vocab, and perhaps bio.
I don't know if it is possible to go in now and create a file structure for holding data files that relate to each person. For example, starting with FOAF, I'd want to have a folders structure such as:
[username]/foaf.rdf
or better yet:
[user's real name/foaf.rdf
1) Is there a way to automate the process of creating these RDF files for each member? How would that be done?
2) What tools would help to create various connnections between users, for example, PersonA foaf:knows PersonB. I forsee additional vocabulary specifications used to describe relationships beyond just foaf:knows, the Relationships vocabulary helps to expand the options for predicates that can be used in relating resources/people.
3) What is required to include and use additional vocabularies in a Drupal site? Is this just a matter of changing something in the template to add different namespaces?
I think there might be other issues to consider but I'm not aware at the moment now what else I might need to consider. If anyone thinks of other considerations, please share,
Thanks,
Bruce
Comments
Documentation needed
First of all, make sure to install the RESTful Web Services with the regular RDF Extensions module. By default you can get the RDF/XML version of the user at http://example.com/user/4.rdf. You can use core's url aliases to make that url prettier e.g. http://example.com/user/4/foaf.rdf (you will need an alias for each user). I don't think pathauto could be used as is to automatize this url alias creation process, but check it's APIs, I'm sure you can trigger this (or even code it yourself in a custom module).
Note however that having a separate URI (or "file") for each page is not required for building Linked Data, you can just use the RDFa already present on the HTML of your Drupal 7 site.
user references (part of references), there is also http://drupal.org/project/relation but afaik, it does not support RDF the same way user reference does.
Please don't hack any RDF namespace into your template files :) - use the APIs instead so that you can benefit from these outside RDFa (such as in RDF/XML). adding namespaces is very easy, either implement hook_rdf_namespaces() in a custom module, or use rdfx to add them manually at admin/config/services/rdf/namespaces. You can also enable evoc (part of the rdfx package) to have an autocomplete when setting your RDF mappings with RDF UI.
We don't have this sort of things described anywhere, it would be awesome if you or someone else would volunteer to add this sort of use cases in the RDF section of the site builder book (after they've figured out all the modules and steps involved).