-- ISSUE-45: Introduce hydra:filter (subPropertyOf hydra:search) --

I would appreciate the support of filtering as I have mentioned on other
posts but the proposed approach as far as I have understood it has
the major disadvantage that I would need to define a filter for each
property of collection members on which I want to offer filtering.
This can become quite lengthy.

I opt for a more generic approach which allows the client to pick arbitrary
properties and filter for them -- something like this:

hydra:filter: {
   @type: "IriTemplate",
   template: "?f={property}:{value}",
   mappings: [
     {
       @type: "IriTemplateMapping",
       variable: "property",
       property: "rdf:Property",
       required: true
     },
     {
       @type: "IriTemplateMapping",
       variable: "value",
       required: true
     }
   ]
}

This would also allow for templates like this:

   template: "?{property}={value}"

Which would allow to describe the diversity of current filtering
notations found in APIs.

Received on Sunday, 20 April 2014 11:40:13 UTC