comunica / comunica

📬 A knowledge graph querying framework for JavaScript
https://comunica.dev
Other
426 stars 77 forks source link

Allow plugging in a custom DataFactory #358

Closed rubensworks closed 4 months ago

rubensworks commented 5 years ago

Issue type:


Description:

It should be possible to provide a custom DataFactory at config-level.

The following will be needed for this:

  1. Create provider-data-factory. This is not an actor, but merely a wrapper class that contains 1 field: dataFactory. In the components file, this should accept a dataFactory param, with as default value @rdfjs/data-model (directly require it from the config file). See Components.js documentation on requireName and requireElement: https://componentsjs.readthedocs.io/en/latest/configuration/configurations/nonsemantic/
  2. Add dataFactoryProvider params to all relevant actors (parsers, term transformers (rdf-string, rdf-terms, ...)), and adapt their logic so that they grab the dataFactory from the provider.
  3. Update actor-init-sparql (and others?) config files so that the dataFactoryProvider is instantiated, and passed to all relevant actors.

Needed for https://github.com/RubenVerborgh/LDflex/issues/3

rubensworks commented 4 months ago

Will be included in update v4.