Sparnatural
Sparnatural copied to clipboard
Segregate widget value selection from RDFJs pattern creationg
Currently the widgets come with a certain RDFjs pattern. this limits the widget to a certain pattern if patterns should be added it has to be added in the code. Decouple widgets into two parts.
- value selection (list, map, date etc.)
- rdfjs creation (values with uris, geo filters, date filter etc.)
It would then be possible to mix them. For example: use to list widget to create geo filters and not only values with URIs.
The decoupling should be between the widget and the widget value : multiple widgets can produce the same widget value (e.g. List and Autocomplete both produce a URI as a value). Then for a given WidgetValue, the SPARQL generation is always the same. And, in your proposal, the same Widget could produce different WidgetValue but based on which criteria ? I would argue that this would actually correspond to a new kind of Widget (say "ListSelectionGeoWidget"), that has its own code, and then generate the same WidgetValue as the MapWidget.