Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to define Internet Media Type in RDF - is there a namespace? Yes - but not an official one. See http://answers.semanticweb.com/questions/639/is-there-a-namespace-to-describe-mimetypes-and-encodings and http://mediatypes.appspot.com/
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix dcam: <http://purl.org/dc/dcam/> .
<http://example.com/page.html> dcterms:format <http://purl.org/NET/mediatypes/text/html> .
<http://purl.org/NET/mediatypes/text/html> a dcterms:FileFormat ;
dcam:memberOf dcterms:IMT ;
rdf:value "text/html" ;
rdfs:isDefinedBy <http://mediatypes.appspot.com/dump.rdf> ;
rdfs:label "HTML document" .
@stain

This comment has been minimized.

Show comment
Hide comment
@stain

stain Jan 25, 2013

This is a hybrid - it provides the dcterms details of the media type directly - but uses the namespaces of http://purl.org/NET/mediatypes/ rather than anonymous nodes.

Sadly the mediatypes URLs don't resolve properly to RDF - and the RDF at http://mediatypes.appspot.com/dump.rdf is also quite sparse - it has no such statements as above, for instance.

Owner

stain commented Jan 25, 2013

This is a hybrid - it provides the dcterms details of the media type directly - but uses the namespaces of http://purl.org/NET/mediatypes/ rather than anonymous nodes.

Sadly the mediatypes URLs don't resolve properly to RDF - and the RDF at http://mediatypes.appspot.com/dump.rdf is also quite sparse - it has no such statements as above, for instance.

@zednis

This comment has been minimized.

Show comment
Hide comment

zednis commented Apr 13, 2016

http://mediatypes.appspot.com/ appears to be down :-(

@nicholascar

This comment has been minimized.

Show comment
Hide comment
@nicholascar

nicholascar Jun 18, 2018

This is now up: http://13.236.122.60/dataset/mediatypes/ with PIDs like this: http://w3id.org/mediatype/text/turtle. Very happy for suggestions as to how to make it great at https://github.com/nicholascar/mediatypes-dataset.

This is now up: http://13.236.122.60/dataset/mediatypes/ with PIDs like this: http://w3id.org/mediatype/text/turtle. Very happy for suggestions as to how to make it great at https://github.com/nicholascar/mediatypes-dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment