Re: Relationship between filter properties and hydra:supportedProperty (was Re: Filters as views (ISSUE-45))

Hi Maxim

I'm reading through your examples and I've come to appreciate the idea where filter mappings relate to properties though I still have some reservations :). 

Generally I see that most people associate views with collections. After all there are still templated links though views can also express a hierarchy of resources. Consider a resource, which is essentially a long text document (an article etc). Say I wanted to define a view, which generates an automated summary and takes maximum length parameter:

{
  "@id": "/article",
  "view": {
    "@type": "ViewTemplate",
    "template": "/article{?maxLength}",
    "mapping": [
      { 
        "variable": "maxLength", 
        "??": "??"
      }
    ]
  }
}

What sense do the other properties of mapping make? Neither property nor comparator seems right in such context. I feel like we are pushing the design of template mappings for views (and by extension templated links) in a very specialized direction without fully analyzing a bigger picture.

Now, regarding the wiki examples:

1. Under direct mapping you write "Such mapping type doesn't allow to use property which is not defined for the given instances." I guess you mean hydra:Class and not instance? Also we currently don't specify the member type for collection members?

2. I would not advise any particular default for the mapping type in general, should we go down that path. As I stated above, collection mapping is a specialized case of view. I also assume reuse of mappings for views and templated links. For the latter direct/indirect mappings do not apply, do they? That said I pretty much like the concept.

3. Lastly I'm a little confused with the Indirect mapping examples. They seem needlessly complex. In the last snippet I understand that you wrap the three parameters inside a single mapping? And does age variable really map to the birthDate? Otherwise in what way is that information significant for the client? 

Regards,
Tom

February 13 2016 3:33 PM, "Maxim Kolchin" <kolchinmax@gmail.com> wrote:

> I collected thoughts from this thread and described a proposal for the
> mappings which allows to clarify and cover aforementioned use cases:
> 
> https://www.w3.org/community/hydra/wiki/An_extented_mappings_for_collection_filters
> 
> P.S. My English may be not mature enough to write formal texts, so
> please correct or clarify phrases if it's needed :)
> 
> Maxim
>

Received on Sunday, 14 February 2016 17:09:07 UTC