RE: reverse properties (ISSUE-40, ISSUE-1)

On Saturday, March 15, 2014 1:21 AM, Gregg Kellogg wrote:
> 
> JSON-LD has the ability to define terms which, when used as properties,
> cause a reverse relationship to be asserted. For example:
> 
> {
>   "@context": {
>     ...,
>     "isMemberOf": {"@reverse": "member", "@type": "@id", "@container":
> "@set"}
>   }
> }
> 
> N3 has a similar is xxx of construct, and RDFa has @rev, which all do
> similar things. The value of these constructs is that it prevents the
> anti-pattern of creating inverse versions of each property. For
> example, if I had a sports team with several members, I might describe
> it as follows:
> 
> :49ers a schema:SportsTeam
>   schema:member :ColinKaepernick, :FrankGore, ...
> 
> When describing each team member, I'd like to use the same predicate to
> describe the reverse relationship
> 
> :ColinKaepernick a schema:Person;
>   is schema:member of :49ers .
> 
> However, SupportedProperty requires that I define a property for each
> of these, particularly when it describes a Link or has operations. It
> might be nice to be able to define a SupportedProperty to be reversed,
> such as the following:
> 
> [ a hydra:SupportedProperty;
>   hydra:property schema:member;
>   hydra:readonly true;
>   hydra:writeonly false;
>   hydra:reversed true
> ]
> 
> Or, perhaps use something like hydra:reversedProperty. That way, if
> schema:Person was a hydra:Class, it could describe properties that
> appear in the lexical form within that entity.

Really good point. I agree, this is something we should really address. I'm
leaning towards hydra:reverse(d)Property instead of having "just" a flag.
I've created ISSUE-40 to track this:

  https://github.com/HydraCG/Specifications/issues/40

In most cases, you would probably want to "overwrite" the properties' label
and description which has been tracked as ISSUE-1:

  https://github.com/HydraCG/Specifications/issues/1


> This would also be a
> good use of LDF, where an associated pattern would have the predicate
> and object values specified and wild-card the subject.

In the case of LDF I don't think you really need reverse properties but
that's a question that Ruben should answer.


--
Markus Lanthaler
@markuslanthaler

Received on Monday, 17 March 2014 20:03:08 UTC