Wimmics / solid-start

Projet SOLID Inria - Startin'blox
MIT License
1 stars 0 forks source link

Add support for TypeIndex #3

Open lecoqlibre opened 1 year ago

lecoqlibre commented 1 year ago

Part of the specification already detailed here: https://git.startinblox.com/djangoldp-packages/djangoldp/-/issues/402

Work to be divided between @balessan and @lecoqlibre

lecoqlibre commented 1 year ago

The TypeIndex should be used by the <solid-form-search> SiB component.

We should add like a typeIndex and a forClass properties to target specific classes in one or more type index(es):

<solid-form-search
   id="filter-by-skill"
   fields="type"
   label-skill="search by skill"
   typeIndex="https://path/to/a/typeIndex.ttl [,<path/to/a/second/typeIndex>]"
   forClass="PersonSemanticWeb [,anotherClass]"
></solid-form-search>

<solid-display
   data-src="http://server"
   fields="username, last_name, email, skill"
   filtered-by="filter-by-skill"
></solid-display>

For instance, if we want to search for Persons having the skill "semantic web", we would look into the TypeIndex after the class PersonSemanticWeb. The TypeIndex should contain entries like:

@prefix solid: <http://www.w3.org/ns/solid/terms#>.

<>
    a solid:TypeIndex ;
    a solid:ListedDocument.

<#ab09fd> a solid:TypeRegistration;
    solid:forClass PersonSemanticWeb;
    solid:instance </persons/TimBLee>.
balessan commented 1 year ago

@lecoqlibre interesting but it looks like the forClass attribute is the equivalent of the value of the currently selected type.

Let's say the widget used to select the type in the search form is a select, then the selected value should be a URI corresponding to the definition of the className we are looking for (in that case: PersonSemanticWeb).

And same for the typeIndex attribute, which value should actually be the data-src= attribute value of the filtered solid-display. Otherwise I do not get what value should bear the data-src. Maybe a list of knows typeIndexes ? In the case where there are multiple PODs ?

And what would be the behaviour of the framework besides that ? Should it implement the ruben's library federated search mechanism and every time we change the selected value, it triggers a new request ?

What do you think ?

balessan commented 9 months ago

After synchronisation with @lecoqlibre we think that's the base for the demonstration scenario.