- From: elf Pavlik via GitHub <sysbot+gh@w3.org>
- Date: Fri, 30 Dec 2016 21:42:26 +0000
- To: public-hydra-logs@w3.org
Short note on Operations (on web resources) and Actions (on abstract things). I've mostly seen instances of `hydra:Operation` represented with blank nodes but they could as well have `@id`. Action on abstract thing could possibly reference particular Operation (since each operation could have an `@id`) and web resource on which to perform it - (maybe with https://schema.org/target ) Taking example of Alice and list of her 'followers', represented by https://www.w3.org/community/hydra/wiki/Collection_Design and used like [ldp:IndirectContainer](https://www.w3.org/TR/ldp/#ldpic) ```json { "@context": { ... }, "@graph": [ { "@id": "https://dataset.example/api#operation-123", "@type": "hydra:CreateResourceOperation", "hydra:method": "POST", "hydra:expects": "foaf:PersonalProfileDocument" }, { "@id": "https://dataset.example/alice", "@type": [ "hydra:Resource", "foaf:PersonalProfileDocument" ], "foaf:primaryTopic": { "@id": "https://idp.example/alice", "foaf:name": "Alice", "schema:potentialAction": [ { "@type": "schema:FollowAction", "schema:target": "https://dataset.example/alice/followers/", "???:operation": "https://dataset.example/api#operation-123" } ] } }, { "@id": "https://dataset.example/alice/followers/", "@type": "hydra:Collection", "hydra:manages": { "hydra:property": "schema:follows", "hydra:object": "https://idp.example/alice" }, "hydra:member": [ "https://dataset.example/alice/followers/1" ] }, { "@id": "https://dataset.example/alice/followers/1", "@type": [ "hydra:Resource", "foaf:PersonalProfileDocument" ], "foaf:primaryTopic": { "@id": "https://idp.example/bob", "foaf:name": "Bob" } } ] } ``` So to add oneself to list of someone's followers, one would HTTP POST to `https://dataset.example/alice/followers/` a copy of profile document: ```json { "@context": { ... }, "@type": [ "hydra:Resource", "foaf:PersonalProfileDocument" ], "foaf:primaryTopic": { "@id": "https://idp.example/cecilia", "foaf:name": "Cecilia" } ``` Which server could after validations store as `https://dataset.example/alice/followers/2` -- GitHub Notification of comment by elf-pavlik Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/2#issuecomment-269825428 using your GitHub account
Received on Friday, 30 December 2016 21:42:32 UTC