Mapping thing descriptions to RDF

I’ve created a demo that maps examples of thing descriptions expressed in JSON to RDF triples. I’ve used the JSON representation that I’ve been working on for my NodeJS server and web page library. It uses JSON in a simple way to represent object models and annotations and is deliberately not intended to support all of RDF, which would increase the burden for processing it on moderately constrained devices. You can of course link to rich semantic models via annotations, where these models are for processing on more powerful platforms. The demo has a built in default context, and some examples link to an external context file.  Note the same origin restriction for web pages means that if you enter your own example with a link to an external context file on a different server, it will need to set the CORS header.

There are several examples covering a range of different features: events, properties, nested properties, actions, annotations, streams, collections, enumerations and things as first class types. The features for streams are based upon my streams demos for a water tank and for ECGs.

    See: https://www.w3.org/WoT/demos/td2ttl/

Feel welcome to provide comments on https://github.com/w3c/wot/issues/283

p.s. the demo uses URIs on the example.com and example.org domains. Obviously, these would need replacing with whatever URIs are chosen by the Working Group. I expect to enhance the demo to support the generation of Turtle, but haven’t got that far as yet, but plain triples are good enough to show the idea.

—
   Dave Raggett <dsr@w3.org <mailto:dsr@w3.org>>

Received on Thursday, 24 November 2016 19:22:35 UTC