Page MenuHomePhabricator

[Task] Allow RDF bindings for different data types to be registered dynamically.
Closed, ResolvedPublic

Description

In order to allow RDF mappings for custom data types to be registered, we need an interface for mapping a Snak to RDF, and an implementation that will dispatch to the correct mapping for each data type. We then need a mechanism to inject such mapping implementations. Finally, the existing mappings in SimpleValueRdfBuilder resp ComplexValueRdfBuilder should be split into individual classes, so they can be registered via WikibaseRepo.datatypes.php.

Event Timeline

daniel raised the priority of this task from to Medium.
daniel updated the task description. (Show Details)
JanZerebecki renamed this task from [Task] Refactory StatementRdfMapping to introduce DataValueRdfMapping to [Task] Refactor StatementRdfMapping to introduce DataValueRdfMapping.Sep 10 2015, 5:53 PM
JanZerebecki set Security to None.
JanZerebecki added a project: Technical-Debt.
JanZerebecki moved this task from incoming to ready to go on the Wikidata board.

Change 251978 had a related patch set uploaded (by Daniel Kinzler):
Allow RDF mapping for snaks to be injected per datatype.

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

daniel renamed this task from [Task] Refactor StatementRdfMapping to introduce DataValueRdfMapping to [Task] Allow RDF bindings for different data types to be registered dynamically..Nov 9 2015, 5:47 PM
daniel updated the task description. (Show Details)

Change 251978 merged by jenkins-bot:
Allow RDF mapping for snaks to be injected per datatype.

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

@hoo @daniel patch is merged, does that resolve this task?

@Tobi_WMDE_SW The description calls for a bit more: "Finally, the existing mappings in SimpleValueRdfBuilder resp ComplexValueRdfBuilder should be split into individual classes, so they can be registered via WikibaseRepo.datatypes.php." That's still WIP: https://gerrit.wikimedia.org/r/#/c/252026/ - the test cases are still incomplete.

But we could just as well split that into a separate task.

PS: I now created T118500: [Task] Split RDF mapping code into separate classes per type as a blocker of this task.