jayvdb added a comment. In https://phabricator.wikimedia.org/T92669#1404090, @Ricordisamoa wrote:
> In https://phabricator.wikimedia.org/T92669#1403308, @jayvdb wrote: > > > So, property claims can have references/sources. > > > > That means that the only ItemPage-specific data is sitelinks. They dont > > appears to be valid for properties. But perhaps we should check if the > > Wikibase team intend to add sitelinks/badges to Properties? > > > Maybe we should split attributes and methods into WikibasePageWithLabels, > WikibasePageWithSitelinks, WikibasePageWithClaims, etc., then make ItemPage > and PropertyPage subclass them accordingly. `WikibasePageWithLabels` doesnt seem to be different from WikibasePage. In the data model, it appears that all entities implement labels, aliases and descriptions. https://github.com/wmde/WikibaseDataModel/blob/master/src/Entity/Entity.php However I can see some value in separating the implementation of 'labels, aliases and descriptions' from the entity. `..WithClaims` maps to the data models `StatementListHolder`, and `..WithSitelinks` maps to the data model `SiteLinkList`, so there is a sound basis to create separate classes for each of those. A much cheaper approach is for WikibasePage to provide (perhaps limited) support for whatever keys appear in the JSON, and subclasses provide any special properties that are needed. WikibasePage.editEntity probably already does support writing for 'Property' entities; we just need to add more flexibility to other parts of WikibasePage. That will buy us some time so a better model can be created in https://phabricator.wikimedia.org/T102741, where Page concepts are not mixed up in the data model. TASK DETAIL https://phabricator.wikimedia.org/T92669 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: jayvdb Cc: jayvdb, Ladsgroup, gerritbot, Ricordisamoa, pywikibot-bugs-list, Aklapper, despens, Wikidata-bugs, aude, Malyacko, P.Copp _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
