Extension:WikibaseMediaInfo/RDF mapping

This is the specification of the RDF mapping of the Wikibase MediaInfo entities. It is an extension of the Wikibase RDF model.

Example

edit
sdoc:M222222 a schema:MediaObject , schema:VideoObject ;
     # basic file metadata
     schema:contentUrl <https://upload.wikimedia.org/wikipedia/commons/f/f7/Boat_movie.webm> ; # URL to the file itself
     schema:encodingFormat "video/webm" ; # File mime type
     schema:contentSize 123445 ; # File size in bytes
     schema:height 1024 ; # Image/video height in px
     schema:width 2048 ; # Image/video width in px
     schema:duration "PT123S"^^xsd:duration ; # Video duration
     schema:numberOfPages 12 ; # Number of pages in a multi-pages document

 
     # caption
     schema:caption "a boat sailing"@en ;
     rdfs:label "a boat sailing"@en ;

     # statements
     wdt:P2 wd:Q3 ;
     wdt:P7 "value1" , "value2" ;
     p:P2 wds:Q3-4cc1f2d1-490e-c9c7-4560-46c3cce05bb7 ;
     p:P7 wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37 ,
          wds:Q3-45abf5ca-4ebf-eb52-ca26-811152eb067c .

<https://commons.wikimedia.org/wiki/File:Boat_movie.webm> a schema:Article ;
     schema:about sdoc:M222222 ;
     schema:isPartOf <https://commons.wikimedia.org/> .

Description of the mapping

edit

The media info entities are typed using schema:MediaObject. More specialized classes, schema:AudioObject, schema:ImageObject, schema:VideoObject are also added to allow easy querying of only images, audios or videos.

For example, a JPEG image will have two type triples sdoc:M222222 rdf:type schema:MediaObject and sdoc:M222222 rdf:type schema:ImageObject.

The captions are encoded using schema:caption and the statements are encoded using the same properties as the other Wikibase entities (items...).

More data based on the described file itself are also provided:

schema:contentUrl
the direct canonical URL of the file itself. For example sdoc:M222222 schema:contentUrl <https://upload.wikimedia.org/wikipedia/commons/0/00/Charlie_Chaplin.jpg>.
schema:encodingFormat
the MIME type of the file. For example sdoc:M222222 schema:encodingFormat "image/jpeg".
schema:contentSize
the size of the file in bytes.
schema:height and schema:width
the height and width of the file if it is an image or a video in pixels. For example sdoc:P2222 schema:height 1024 ; schema:width 2048.
schema:duration
the duration of a video using the xsd:duration datatype. For example sdoc:M222222 schema:duration "PT13S"^^xsd:duration.
schema:numberOfPages
the number of pages of a multi-pages file (only for PDFs and DjVus).