As a user of WDQS and WCQS I want to be able to join a mediainfo item with a property value referencing a commons image such as P18.
There are no obvious to do this currently.
The RDF output wikidata the properties instance of [[https://www.wikidata.org/wiki/Q18610173|Q18610173]] (e.g. P18) do use an IRI in the form:
`http://commons.wikimedia.org/wiki/Special:FilePath/_filename_` while commons entities references their contentUrl using `https://upload.wikimedia.org/wikipedia/commons/X/XY/_filename`.
There are two differences that make the unusable these IRIs for join the two graphs:
- the use of Special:FilePath
- the use of `http` vs `https`
For instance with a commons RDF output like:
```lang=turtle
sdc:M10031710 a wikibase:Mediainfo,
schema:MediaObject,
schema:ImageObject ;
schema:encodingFormat "image/jpeg" ;
schema:contentUrl <https://upload.wikimedia.org/wikipedia/commons/c/c0/Douglas_adams_portrait_cropped.jpg> ;
```
**One approach could be to change the URL emitted by commons mediainfo to be the same as the one by wikidata: **
```lang=turtle
sdc:M10031710 a wikibase:Mediainfo,
schema:MediaObject,
schema:ImageObject ;
schema:encodingFormat "image/jpeg" ;
schema:contentUrl <http://commons.wikimedia.org/wiki/Special:FilePath/Douglas%20adams%20portrait%20cropped.jpg> ;
```
**Another approach would to introduce a new triple, e.g. `schema:url`:**
```lang=turtle
sdc:M10031710 a wikibase:Mediainfo,
schema:MediaObject,
schema:ImageObject ;
schema:encodingFormat "image/jpeg" ;
schema:contentUrl <https://upload.wikimedia.org/wikipedia/commons/c/c0/Douglas_adams_portrait_cropped.jpg> ;
schema:url <http://commons.wikimedia.org/wiki/Special:FilePath/Douglas%20adams%20portrait%20cropped.jpg> ;
```
Note on similar tickets:
- T258769 is very similar but is worded to simplify the use of the image grid feature of the UI
- T258776 serves similar purposes but is harder to achieve:
-- it requires "synchronization" between wikidata and commons to obtain the page ID of a media info item
-- MediaInfo item may not yet exist while the commons image is still referenceable from wikidata
AC:
- A query on WCQS for joining wikidata item from WDQS using federation can be easily written without complex string manipulation