Recommendation for linking to external RDF data

natuk's picture

RDFx allows for fields to be expressed as RDFa. Sometimes RDF concepts exist in other locations, for example DBpedia, and not as part of the local taxonomies. What is the recommended way to link to these external resources? These resources do have persistent URIs, so I guess the simplest thing to do is to make the field into a link. But ideally one would prefer to get a good label to show on the HTML output rather than the link itself. RDF Proxy ( seems to be doing that but the project appears to be abandoned. Any ideas?


how do you get/import the

scor's picture

how do you get/import the external RDF URIs? Do you have this sorted out already? The most basic way is to look these up in the external dataset and paste them (URI + optionally label) in Drupal. A more sophisticated approach would be to build a field widget that would query the external services (maybe via SPARQL or some simple keyword lookup a la freebase).

Yes, the copy/paste option

natuk's picture

Yes, the copy/paste option works but it requires going to the external website. I was hoping that a field widget, like what you describe, existed already and it would store the url and label as a minimum. Perhaps this could be easily integrated with the link field module.

You might consider web_taxonomy

jneubert's picture

You might consider Web Taxonomy module, which can be used to look up external web services for populating a Drupal taxonomy. It stores the labels as taxonomy terms, and adds an extra field, web_tid, which can store the URI of an arbitrary entity. By RDF mapping you can define a owl:sameAs relation between the internal term URI (e.g. http://yourdomain/term/123) and the external entity URI stored in the web_tid field. And you get the advantages of Drupal taxonomy, and term reference fields (e.g. autocomplete term widget, or overview pages for each term/entity) for free.

web_taxonomy offers a plugin architecture for adding arbitrary "taxonomies", which can be LOD datasets available through some lookup service (public SPARQL endpoints can be used for this). The module is in alpha state currently, but there are some examples out there how it can be used in Linked Data/RDF context.

I'm currently working on a Economics Taxonomies module, which provides plugins for the Thesaurus for Economics, for researchers in economics, and for economics institutions (coming soon), all based on Web Services for Economics. The module includes an installable/uninstallable content type "Example economics publication", which you can use to experiment with web_taxonomy and the plugins. Other experimental plugins exist for DBpedia, VIAF (Virtual International Authority File) and Agrovoc Thesaurus.

Looks good

natuk's picture

Yes, I think web_taxonomy is trying to do what I am looking for. I will contribute any further discussion over there. Thank you very much for the pointer to the module and the rest of the sandbox projects, which sound extremely interesting.

Regarding the export in RDFa:

scor's picture

Regarding the export in RDFa: I think using a link field is a good approach as it provides both a label and a URI. The easiest way is to just export the URI as RDF and leave the label as a nice add-on for the HTML version of your site, but not in your RDF (this label is already available in RDF in the external dataset). To export the link URI in RDFa, you will want to enable the RDF UI module (included in RDFx), edit your content type, and in the "RDF mappings" tab, look for your field and select "rel" in the Attribute type drop down (under where you set the mapping).

Semantic Web

Group organizers

Group events

  • 2018-05-31 17:00 - 2018-06-02 18:00 Europe/Amsterdam
Add to calendar

Group notifications

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