Page MenuHomePhabricator

Implement each "flavor" of RDF in a separate class.
Closed, ResolvedPublic

Description

RdfGenerator supports a number of modes and flavors, which should be refactored into separate classes, so that each of them can be applied to a given entity separately. Candidates are:

  • truthy statements
  • reified statements (modes: best, all)
    • qualifiers
    • references
    • full values
  • sitelinks
  • terms (labels, descriptions, aliases) (option: desired languages)
  • stubs for mentioned entities (options: only properties)
    • entities are "mentioned" by other flavor handlers, need a good way to pass it around
  • document info (entity <-> description)
  • entity revision (different interface, takes an EntityRevision)
  • dump meta-data (different interface, takes no entity)

Event Timeline

daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel subscribed.
daniel set Security to None.
daniel added a subscriber: Smalyshev.

I think we have this implemented, but not as separate classes. In fact, I doubt separate classes is a good approach since these functions are not independent and there would be a bunch of cross-dependencies between them.

I'm working on this, and I have very little issues with cross-dependencies. The different aspects come apart nicely. Will try to get this finished this week.

Change 200494 had a related patch set uploaded (by Daniel Kinzler):
Split RdfBuilder

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

Change 205853 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Clean up RDF related code after split

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

Change 212268 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Expand class level doc of RdfBuilder classes

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

Change 205853 merged by jenkins-bot:
Clean up RDF related code after split

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

Change 212268 merged by jenkins-bot:
Expand class level doc of RdfBuilder classes

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