- From: Thomas Bergwinkl via GitHub <sysbot+gh@w3.org>
- Date: Mon, 26 Feb 2018 00:03:17 +0000
- To: public-hydra-logs@w3.org
Here is a complete example, which should be easier to understand without knowing the ontology. There are two classes `Thing` and `RateableThing`. Both have the `comment` property, both have a `POST` operation, but they expect different classes (`Comment`, `RatingComment`). In this JSON-LD representation it looks like there is a connection from the class to the operation, but the actual triples look like this: ``` <comment> <supportedOperation> _:b1 . <comment> <supportedOperation> _:b2 . ``` Different properties could be used, but that's not always possible if a third party ontology is used and no custom properties should be used. ``` { "@context": "http://www.w3.org/ns/hydra/context.jsonld", "@graph": [{ "@id": "http://example.org/Thing", "@type": "Class", "supportedProperty": { "property": { "@id": "http://example.org/comment", "supportedOperation": { "@type": "Operation", "method": "POST", "expects": "http://example.org/Comment" } } } }, { "@id": "http://example.org/RateableThing", "@type": "Class", "supportedProperty": { "property": { "@id": "http://example.org/comment", "supportedOperation": { "@type": "Operation", "method": "POST", "expects": "http://example.org/RatingComment" } } } }, { "@id": "http://example.org/Comment", "supportedProperty": { "property": { "@id": "http://example.org/message" } } }, { "@id": "http://example.org/RatingComment", "supportedProperty": { "property": [{ "@id": "http://example.org/message" }, { "@id": "http://example.org/rating" }] } }] } ``` -- GitHub Notification of comment by bergos Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/156#issuecomment-368357947 using your GitHub account
Received on Monday, 26 February 2018 00:03:54 UTC