daniel created this task.
Herald added a subscriber: Aklapper.

TASK DESCRIPTION
  Based on the discussion around https://phabricator.wikimedia.org/T56085 and 
previously on https://phabricator.wikimedia.org/T101752, I propose to add 
support for "foreign" EntityIds[*]  as follows described below:
  
  [*let's reserve "external" for the external-id property data type]
  
  - EntityId gets an additional field `repository`, which contains the logical 
name of the repository that the ID refers to. This serves as a namespace 
mechanism for entity IDs. The name used to refer to a given repo is local, and 
can differ from client to client.
  - repository names can be used to look up the repository Site object, which 
in turn allows the ID to be mapped to the currect URI, URL, or api path for the 
repo it belongs to.
  - The empty repository name "" refers to the local wiki.
  - The serialization of the EntityId follows the pattern `<repository>:<id>`. 
If `<repository>` is empty, the leading ":" is optional. This format follows 
the convention set by XML namespaces, RDF prefixes, and MediaWiki interwiki 
links.
  - Repository names can be mapped during serialization and deserialization.
  - When reading data from a another repo,  repo names in entity ids get mapped 
from the names used on the other repo to the names used on the local wiki. In 
particular, the empty prefix is mapped to the foreign repo's name while reading 
ids.
  - When writing data to a another repo,  repo names in entity ids get mapped 
from the names used on the local wiki to the names used on the foreign repo. In 
particular, the foreign wiki's name is mapped to the empty prefix.
  - The repo name in an EntityId object can always be assumed to match the 
local definition of that name. A repo name in serialized data however cannot be 
interpreted without knowing which repo it came from.

TASK DETAIL
  https://phabricator.wikimedia.org/T133381

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: Jonas, JanZerebecki, adrianheine, thiemowmde, Aklapper, daniel, D3r1ck01, 
Izno, Wikidata-bugs, aude, Mbch331



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to