Re: Link relation type to link to discover LDP

Hi Greg,

> When I dereference a TPF fragment URL and parse the RDF I get back, how am I (or, rather, my program) to know that what I’ve gotten back are hypermedia controls for TPF?

As a human, here is how you know it.
If you visit a fragment (like http://fragments.dbpedia.org/2014/en),
you see "Query DBpedia 2014 by triple pattern".
So this tells you that the three fields listed below it
will act as a filter on the dataset.

As a machine, you can know it as follows. This is what you get:

<http://fragments.dbpedia.org/2014/en#dataset> hydra:search [
    hydra:template "http://fragments.dbpedia.org/2014/en{?subject,predicate,object}";
    hydra:mapping
        [ hydra:variable "subject";     hydra:property rdf:subject ],
        [ hydra:variable "predicate"; hydra:property rdf:predicate ],
        [ hydra:variable "object";       hydra:property rdf:object ]
].

Note how this snippet says exactly the same:
"The dataset DBpedia 2014 can be searched by subject, predicate, object”.
So we explicitly explain to the client what TPF is,
not needing any explicit reference to (and implicit understanding of) the TPF spec.

> Is there any indication that the controls I’ve gotten back are TPF, and not some other sort of hypermedia API that happens to also require RDF-based subject, predicate, and object arguments?

Yes, the hydra:search predicate does this.
It explains that the subject/predicate/object fields
are used to filter the dataset (and not for something else).

> Especially since the TPF hydra:mapping uses properties that are not TPF-specific (rdf:subject, rdf:predicate, rdf:object), it seems strange to me that there’s no sort of extra typing information that identifies the API as specifically a TPF API.

The connection happens with the hydra:search predicate.
The genericness of the rdf:* properties are intentional,
because this ontology defines these precise concepts.

Does that clarify the mechanism?

Best,

Ruben

Received on Tuesday, 16 June 2015 09:52:56 UTC