Introduction and some questions

Hi All,

My name is Peb, I am a student at Vienna UT. I have been interested by
Hydra for some times but only recently decided to read the draft spec with
more attention. I am playing with python codes using rdflib and
rdflib-jsonld in order to write my own console as a way to try to
understand hydra (https://gist.github.com/pebbie/3a6b2b10c71ba796dca2).

for starter, I would like to ask some questions.

1. I believe the root class of Hydra are Resource and Operation to denote
nouns and verbs. Since the expected/returned representation input/output
need to be specified and it may not be a location but a graph then we
cannot use Resource class directly but creating Class as a subclassOf
Resource. in the draft it is also mentioned that hydra:Class is a
dereferenceable Resource. conceptually, this becomes a bit weird for me.
when an instance of hydra:Class is passed as input (in expects), it doesn't
have to be a dereferenceable resource, right?

2. about statusCodes and returns. I believe the returns property is only
valid if the statusCodes is some value (e.g. 200). how to describe, for
example if the returned code is 201 then the result is a URI (not a triple)?

3. why is hydra:Resource having hydra:operation property while hydra:Class
having hydra:supportedOperation property. both predicates are associating
two class in a subClassOf relationship (hydra:Class and hydra:Resource)
with the same meaning to hydra:Operation. why not set the
supportedOperation property to Resource (and by RDFS reasoning it also
becomes valid to assign that property to hydra:Class)?

4. would it be better if IriTemplate is defined as Datatype and set the
domain of template property and mapping property to TemplatedLink? a
literal pointed by template property is interpreted as a special kind of
string literal (a IriTemplate).

5. How to define variable dependency in a templated link? which is if a
variable 'a' is set then variable 'b' becomes required.

6. by restricting the hypermedia object as a subclassof hydra:Class, then
ApiDocumentation, Collection and PagedCollection become predefined classes
(subClassOf hydra:Class). supportedClass, title, description, and
entrypoint is a SupportedProperty for ApiDocumentation Class. member and
totalItems is a SupportedProperty for Collection. a PagedCollection is
adding additional control properties (firstPage, prevPage, nextPage,
lastPage) and ItemsPerPage and perhaps totalPages property.

if hydra:Class is the base class of hypermedia object, then to interpret if
a URL is a part of hydra spec or not can be done without setting the Link
header but by dereferencing the type of the nodes. hopefully, when the type
of the subjects are dereferenced, they point to the graph which contains
the definition that the class name as a subclassof hydraClass (and maybe
the rest of ApiDocumentation in the case of vocab:EntryPoint in
http://www.markus-lanthaler.com/hydra/api-demo/).

I have been trying to skim the archive but overwhelmed by the discussions
so please pardon if some topics mentioned in my post are already discussed.

Cheers,

Peb R. Aryan
http://about.me/peb

Received on Tuesday, 16 September 2014 08:48:50 UTC