HydraCG / Specifications

Specifications created by the Hydra W3C Community Group
Other
138 stars 26 forks source link

Manages block usage for subject vs object #194

Closed tpluscode closed 5 years ago

tpluscode commented 5 years ago

Description

I've been working on implementing "manages block" in Alcaeus and I conclude that it can have two possible usages as currently defined (well, implicitly).

First is to assert member types, as in the #126 by @elf-pavlik:

{
  "manages": {
    "rdf:predicate": "rdf:type",
    "rdf:object": "example:Class"
  }
}

The other is to fix the "broken relationships" as discussed in #41 among other threads

{
  "manages": {
    "rdf:predicate": "foaf:knows",
    "rdf:subject": { "@id": "GreggKellogg" }
  },
  "member": [
     { "@id": "Markus" }
  ]
}

Questions

Now, does it actually make sense to include all three subject, predicate and object in a single manages block?

tpluscode commented 5 years ago

On related note, it seems that there can be multiple manages blocks, right?

angelo-v commented 5 years ago

Now, does it actually make sense to include all three subject, predicate and object in a single manages block?

In my understanding: No.

On related note, it seems that there can be multiple manages blocks, right?

Yes, this way you could e.g express, that all members are of "type Person" and are "X's friends"

Something else:

You did not include a context in your examples, but intuitively it should be called hydra:property, hydra:subject and hydra:object.

tpluscode commented 5 years ago

Correct on all counts. We briefly talked about this yesterday and the conclusions were just what you typed.

I will submit a PR to settle the "manages block" in the spec and close a bunch of related issues

alien-mcl commented 5 years ago

As we discussed on the call, manages block seems to be a SPARQL like statement pattern with only two items (i.e. subject + property or property + object) and the third is somehow a variable in context of the usage:

tpluscode commented 5 years ago

NIT: the property could also be the blank, provided that collection members are instances of rdf:Property. Probably uncommon but it's possible to imagine such a use cases.

alien-mcl commented 5 years ago

I've never encountered such an example so I didn't mention it.