Extension:WikibaseMediaInfo/RDF mapping

This is an experiment on how to represent MediaInfo Wikibase entities in RDF.

It is an extension of the Wikibase RDF model. It proposes to reuse schema.org vocabulary as much as possible. Schema.org is already intensively used in Wikibase RDF representation and provides an important set of properties and type for media contents. This proposal also aims at being consistent with the Wikibase Lexeme RDF model.

Basic representation
This section proposes a "basic" representation of the MediaInfo entities, aiming at providing a full mapping of the entity data but without information derived from other sources (MediaWiki file metadata...).

Example:

Comments:


 * Classes
 * The media info concept of Wikibase aligns well with . Having a class  would be convenient for consistency with the other entity types ,  ... It would be meaningful to have   in the ontology definition.


 * Caption
 * The closest schema.org relation is that has the advantage of having the same name as the Wikibase feature and being specific to media content. It would allow to write SPARQL queries looking for media file based on their caption without bothering of filtering out e.g. Wikidata items. It is also interesting to add   to the RDF output (but probably not the the query service) for interoperability, similarly to what have been done for lexemes.


 * Statements
 * For consistency and simplicity we could use the same schema as the other entity types.

Extended representation
This section proposes to extend the basic representation with other metadata already stored in the MediaWiki database to enable more SPARQL queries. Some of the properties proposed here only apply to some file types and should not appear on the other files.

Example (all properties are displayed here even if some would never appear together like  and  ):


 * Classes
 * In addition to the and   classes we could add the classes, ,  to allow easy querying of only images, audios or video. These classes would be assigned based on the mediaWiki media type returned by.


 * 
 * would provide the direct canonical of the file itself. Could be provided by.


 * 
 * would provide the MIME type of the file to be able to only query files of a given mime type, do statistics based on it... Could be provided by.


 * 
 * would provide the size of the file in bytes. Would be interesting to allow statistics on the file size joined with data stored in statements (e.g. size of all the uploads from a given partnership...). Could be provided by.


 * and
 * would provide the height and width of the file if it is an image or a video. Could be provided by  and.


 * 
 * would provide the duration of a video. Could be provided by . We need to choose if we use the   datatype as suggested by schema.org or just use an integer containing the number of second.


 * 
 * would provide the number of pages of a multi-pages file. Could be provided by . It is a slight abuse to use this property here, in schema.org it is supposed to be used on.