RE: Link, operation keywords

On 24 Sep 2014 at 20:33, László Lajos Jánszky wrote:
> Okay, these are 2 words (hydra:supportedOperation, hydra:Operation).
> 
> We don't necessary need the hydra:Operation. For example we can use an
> rdf:type, like schema:BefriendAction from another vocab. What we
> really need are the operation related properties, like hydra:method,
> hydra:returns, etc... By RDF you don't need classes to define or use
> properties, so you don't need the hydra:Operation class to do so. The
> hydra:Operation class can be a base class of custom operations, but I
> am not sure what's the gain of having such a base class.

Strictly speaking you are right. hydra:Operation wouldn’t be needed. But it often makes processing of data simpler and also helps humans to understand and communicate ("the thing with a hydra:method, hydra:returns..." vs. "the hydra:Operation").


> What about the other 2 words (hydra:operation, hydra:Link)?

With hydra:supportedOperation you associate an operation to a class. It then applies to all instances of that class. In contrast, hydra:operation associates an operation directly to a resource:

    </Class> hydra:supportedOperation <OpA> .
    </Class> hydra:operation <OpB> .

    </res> rdf:type </Class> .
    </res> hydra:operation <OpC> .


With this information, a server tells a client that the resource </Class> supports OpB but *not* OpA. </res> supports OpA (because it is an instance of /Class) and OpC.

hydra:Link allows you to express that a property should be interpreted as a link instead of just an ordinary RDF property. In other words, if you encounter something like:

   ex:myProp rdf:type rdf:Property .
   ex:myLink rdf:type hydra:Link .

   </> ex:myProp </a> .
   </> ex:myLink </b> .

A client would know that </b> is to be treated as a dereferenceable resource whereas </a> is to be treated as an identifier. In RDF, all IRIs are "by default" just identifiers. This allows you to distinguish between those two things in a machine-understandable way.

Does this clarify it?


--
Markus Lanthaler
@markuslanthaler




> 2014-09-23 23:38 GMT+02:00 Ruben Verborgh <ruben.verborgh@ugent.be>:
>> Hi László
>> 
>>> Do the machines really need 4 keywords to describe the same?
>> 
>> It will need at least two; one type to say "this is an operation";
>> one property to say "this is the operation of”. They are different things.
>> 
>>> For a human the following would be enough: when something is under the
>>> supportedOperation property, than it is an operation
>> 
>> Note how you have the same two concepts here:
>> “supportedOperation”, and "an operation”.
>> So humans have also two concepts; nothing special about that.
>> 
>> Machines can also make the above inference:
>> the range of supportedOperation is Operation,
>> so therefore, everything under supportedOperation is an operation.
>> However, to do this, we of course need the concept “operation”.
>> 
>> Best,
>> 
>> Ruben

Received on Monday, 29 September 2014 22:05:57 UTC