Jakob_WMDE added a comment. |
More concrete plan:
- rename EntityParserOutputDataUpdater to EntityParserOutputDataUpdaterCollection (naming suggestions welcome)
- it should only be used to register EntityParserOutputDataUpdaters, pass them the entity they should operate on, and call updateParserOutput on them
- processStatements and processSitelinks should go into concrete EntityParserOutputDataUpdater implementations
- make EntityParserOutputDataUpdater an interface that operates on entities and updates the ParserOutput
- has methods processEntity and updateParserOutput
- existing StatementDataUpdaters should either be changed to implement EntityParserOutputDataUpdater instead, or they need an adapter (is that better?)
- note: this is worse performance-wise. Instead of iterating over all statements once and passing individual statements to StatementDataUpdaters we would need to iterate over all statements once per StatementDataUpdater
- everything concerning SiteLinks and Statements is removed from ReferencedEntitiesDataUpdater - it should only deal with EntityIds and add their respective links to ParserOutput
- ReferencedEntitiesDataUpdater gets a per entity type collection of EntityIdCollectors (naming suggestions welcome) injected
- the SiteLink bit of it becomes a SiteLinkBadgeItemIdCollector
- the Statement bit becomes StatementReferencedEntityIdCollector
TASK DETAIL
EMAIL PREFERENCES
To: Jakob_WMDE
Cc: Jakob_WMDE, Pablo-WMDE, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Darkdadaah, Mbch331
Cc: Jakob_WMDE, Pablo-WMDE, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Darkdadaah, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs