Page MenuHomePhabricator

Querying WCQS should allow me to use prefixes for MediaInfo items
Closed, ResolvedPublic5 Estimated Story Points

Description

As a WMCS user I should be able to run

select * {
  sdc:M80570743 ?p ?o .
} limit 10

without having to use full IRIs for MediaInfo items.

AC: The list of prefixes supported should be (esp. sdc, sdcv, sdcref):

@prefix sdc: <https://commons.wikimedia.org/entity/> .
@prefix sdcdata: <https://commons.wikimedia.org/wiki/Special:EntityData/> .
@prefix sdcs: <https://commons.wikimedia.org/entity/statement/> .
@prefix sdcref: <https://commons.wikimedia.org/reference/> .
@prefix sdcv: <https://commons.wikimedia.org/value/> .
@prefix sdct: <https://commons.wikimedia.org/prop/direct/> .
@prefix sdctn: <https://commons.wikimedia.org/prop/direct-normalized/> .
@prefix sdcp: <https://commons.wikimedia.org/prop/> .
@prefix sdcps: <https://commons.wikimedia.org/prop/statement/> .
@prefix sdcpsv: <https://commons.wikimedia.org/prop/statement/value/> .
@prefix sdcpsn: <https://commons.wikimedia.org/prop/statement/value-normalized/> .
@prefix sdcpq: <https://commons.wikimedia.org/prop/qualifier/> .
@prefix sdcpqv: <https://commons.wikimedia.org/prop/qualifier/value/> .
@prefix sdcpqn: <https://commons.wikimedia.org/prop/qualifier/value-normalized/> .
@prefix sdcpr: <https://commons.wikimedia.org/prop/reference/> .
@prefix sdcprv: <https://commons.wikimedia.org/prop/reference/value/> .
@prefix sdcprn: <https://commons.wikimedia.org/prop/reference/value-normalized/> .
@prefix sdcno: <https://commons.wikimedia.org/prop/novalue/> .

The sparql query pasted should work.

Related Objects

Event Timeline

Most of the above prefixes will be unnecessary, unless we propose to create any new properties local to Commons not defined on Wikidata.

If not then sdcref, sdcv, sdct, sdctn etc etc will all be unneeded.

Even though some prefixes are not needed I suggest to add all of them anyways to conform with what's done in the RDF dumps.
The RDF output emits all of them despite only writing: sdoc, sdocdata, sdcs, sdocv (sdocref? haven't seen it yet, can you add references from the UI?)

The answer is, we ought to remove the unused ones from the RDF dump too, as discussed at T258474

It is confusing and distracting to add a whole lot of prefixes that we do not use, and have no intention of using; and distracts from the reality, that SDC introduces very *few* new prefixes, beyond what are already used on WD.

Change 618237 had a related patch set uploaded (by ZPapierski; owner: ZPapierski):
[operations/puppet@production] Additional prefixes for sdoc for wcqs

https://gerrit.wikimedia.org/r/618237

Change 618237 merged by Ryan Kemper:
[operations/puppet@production] Additional prefixes for sdoc for wcqs

https://gerrit.wikimedia.org/r/618237

Prefixes, as defined in mediainfo dumps, are available in WCQS.