solid / specification

Solid Technical Reports
https://solidproject.org/TR/
MIT License
472 stars 42 forks source link

Recommend predicate for a literal media type (Content-Type) #537

Open elf-pavlik opened 1 year ago

elf-pavlik commented 1 year ago

This was mentioned during 2023-05-31CG meeting

4.2.1 Contained Resource Metadata states:

rdf:type A class whose URI is the expansion of the URI Template [RFC6570] http://www.w3.org/ns/iana/media-types/{+iana-media-type}#Resource, where iana-media-type corresponds to a value from the IANA Media Types [IANA-MEDIA-TYPES].

Advertising the mime type with rdf:type has a couple of issues

In sai-js I just picked an arbitrary http://bblfish.net/work/atom-owl/2006-06-06/#type. In CSS I see usage of http://www.w3.org/ns/ma-ont#format, which seems a better choice

https://www.w3.org/TR/mediaont-10/#core-property-lists

format The MIME type of the resource (e.g., wrapper or bucket media types, container types), ideally including as much information as possible about the resource such as media type parameters, for example, using the "codecs" parameter [RFC 4281].

For now, I'm going to align what sai-js uses with CSS (http://www.w3.org/ns/ma-ont#format). I think Solid Protocol should recommend this (or equivalent) predicate and use it in all relevant shapes.

TallTed commented 1 year ago

Please note that "mime type" and "MIME type" were never correct and should not be used in current or future works. "MIME" expands to "Multipurpose Internet Mail Extensions", and the Media Types used with MIME have many other applications (such as web architecture)

Please always use "Media Type" going forward.

woutermont commented 10 months ago

Using http://www.w3.org/ns/ma-ont#format seems a decent choice to me, even if the Media Ontology feels rather arbitrary in its choice of properties.

I would suggest using whatever predicate we decide on together with the W3C's RDF mapping of IANA Media Types (https://www.w3.org/ns/iana/media-types/), or the very similar endeavour by SPAR (http://www.sparontologies.net/mediatype/).

csarven commented 4 months ago

Generally agree that rdf:type may be inadequate for what's intended but I'm not sure at the moment if it is wrong per se.

Minor comment requesting clarification:

Was http://www.w3.org/ns/ma-ont#hasFormat intended instead of #format? I see:

:hasFormat
    a owl:ObjectProperty ;
    rdfs:comment "Corresponds to 'format' in the Ontology for Media Resources." ;
    rdfs:domain :MediaResource .

And I'm not sure if that seems appropriate either:

:MediaResource a owl:Class;
    rdfs:comment "An image or an audiovisual media resource, which can be composed of one or more fragment / track.";
    owl:disjointWith :Rating,
        :TargetAudience .

or at least what's intended for #contained-resource-metadata

Did I misunderstand what's being sought in this issue?