Re: what's the subject?

Markus,

thank you very much for all yours answers.

I think that a property that allows to link to the "main subject of the returned data" is useful. It corresponds to a very real and genuine need for basic linked data handling - one that I encounter in my LD stuff. It matters to allow easier implementations of clients in charge of displaying the data:

the user clicked "/bob", and receives a RDF graph, possibly with several resources and their description. The problem for the client is: how should this graph be displayed ? It is much easier if the graph is explicit about what it contains: "This a about /robert" (whose type is foaf:Person). The client can then display or consume the data, just on the basis of the content of the returned data (I don't say that there aren't any cases where the client can do better if it remembers what the user initially clicked, but in many cases, it should be enough to just rely on the returned data)

Note that the example I gave with redirection is one out of many cases where it is difficult to guess the "main subject" of the returned data. Another example I have in mind is when you have query params that can be added to a "base resource" to customize the amount of data that is returned (eg /alice and /alice?includeFriends=true). 

Should this property be in hydra?

As you note, it is very close to https://schema.org/mainContentOfPage, but the domain of this property seems to be a web page. I have been using foaf:primaryTopic for that purpose (but the domain of it is "Document"...)

So, I don't know whether such a property should be in hydra, but I think that it could often be useful to people using hydra, and there should be, at least, a recommended property for that.

Best,

fps

Le 4 mars 2015 à 22:19, Markus Lanthaler <markus.lanthaler@gmx.net> a écrit :

> On 24 Feb 2015 at 15:21, François-Paul Servant wrote:
>> sometimes, you follow a link in some LD data (a link labeled with "p" that
> points to "o"),
>> and then you don't have any obvious way to know what the returned data is
> about. It may
>> indeed happen that "o" is not mentioned in the returned data (one possible
> reason, among
>> others, is when there is some kind of redirect from "o" to another URI).
> It may also happen
>> that the "main subject"  of the returned data is not explicitly stated.
>> 
>> Eg. in /alice you have: </alice> foak:knows </bob> you get </bob>. The
>> HTTP client is set to follow the redirects, and there is a redirection
>> to </robert> So you get some data, for instance: </robert>
>> foaf:firstName "Robert", foaf:nick "Bob".
> 
> That doesn't tell you that /bob is the same person as /robert, does it?

no, of course not

> 
> 
>> Shouldn't hydra provide a simple way to state "the main subject of this
>> representation is </robert>"?
> 
> I'm not sure that Hydra should define that. It is also not clear to me how
> something like that should be defined in a generic way for arbitrary data.
> It may be simpler to do that in the context of specific types. Schema.org,
> e.g., has https://schema.org/mainContentOfPage
> 
> 
> --
> Markus Lanthaler
> @markuslanthaler
> 
> 

Received on Sunday, 8 March 2015 14:50:12 UTC