HydraCG/Specifications

Manages block usage for subject vs object

Closed this issue · 6 comments

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?

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

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.

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

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:

  • for subject + property - member of the collection is an object of such a statement
  • for property + object - member of the collection is a subject of such a statement

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.

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