This is a small API that re-presents Media Types in forms useful for Linked Data applications.
Media Types (used to be called MIME types, sometimes called formats, also see Wikipedia) are listed by IANA at https://www.iana.org/assignments/media-types/media-types.xml and we just take that data, convert it to RDF, store it, and serve it up using a small Python Linked Data API imaginatively called pyLDAPI.
W3ID provides a "secure, permanent URL re-direction service for Web applications.
By using W3ID-based identifiers for each Media Type, this Register provides a stable way to refer to each Media Types by URI.
This is not new or groundbreaking stuff but previous attempts to make this information available via URI seem to be offline (e.g. see http://purl.org/NET/mediatypes/).
The initial reason for doing this is to allow the Dublin Core Terms property format to refer to stable, dereferenceable, URIs for Media Types rather than to made up ones or text strings.
For every MIME type in IANA's list, this W3ID makes a URI like this:
https://w3id.org/mediatype/
+{Media-Type}
So for text/html
we have:
https://w3id.org/mediatype/text/html
It's not rocket surgery...
Clicking on that URI yeilds a simple HTML view of the Media Type's properties. You can also get RDF data in a number of ways including by adding a _format
query string argument to the URI with a Media Type value. Nicely self-referential huh?
To get RDF in the Turtle format for the Media Type image/jpg
, use this URI:
The code for this application is online at https://github.com/nicholascar/mediatypes-dataset.
The content of this API is licensed for use under the GNU v3 License. See the license deed for details.
If stuff breaks or doesn't work the way you expect it should or you want things extended, either add issues to the codebase (see above) or contact:
Nicholas Car
Senior Experimental Scientist
CSIRO Land & Water, Environmental Informatics Group
Brisbane, Queensland
[email protected]
ORCID: 0000-0002-8742-7730