W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > May 2012

Enumerating RDF::Format

From: Nicholas Humfrey <nicholas.humfrey@bbc.co.uk>
Date: Sun, 13 May 2012 12:33:25 +0100
To: <public-rdf-ruby@w3.org>
Message-ID: <CBD55A95.71CD9%nicholas.humfrey@bbc.co.uk>

I have been using RDF.rb gem as part of dbpedialite.org for a couple of
years now. I opened an issue about enumerating the registered list of


Time has passed and this still isn't possible, so I thought I would try and
come up with a patch. Specifically, I want iterate through the registered
list of formats and get:

* The format name (eg 'RDF/XML' or 'N-Triples')
* The default (most official) content type (eg 'text/turtle')
* The default file suffix (eg .rdf or .trix)

This is used to generate a <link rel="alternate"> and hyperlinks to other
formats in the HTML page.

Unfortunately the internal data structures currently make this difficult and
there is no name for a format stored (other than deriving it from the class
name). For the time being I have decided to resort to storing it in my own
data structure:

Is this a problem for anybody else?


This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
Received on Sunday, 13 May 2012 11:34:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:15 UTC