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

Hi all,

I have a question about the way properties are (or will be) selected
for a filter, such as schema:givenName or schema:familyName from the
examples [0], [1].

schema:givenName and schema:familyName are datatype properties (in
OWL's sense), therefore it's quite easy to use them for filters, but
what about more complex properties, how should they be represented in
such filters, and should they be used in filters at all?

In example, the location of a sensor, in the simplest case I can have
geo:lat and geo:long attached directly to a sensor's resource, but
what if I have the following use case:

<> a apidoc:Sensor ;
     geo:location [
         a geo:Point ;
         geo:lat "..." ;
         geo:long "..."
     ] .

and in the api documentation I define apidoc:Sensor resources as follows:

apidoc:Sensor a hydra:Class ;
     hydra:supportedProperty [
         hydra:property geo:location
     ] .

I now I want to have a filter which should return apidoc:Sensor
instances if they fall in a circle defined by the coordinates of the
center and the length of its radius. As I understand such filter
should consist of 3 properties, e.g. schema:geoRadius, schema:latitude
and schema:longitude.

Did you have a similar use case? Or maybe you have a better idea, how
to create such filter?

And should a client know that he or she can filter the instances by
the given hydra:supportedProperty using a particular filter?

P.S. I know that the filtering concept is still under discussion, but
maybe this use case at least could help to clarify how such cases
should be covered the filtering concept or maybe it shouldn't be
covered.

[0]: https://www.w3.org/community/hydra/wiki/Filtering
[1]: https://www.w3.org/community/hydra/wiki/Collection_Interaction_Flow

Thanks in advance!
Maxim

On Tue, Feb 9, 2016 at 2:53 PM, Tomasz Pluskiewicz <tomasz@t-code.pl> wrote:
> February 9 2016 12:46 PM, "Ruben Verborgh" <ruben.verborgh@ugent.be> wrote:
>>
>>>> – With regard to the above, an alternative way
>>>> to express GET /markus/friends?first=Ruben
>>>> would be to make "/markus/friends?first=Ruben" the "main" resource,
>>>> to express Ruben as a member of that,
>>>> and relate the resource to its parent. ("viewOf"?)
>>>> Now, the "main" resource is the collection the view belongs to.
>>>> Same with paging.
>>>
>>> I don't think Hydra should be too opinionated about that.
>>
>> Could be; but we should think/advise about the impact of either option.
>>
>
> Of course, I agree with guidance. Just let's avoid a situation where the design itself promotes one way over the other.
>
>

Received on Wednesday, 10 February 2016 12:15:18 UTC