Re: [Specifications] Added support for strongly typed collections (#240)

Ah, and one more, similar case. We should clarify the behaviour when there are multiple (sub)classes which may have member assertions. I'd say that clients and server should walk up the `rdfs:subClassOf` hierarchy and combine them all. 

To sum up with an example

```turtle
:ArticleCollection
  rdfs:subClassOf hydra:Collection ;
  hydra:memberAssertion [
    hydra:property rdf:type ;
    hydra:object :Article ;
  ] ;
.

:DraftArticleCollection
  rdfs:subClassOf :ArticleCollection ;
  hydra:memberAssertion [
    hydra:property :status ;
    hydra:object :Draft ;
  ] ;
.

:KarolsDraftsCollection
  rdfs:subClassOf :DraftArticleCollection ;
  hydra:memberAssertion [
    hydra:property acl:owner ;
    hydra:object </person/Karol> ;
  ] ;
.

</person/Karol/drafts> a :KarolsDraftsCollection .
```

By combining all the member assertions above we could generate a query like below to find all members of the resource `</person/Karol/drafts>`.


```sparql
SELECT ?member {
  </person/Karol/drafts> hydra:member ?member .

  # asserted by :ArticleCollection 
  ?member a :Article .

  # asserted by :DraftArticleCollection
  ?member :status :Draft .

  # asserted by :KarolsDraftsCollection
  ?member acl:owner </person/Karol> .
}

-- 
GitHub Notification of comment by tpluscode
Please view or discuss this issue at https://github.com/HydraCG/Specifications/pull/240#issuecomment-876924825 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 9 July 2021 05:29:06 UTC